views:

387

answers:

3

Created a Java application to upload documents via CIS (Content Integration Suite) to a storage application. The app runs successfully in RAD, but as a executable jar in a unix environment, getting a NoClassDefFoundError. I can not find the class on my local machine and there are not references to the class on the internet.

The manifest contains that class path for the needed jar files and the main class.

Can anyone help?

Fri Sep 04 16:47:25 EDT 2009 : StandardBatchApplication startup() completed.
java.lang.NoClassDefFoundError: com.stellent.cis.support.spring.ResourceHelper
        at com.stellent.cis.common.classloader.IsolatedJarClassLoader$TemporaryF
        at com.stellent.cis.common.classloader.IsolatedJarClassLoader$TemporaryF
        at com.stellent.cis.common.classloader.IsolatedJarClassLoader$TemporaryF
        at com.stellent.cis.common.classloader.IsolatedJarClassLoader.<clinit>(I
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:196)
        at com.stellent.cis.impl.CISApplicationFactory.getCisClassloader(CISAppl
        at com.stellent.cis.impl.CISApplicationFactory.getCisApplication(CISAppl
        at com.stellent.cis.impl.CISApplicationFactory.initialize(CISApplication
        at com.lowes.ipt.edi.processor.CISApp.initialize(CISApp.java:48)
        at com.lowes.ipt.edi.processor.EDItoEDAMUploadProcessor.main(EDItoEDAMUp
Caused by: java.lang.ClassNotFoundException: com.stellent.cis.support.spring.Res
        at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
        ... 11 more

Update: There is only one jar file I have that deals with CIS. I have looked in the jar and there is no class within. I am unfamiliar with any other RAD default classes that have CIS classes. This is not only happening for this class but also for a class that is contained in the webservices.jar. I can see the class and it is part of my class path because when I remove the Jar from the path, it complains about another missing class. When I place it back in my path, it gets further in the program and gives the same error.

A: 

The missing class is probably in some JAR file that is installed on your local machine and not on the remote machine. Or more likely - it is installed in the remove machine in a different location then in your local machine (which is expected if the remote machine is a Unix machine and your local is a Windows box).

The classpath set in the MANIFEST.MF file in the JAR that you build must specify the classpath for finding all related JARs on the remote machine - you have to find where that JAR is installed and then add that path to the manifest classpath. JARs in Unix machines are often installed in /usr/share/java but I can't tell you more then that because I'm not familiar with CIS and I don't know what JAR files it normally distributes.

Guss
A: 

There is only one jar file I have that deals with CIS. I have looked in the jar and there is no class within. I am unfamiliar with any other RAD default classes that have CIS classes. This is not only happening for this class but also for a class that is contained in the webservices.jar. I can see the class and it is part of my class path because when I remove the Jar from the path, it complains about another missing class. When I place it back in my path, it gets further in the program and gives the same error.

A: 

The issue was caused by the permissions on the tmp directory in UNIX. The CIS API uses the tmp directory to create and store needed files/classes for execution. Because I was running the process under my own ID, it was unable to access the tmp files that were created by the wsadmin. To resolve the issue, the process has to be ran as wsadmin.

kendal Brooks