| Author |
Classpath Issue - but JAR file is in the classpath
|
lisa phillips
Greenhorn
Joined: Feb 19, 2003
Posts: 7
|
|
I'm having an issue getting a JAVA Application Client to run and would welcome any suggestions or input to resolve this problem. I'm not a developer, just the builder/deployer of the applications. There are two developers looking at this problem too, but they are stumped too. It complains that it can't find sun/jdbc/rowset/CachedRowSet, which is contained in the rowset.jar - which is in the classpath. I've put all the supporting information below, if you need additional information please let me know and I'll provide it. ***** ERRORS FROM RUNNING SCRIPT BELOW ***** *** NOT Using Verbose: *** Exception in thread "main" java.lang.NoClassDefFoundError: sun/jdbc/rowset/CachedRowSet *** Using Verbose (only included the output with the error): *** [Loading superclasses of com/actuate/schemas/SubmitJobResponse] [Loaded java.sql.SQLException from /usr/java130/jre/lib/rt.jar] [Loading superclasses of java/sql/SQLException] [Signaling in VM: java/lang/NoClassDefFoundError, message: sun/jdbc/rowset/CachedRowSet] Exception in thread "main" java.lang.NoClassDefFoundError: sun/jdbc/rowset/CachedRowSet[Loaded sun.i o.UnknownCharacterException from /usr/java130/jre/lib/rt.jar] [Loading superclasses of sun/io/UnknownCharacterException] [Preparing sun/io/UnknownCharacterException] ***** SCRIPT TO RUN THE JAVA COMMAND ***** #!/usr/bin/ksh # # LIBDIR="/actuate/Mace/lib" JAVA_CP="" MAIN_JAR="MaceEXT.jar" JAVA_PATH="/usr/java130/jre/bin" JAVA_HOME="/usr/java130/jre" JAVA_FULLVERSION=`$JAVA_PATH/java -fullversion` ###################################################### JAVA_EXE=${JAVA_HOME}/bin/java PATH=$JAVA_PATH:$PATH export PATH export JAVA_HOME JAVA_CP="${LIBDIR}/sljcx.jar" JAVA_CP="${LIBDIR}/sljc.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/rowset.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/wsdl4j.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/tt-bytecode.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/servlet.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/saaj.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/log4j-1.2.4.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/jaxrpc.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/commons-logging.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/axis.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/ivjejb35.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/j2ee.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/activation.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/mail.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/ns.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/xmlParserAPIs.jar":${JAVA_CP} JAVA_CP="${LIBDIR}/xercesImpl.jar":${JAVA_CP} JAVA_CP="$JAVA_HOME/lib/rt.jar":${JAVA_CP} echo "" echo "Classpath" echo $JAVA_CP echo "" echo "JAVA_Home" echo $JAVA_HOME echo "" echo "JAVA_EXE" echo $JAVA_EXE echo "" echo "JAVA_Path" echo $JAVA_PATH echo "" echo "JAVA FullVersion" echo $JAVA_FULLVERSION #$JAVA_EXE -cp $JAVA_CP -jar $MAIN_JAR -h dev -c adduser -u 000 -p "" $JAVA_EXE -verbose -cp $JAVA_CP -jar $MAIN_JAR -h dev -c adduser -u 000 -p "" ***** JAR -tvf OF ROWSET.JAR ***** server105:/actuate/Mace/lib $ jar -tfv rowset.jar 0 Tue Jun 13 19:45:42 EDT 2000 META-INF/ 66 Tue Jun 13 19:45:42 EDT 2000 META-INF/MANIFEST.MF 0 Tue Jun 13 19:45:30 EDT 2000 sun/ 0 Tue Jun 13 19:45:30 EDT 2000 sun/jdbc/ 0 Tue Jun 13 19:45:42 EDT 2000 sun/jdbc/rowset/ 551 Tue Jun 13 19:45:30 EDT 2000 sun/jdbc/rowset/BaseRow.class 9112 Tue Jun 13 19:45:32 EDT 2000 sun/jdbc/rowset/BaseRowSet.class 35562 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/CachedRowSet.class 597 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/ColInfo.class 1290 Tue Jun 13 19:45:36 EDT 2000 sun/jdbc/rowset/InsertRow.class 18442 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/JdbcRowSet.class 2109 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/Row.class 4489 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetMetaDataImpl.class 4707 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetReaderImpl.class 8270 Tue Jun 13 19:45:38 EDT 2000 sun/jdbc/rowset/RowSetWriterImpl.class 4745 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SQLInputImpl.class 3287 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SQLOutputImpl.class 2326 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialArray.class 1560 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialBlob.class 1948 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialClob.class 592 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialRef.class 2419 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/SerialStruct.class 1903 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/WebRowSet.class 257 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReader.class 15620 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReaderDocHandler.class 2029 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlReaderImpl.class 258 Tue Jun 13 19:45:40 EDT 2000 sun/jdbc/rowset/XmlWriter.class 9797 Tue Jun 13 19:45:42 EDT 2000 sun/jdbc/rowset/XmlWriterImpl.class ***** ECHO OF VARIABLES FROM SCRIPT ***** Classpath /usr/java130/jre/lib/rt.jar:/actuate/Mace/lib/xercesImpl.jar:/actuate/Mace/lib/xmlParserAPIs.jar:/ac tuate/Mace/lib/ns.jar:/actuate/Mace/lib/mail.jar:/actuate/Mace/lib/activation.jar:/actuate/Mace/lib/ j2ee.jar:/actuate/Mace/lib/ivjejb35.jar:/actuate/Mace/lib/axis.jar:/actuate/Mace/lib/commons-logging .jar:/actuate/Mace/lib/jaxrpc.jar:/actuate/Mace/lib/log4j-1.2.4.jar:/actuate/Mace/lib/saaj.jar:/actu ate/Mace/lib/servlet.jar:/actuate/Mace/lib/tt-bytecode.jar:/actuate/Mace/lib/wsdl4j.jar:/actuate/Mac e/lib/rowset.jar:/actuate/Mace/lib/sljc.jar:/actuate/Mace/lib/sljcx.jar JAVA_Home /usr/java130/jre JAVA_EXE /usr/java130/jre/bin/java JAVA_Path /usr/java130/jre/bin JAVA FullVersion java full version "J2RE 1.3.0 IBM build ca130-20020504" ***** DIRECTORY LISTING ***** server105:/actuate/Mace $ ls -lat -rwxr-xr-x 1 actuate actuate 1673 Apr 04 09:11 go.sh -rw-r----- 1 actuate actuate 476699 Apr 03 12:37 MaceEXT.jar drwxr-xr-x 2 actuate actuate 4096 Apr 02 10:49 lib -rw-r----- 1 actuate actuate 1818 Mar 28 11:15 MaceConfig.xml server105:/actuate/Mace/lib $ ls -lat -rw-r----- 1 actuate actuate 32033 Apr 02 10:49 ivjejb35.jar -rw-r----- 1 actuate actuate 329096 Apr 02 10:49 j2ee.jar -rw-r----- 1 actuate actuate 374291 Apr 01 16:39 ns.jar -rw-r----- 1 actuate actuate 654326 Apr 01 16:31 sljc.jar -rw-r----- 1 actuate actuate 81987 Apr 01 16:31 sljcx.jar -rw-r----- 1 actuate actuate 54368 Mar 31 08:32 activation.jar -rw-r----- 1 actuate actuate 867459 Mar 31 08:32 axis.jar -rw-r----- 1 actuate actuate 24287 Mar 31 08:31 commons-logging.jar -rw-r----- 1 actuate actuate 32069 Mar 31 08:31 jaxrpc.jar -rw-r----- 1 actuate actuate 378778 Mar 31 08:31 log4j-1.2.4.jar -rw-r----- 1 actuate actuate 305414 Mar 31 08:31 mail.jar -rwxrwxrwx 1 actuate actuate 62388 Mar 31 08:31 rowset.jar -rw-r----- 1 actuate actuate 18468 Mar 31 08:31 saaj.jar -rw-r----- 1 actuate actuate 78350 Mar 31 08:31 servlet.jar -rw-r----- 1 actuate actuate 130773 Mar 31 08:31 tt-bytecode.jar -rw-r----- 1 actuate actuate 109356 Mar 31 08:31 wsdl4j.jar -rw-r----- 1 actuate actuate 933730 Mar 31 08:31 xercesImpl.jar -rw-r----- 1 actuate actuate 78440 Mar 31 08:31 xmlParserAPIs.jar
|
 |
Jon Dornback
Ranch Hand
Joined: Apr 24, 2002
Posts: 137
|
|
is the error occurring at compile time or runtime? i'm not sure if this applies to linux/unix, but on windows the jar files have to also be in the java runtime folder. for example, to add a jar file, the jar file must be in the JAVA_HOME\jre\lib\ext as well as being in the C:\Program Files\JavaSoft\JRE\1.3.1_06\lib\ext I noticed in your class path you added the rt.jar file under the /usr directory, so this might be a good place to start looking. someone wiser than me in the ways of *nix may have better advice.
|
use the [CODE] tags - it makes it much easier for people to help you.
|
 |
lisa phillips
Greenhorn
Joined: Feb 19, 2003
Posts: 7
|
|
The error is at runtime. I'll try what you suggested and let you know. What are [code] tags? Lisa
|
 |
Layne Lund
Ranch Hand
Joined: Dec 06, 2001
Posts: 3061
|
|
Originally posted by lisa phillips: The error is at runtime. I'll try what you suggested and let you know. What are [code] tags? Lisa
There are several buttons below the text area where you type your messages to this board. These all help you enter special kinds of text into your message. One of the buttons says "CODE". When you click on it, it inserts the CODE tags into your message. (If you are familiar with HTML tags, these are very similar. The only difference is that they use [ ] instead of < >.) Once the tags are inserted into your message. Paste your code in between them. The tags change the font and preserve your spacing in order to make your code more readable. Keep coding! Layne
|
Java API Documentation
The Java Tutorial
|
 |
lisa phillips
Greenhorn
Joined: Feb 19, 2003
Posts: 7
|
|
I placed the rowset.jar into the lib/ext directory and got a little further. I then placed all the jar files that were previously in my home dir lib (that is where I pointed to from the classpath) and then it worked! That was great. I later found out that when using the -jar command on the command line it didn't use the classpath. So, all is well and I actually learned a lot with this exercise. Thank you! Lisa
|
 |
 |
|
|
subject: Classpath Issue - but JAR file is in the classpath
|
|
|