cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
511
Views
1
Helpful
3
Replies

NSO Java VM not identifying the Class which build as part of private-jar file.Noclassfound exception thrown.

Raja.Selvaraj
Level 4
Level 4

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)

3 Replies 3

frjansso
Cisco Employee
Cisco Employee

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>

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.

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"/>

Polls
AI-powered tools for network troubleshooting are likely to be part of everyone’s workflow sooner or later. What is the single biggest challenge or concern you see with adopting these tools in your organization?