09-11-2017 05:31 PM - edited 03-01-2019 03:59 AM
TopologyUtils available in Package A and Package B included Package A into the build.xml as a private-jar.VM Classloader not loading the topologyUtils.Tried with shared-jar but it doesn't worked out.
Caused by: java.lang.NoClassDefFoundError: com/telstra/TopologyDiscovery/TopologyUtils
at com.telstra.UniService.UniServiceHelper.getVtpDomain(UniServiceHelper.java:846)
at com.telstra.UniService.UniServiceActions.getVtpDomain(UniServiceActions.java:827)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.tailf.dp.annotations.ActionCallbackProxy.action(ActionCallbackProxy.java:125)
... 7 more
Caused by: java.lang.ClassNotFoundException: com.telstra.TopologyDiscovery.TopologyUtils
at javax.management.loading.MLet.findClass(MLet.java:988)
at javax.management.loading.MLet.findClass(MLet.java:922)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
09-11-2017 07:54 PM
Have you set Package A as a dependency of Package B in Package B's package-meta-data.xml?
<required-package>
<name>Package A</name>
</required-package>
09-11-2017 08:00 PM
Yes .I have done the required component settings in Package B's package-meta-data.xml and i could see Package A's the private-jar mapped to Package B structure in eclipse as well.
09-13-2017 04:01 PM
It was a long time I did this, so some of the details of how are lost.
But I see that I did this in the package that exports classes:
41 <jar destfile="${sharedjar.dir}/${package}-exported.jar"
42 basedir="${classes.dir}"
43 includes="**/exported/*.class"/>
44 <jar destfile="${privatejar.dir}/${package}.jar"
45 basedir="${classes.dir}"
46 excludes="**/namespaces/*.class;**/exported/*.class"
47 includes="**/*.class"/>
So I had a specific namespace for my exported classes.
If you don't want that, you may want to try change the private-jar definition (privatejar.dir => sharedjar.dir):
54 <jar destfile="${sharedjar.dir}/${package}.jar"
55 basedir="${classes.dir}"
56 excludes="**/namespaces/*.class"
57 includes="**/*.class"/>
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide