Classpath issues

I am trying to set a classpath in Weblogic 8.1 <-- (I think) for some .jar files I need access to in an appserver running on top of weblogic. When I tried setting the classpath thorugh the remote start tab of this managed server, it threw an error, I think my syntax. I did the same thing through a command script and it works great... for about 10-15 min. Then it shuts down and if I use the script, that is the horrid cycle. If I use the console to start it up, it loses my classpath but stays on. I tried turning off the auto restart to see if it was trying to synch and breaking but that didn't work, any ideas? I have only been on weblogic a couple of days so please keep it simple if you could. I tried to RTFM, but the documentation is overwhleming if nothing else.
Thanks so much for any info and the patience for the slow girl!
Va.

I found in the log that I am getting an UnsupportedClassVersionError which turns into a servlet which eventually shuts the entire server instance down? Does that sound right at all?
But I took the class out and sure enough, the server is still up.
How can I make my own classes and avoid this? Am I missing something in my class code?
Thanks for any help!
Va.

Similar Messages

  • [svn:bz-trunk] 18389: Eclipse Project Classpath issues:

    Revision: 18389
    Revision: 18389
    Author:   [email protected]
    Date:     2010-11-01 03:49:03 -0700 (Mon, 01 Nov 2010)
    Log Message:
    Eclipse Project Classpath issues:
    - Fixing class path entries.
    - Instead of jars pointing to the actual projects.
    Modified Paths:
        blazeds/trunk/development/eclipse/projects/java/blazeds-proxy/.classpath
        blazeds/trunk/development/eclipse/projects/java/blazeds-team.war/.classpath

    Figured out that it was failing while building a product for MacOS. I updated Tycho to use version 0.15.0 and all work well.
    For more information on the bug (case sensitive file systems) see:
    bugs.eclipse.org/bugs/show_bug.cgi?id=349877

  • ADF data control classpath issue

    Hi,
    when I am trying to create a jmx connection as part of adf jmx data control using jdeveloper 11.1.2.2.0.
    As part of jmx connection I am providing websphere server 9.7 fp25 connection (installed in the same machine) details and when I click on test connection in the data control wizard getting the following error
    Connection failed:
    java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.websphere.naming.WsnInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.websphere.naming.WsnInitialContextFactory]
    I guess it is a classpath issue. If it is, where can I provide the class path for data control? or something else I have to do?
    I found the above missing class is available in  /scratch/was/IBM/Websphere/AppServer/runtimes/com.ibm.ws.admin.client_7.0.0.jar
    Please suggest.
    thanks in advance,
    cdhar

    repost. Any pointers to documentation would be great!

  • Classpath issue in a Weblogic environment with separate apps

    I am seeing class definition and/or class version errors relating to the classloader with regarding to some of the JOS support classes that Hibernate/Spring uses, such as Jakarta commons logging, as an example. Our situation is that we have two applications that call each other. Each use Hibernate to do persistence to their own databases. Intermittently, I see these errors when I have the hibernate.jar and the supporting .jars in each application's app-inf/lib's. However, if I move the .jars to the server classpath then the issues go away.
    This configuration is not optimal because one application may use a latter version of the .jars and then this would require regression testing for all apps that use Hibernate and the associated .jars on the server.
    In general, I am wondering how others have configured their .jars. Is this something you just have to live with?? Or is there a viable solution to have the .jars live in each application?
    Thanks,
    Lou

    Here's what the error looks like:
    java.lang.ExceptionInInitializerError
    at net.sf.hibernate.util.JDBCExceptionReporter.logWarnings(Ljava.sql.SQLWarning;)V(JDBCExceptionReporter.java:???)
    at net.sf.hibernate.impl.BatcherImpl.closeConnection(Ljava.sql.Connection;)V(BatcherImpl.java:297)
    at net.sf.hibernate.impl.SessionImpl.disconnect()Ljava.sql.Connection;(SessionImpl.java:3352)
    at net.sf.hibernate.impl.SessionImpl.close()Ljava.sql.Connection;(SessionImpl.java:576)
    at org.springframework.orm.hibernate.SessionFactoryUtils.doClose(Lnet.sf.hibernate.Session;)V(SessionFactoryUtils.java:651)
    at org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:640)
    at org.springframework.orm.hibernate.SessionFactoryUtils.access$300(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:86)
    at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCompletion()V(SessionFactoryUtils.java:776)
    at org.springframework.orm.hibernate.SessionFactoryUtils$JtaSessionSynchronization.afterCompletion(I)V(SessionFactoryUtils.java:874)
    at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(I)V(ServerSCInfo.java:853)
    at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions()V(ServerTransactionImpl.java:2708)
    at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping()V(ServerTransactionImpl.java:2606)
    at weblogic.transaction.internal.ServerTransactionImpl.setCommitted()V(ServerTransactionImpl.java:2638)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(II)V(ServerTransactionImpl.java:2436)
    at weblogic.transaction.internal.ServerTransactionImpl.globalCommit()V(ServerTransactionImpl.java:2365)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit()V(ServerTransactionImpl.java:278)
    at weblogic.transaction.internal.ServerTransactionImpl.commit()V(ServerTransactionImpl.java:244)
    at weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:299)
    at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:140)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:110)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;)V(Dispatcher.java:49)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;Ljavax.servlet.ServletConfig;)V(HttpServerHelper.java:713)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServer.java:49)
    at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava.lang.Object;(ServletStubImpl.java:996)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;Lweblogic.servlet.internal.FilterChainImpl;)V(ServletStubImpl.java:419)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax.servlet.ServletRequest;Ljavax.servlet.ServletResponse;)V(ServletStubImpl.java:315)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run()Ljava.lang.Object;(WebAppServletContext.java:6456)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic.security.subject.AbstractSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(SecurityManager.java:118)
    Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.))
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Ljava.lang.String;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:543)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Ljava.lang.String;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:235)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Ljava.lang.Class;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(Ljava.lang.Class;)Lorg.apache.commons.logging.Log;(LogFactory.java:351)
    at net.sf.hibernate.util.JDBCExceptionReporter.<clinit>()V(JDBCExceptionReporter.java:12)
    at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source)
    at jrockit.vm.RNI.trampoline()V(Unknown Source)
    at net.sf.hibernate.util.JDBCExceptionReporter.logWarnings(Ljava.sql.SQLWarning;)V(JDBCExceptionReporter.java:???)
    at net.sf.hibernate.impl.BatcherImpl.closeConnection(Ljava.sql.Connection;)V(BatcherImpl.java:297)
    at net.sf.hibernate.impl.SessionImpl.disconnect()Ljava.sql.Connection;(SessionImpl.java:3352)
    at net.sf.hibernate.impl.SessionImpl.close()Ljava.sql.Connection;(SessionImpl.java:576)
    at org.springframework.orm.hibernate.SessionFactoryUtils.doClose(Lnet.sf.hibernate.Session;)V(SessionFactoryUtils.java:651)
    at org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:640)
    at org.springframework.orm.hibernate.SessionFactoryUtils.access$300(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:86)
    at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCompletion()V(SessionFactoryUtils.java:776)
    at org.springframework.orm.hibernate.SessionFactoryUtils$JtaSessionSynchronization.afterCompletion(I)V(SessionFactoryUtils.java:874)
    at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(I)V(ServerSCInfo.java:853)
    at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions()V(ServerTransactionImpl.java:2708)
    at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping()V(ServerTransactionImpl.java:2606)
    at weblogic.transaction.internal.ServerTransactionImpl.setCommitted()V(ServerTransactionImpl.java:2638)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(II)V(ServerTransactionImpl.java:2436)
    at weblogic.transaction.internal.ServerTransactionImpl.globalCommit()V(ServerTransactionImpl.java:2365)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit()V(ServerTransactionImpl.java:278)
    at weblogic.transaction.internal.ServerTransactionImpl.commit()V(ServerTransactionImpl.java:244)
    at weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:299)
    at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:140)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:110)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;)V(Dispatcher.java:49)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;Ljavax.servlet.ServletConfig;)V(HttpServerHelper.java:713)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServer.java:49)
    at javax.servlet.http.HttpServlet.service(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServlet.java:760)
    Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor()Ljava.lang.reflect.Constructor;(LogFactoryImpl.java:397)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Ljava.lang.String;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:529)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Ljava.lang.String;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:235)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Ljava.lang.Class;)Lorg.apache.commons.logging.Log;(LogFactoryImpl.java:209)
    at org.apache.commons.logging.LogFactory.getLog(Ljava.lang.Class;)Lorg.apache.commons.logging.Log;(LogFactory.java:351)
    at net.sf.hibernate.util.JDBCExceptionReporter.<clinit>()V(JDBCExceptionReporter.java:12)
    at jrockit.vm.RNI.getRunnableCode(I)I(Unknown Source)
    at jrockit.vm.RNI.trampoline()V(Unknown Source)
    at net.sf.hibernate.util.JDBCExceptionReporter.logWarnings(Ljava.sql.SQLWarning;)V(JDBCExceptionReporter.java:???)
    at net.sf.hibernate.impl.BatcherImpl.closeConnection(Ljava.sql.Connection;)V(BatcherImpl.java:297)
    at net.sf.hibernate.impl.SessionImpl.disconnect()Ljava.sql.Connection;(SessionImpl.java:3352)
    at net.sf.hibernate.impl.SessionImpl.close()Ljava.sql.Connection;(SessionImpl.java:576)
    at org.springframework.orm.hibernate.SessionFactoryUtils.doClose(Lnet.sf.hibernate.Session;)V(SessionFactoryUtils.java:651)
    at org.springframework.orm.hibernate.SessionFactoryUtils.closeSessionOrRegisterDeferredClose(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:640)
    at org.springframework.orm.hibernate.SessionFactoryUtils.access$300(Lnet.sf.hibernate.Session;Lnet.sf.hibernate.SessionFactory;)V(SessionFactoryUtils.java:86)
    at org.springframework.orm.hibernate.SessionFactoryUtils$SpringSessionSynchronization.beforeCompletion()V(SessionFactoryUtils.java:776)
    at org.springframework.orm.hibernate.SessionFactoryUtils$JtaSessionSynchronization.afterCompletion(I)V(SessionFactoryUtils.java:874)
    at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(I)V(ServerSCInfo.java:853)
    at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions()V(ServerTransactionImpl.java:2708)
    at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping()V(ServerTransactionImpl.java:2606)
    at weblogic.transaction.internal.ServerTransactionImpl.setCommitted()V(ServerTransactionImpl.java:2638)
    at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(II)V(ServerTransactionImpl.java:2436)
    at weblogic.transaction.internal.ServerTransactionImpl.globalCommit()V(ServerTransactionImpl.java:2365)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit()V(ServerTransactionImpl.java:278)
    at weblogic.transaction.internal.ServerTransactionImpl.commit()V(ServerTransactionImpl.java:244)
    at weblogic.ejb20.internal.BaseEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(BaseEJBObject.java:299)
    at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(Lweblogic.ejb20.internal.InvocationWrapper;Ljava.lang.Throwable;)V(StatelessEJBObject.java:140)
    at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(SyncDispatcher_k1mrl8_EOImpl.java:110)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;)Lcom.bea.wlw.runtime.core.request.Response;(Dispatcher.java:161)
    at com.bea.wlw.runtime.core.dispatcher.Dispatcher.dispatch(Lcom.bea.wlw.runtime.core.dispatcher.DispFile;Lcom.bea.wlw.runtime.core.request.Request;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;)V(Dispatcher.java:49)
    at com.bea.wlw.runtime.core.dispatcher.HttpServerHelper.executePostRequest(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;Ljavax.servlet.ServletContext;Ljavax.servlet.ServletConfig;)V(HttpServerHelper.java:713)
    at com.bea.wlw.runtime.core.dispatcher.HttpServer.doPost(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(HttpServer.java:49)
    Caused by: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
    at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor()Ljava.lang.reflect.Constructor;(LogFactoryImpl.java:385)
    ... 31 more

  • Classpath Issue - but JAR file is in the classpath

    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

    All that script made my eyes glaze over, but it appears you are running your main class from an executable jar file. Is that correct? Executable jar files don't use the classpath. If you want them to refer to anything outside the executable jar, you have to put Class-Path entries in its manifest.

  • WEB-INF/classes not in classpath issue - bug or specification?

    I've noticed BC4J expects some of its configuration files to be present in the standard classpath or the application.
    However, when running web-apps, the WEB-INF/classes are used for loading classes by the JVM, but they are not in the classpath literaly which causes BC4J not to find its metadata files - this has caused many people to be confused because they believed (like me) that the /classes folder is just another part of the classpath.
    But someone has to solve this! After all, if I have a million web-apps, I (as a BC4J user) do not want to include a million JAR files in the classpath. I want to put the JAR in the classes directory and have BC4J find it automatically since its part of the web-app's classes, jars/zips and such.
    The question is, is this a BC4J issue (not finding the files) or a Java Specification issue? and if this is a mere BC4J issue, why won't Oracle provide a small patch for BC4J (simply release an updated JAR/ZIP file)? Or instead, put it in BC4J release notes (unless its already there and I've missed it..) so that customers won't have to spend/waste valuable time trying to understand.
    Regards to all,
    Arik Kfir.

    Originally posted by Arik Kfir ([email protected]):
    I've noticed BC4J expects some of its configuration files to be present in the standard classpath or the application.
    However, when running web-apps, the WEB-INF/classes are used for loading classes by the JVM, but they are not in the classpath literaly which causes BC4J not to find its metadata files - this has caused many people to be confused because they believed (like me) that the /classes folder is just another part of the classpath.
    But someone has to solve this! After all, if I have a million web-apps, I (as a BC4J user) do not want to include a million JAR files in the classpath. I want to put the JAR in the classes directory and have BC4J find it automatically since its part of the web-app's classes, jars/zips and such.
    ===========================================
    If I understand you correctly, it sounds like you need to put the bc4j .jar files in the /j2ee/home/lib directory...by placing a jar file there, it becomes available to all web applications running inside OC4J...
    does that solve your problem?
    regards,
    Mike Conway
    UNC Chapel Hill

  • Classpath issue for Derby DB

    Hi,
    I'm having issues with a classpath. I've made an rmi chat app running on tomcat 5. I started using Derby recently but I'm having problems with where to place the derby.jar or how to specify the classpath for it.
    I've tried:
    CLASSPATH=.;%DERBY_HOME%\lib\derby.jarI also tried putting the derby.jar file in the bin directory and in commons/lib in tomcat and chat/lib (my own folder) but again no luck. I've also tried other options of the classpath but nothing.
    The java code for the Class.for... is:
        public static Connection getConnection()
            dbURL = "jdbc:derby://localhost:1527/dsChatTestDB;create=true;user=admin;password=admin";
            try
    *Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();*
                // Get a connection
                conn = DriverManager.getConnection(dbURL);
            catch(ClassNotFoundException cNFEx)
              .....I tried out a test app (non rmi or tomcat) in eclipse using the same connection strings above and they work fine.
    Can anyone help on where to put the jar file or what classpath to specify. Tis wrecking my head :D
    Thanks,
    Brian
    Edited by: Rebels_Mascot on 07-Mar-2008 01:34

    Hey ejb,
    Well I can't be a 100% sure but when I had <b>set classpath=%DERBY_HOME%\lib\derby.jar</b> it didn't work and as soon as I changed from that classpath to the java classpath, it worked fine.
    I have all the commands in a bat file:
    'originally - set classpath=%DERBY_HOME%\lib\derby.jar
    set CLASSPATH=
    del Chat.jar
    rd /S /Q .\chat\bin\ds
    javac -d .\chat\bin chat\src\ds\rmi\client\*.java
        chat\src\ds\rmi\common\*.java
        chat\src\ds\rmi\common\domain\*.java
        chat\src\ds\rmi\factory\*.java chat\src\ds\rmi\server\*.java
        chat\src\ds\rmi\server\services\*.java
        chat\src\ds\rmi\server\services\persistence\*.java
    jar cvf  Chat.jar .\chat\bin .\chat\policy
    rmic -classpath .\chat\bin -d .\chat\bin ds.rmi.server.ChatServerImpl
    start rmiregistry
    start rmid -J-Djava.security.policy=.\chat\policy &
    pause
    start java -cp .\chat\bin;.\chat\lib\derby.jar;.\chat\lib\derbyclient.jar
      -Djava.rmi.server.codebase=http://localhost:8080/dschatActivate/chat/bin/
      -Djava.security.policy=chat\policy ds.rmi.server.Server&
    rmic -classpath .\chat\bin -d .\chat\bin ds.rmi.client.ClientUII tried a few variations with the set classpath by putting the derby.jar file in different locations, e.g. chat/lib and changing the classpath to there but that didn't work either.
    Thanks,
    Brian
    Edited by: Rebels_Mascot on 08-Mar-2008 01:39

  • Classpath issues inside custom component

    Hi Forum,
    we have created our own component for a special database task.
    Within the the component implementation we have used XMLBeans 2.4.
    Now we run into a classloader issue because LC already contains a very old version of XML Beans (from 2004).
    Is there a way to have our own classloader that uses the new XML Beans version instead of the already existing one?
    We have planned to migrate several other components to be available inside Workbench and I'm afraid we will run into the same problem several times.
    Thank and best regards,
    Timo

    Timo,
    If you would like to override the classpath then I would suggest you to put your version of the XMLBeans jar file while making a component jar file and override the classpath in your service java class.
    See if that help.
    Thanks
    YogLC
    component.xml file defines service impl class as below
    <services>
    <service name="MY_Service">
    <!-- service implementation class definition -->
    <implementation-class>com.company.component.MYServiceImpl</implementation-class>
    package com.company.componen;
    public class MYServiceImpl{
         public void myServiemethod(){
              // first line in your service method
              ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader();
              //--- your code here ---
              // finally make sureset the classloader back
              if (originalClassloader != null) {
                   Thread.currentThread().setContextClassLoader(originalClassloader);

  • Classpath issue with .war files on iPlanet 6.0

    Hi there,
    I'm using iPlanet 6.0 Web Server (SP1, I think), and I have an issue.
    We deploy a .war file as per normal. We go to the URL, and get a 500 error. Checking the error file gives us the following error (the application name has been blanked out with #####, and the server's domain name with <server>, but the actual package names remain -- they are libraries from ESRI):
    [08/Jul/2003:13:27:20] info ( 2705): Internal Info: loading servlet /#####/index.jsp
    [08/Jul/2003:13:27:21] info ( 2705): JSP: JSP1x compiler threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP/opt/iplanet/servers/https-<server>/c
    onfig/../ClassCache/_jsps/_#####/_index_jsp.java:15: Package com.esri.aims.mtier.io not found in import.
    import com.esri.aims.mtier.io.*;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:16: Class com
    .esri.aims.mtier.model.map.layer.FeatureLayer not found in import.
    import com.esri.aims.mtier.model.map.layer.FeatureLayer;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:17: Class com
    .esri.aims.mtier.model.envelope.Envelope not found in import.
    import com.esri.aims.mtier.model.envelope.Envelope;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:18: Class com
    .esri.aims.mtier.model.acetate.Point not found in import.
    import com.esri.aims.mtier.model.acetate.Point;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:19: Class com
    .esri.aims.mtier.model.map.layer.query.Filter not found in import.
    import com.esri.aims.mtier.model.map.layer.query.Filter;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:20: Class com
    .esri.aims.mtier.model.map.layer.renderer.symbol.SimpleMarkerSymbol not found in import.
    import com.esri.aims.mtier.model.map.layer.renderer.symbol.SimpleMarkerSymbol;
    ^
    /opt/iplanet/servers/https-<server>/config/../ClassCache/_jsps/_#####/_index_jsp.java:21: Class com
    .esri.aims.mtier.model.map.Map not found in import.
    import com.esri.aims.mtier.model.map.Map;
    ^
    7 errors
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
    at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:252)
    at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
    at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:416)
    [08/Jul/2003:13:27:21] warning ( 2705): Internal error: Failed to get GenericServlet. (uri=/#####/index.jsp,SCRIPT_NA
    ME=/#####/index.jsp)
    Hopefully that is readable -- basically, it can't find a bunch-o-classes. Now, normally, I would snicker, and say something smart about classpaths. However, I have already done this, and looked in all the places that I think should have these classes in (I shall just use the last eg, com.esri.aims.mtier.model.map.Map, rather than all of them):
    # find /home/websites/#####/ |grep com.esri.aims.mtier.model.map.Map
    /home/websites/#####/WEB-INF/classes/com/esri/aims/mtier/model/map/Map.class
    # jar tvf /home/websites/#####/WEB-INF/lib/arcims_jconnect.jar |grep com.esri.aims.mtier.model.map.Map
    33267 Wed Dec 04 15:50:14 GMT+09:30 2002 com/esri/aims/mtier/model/map/Map.class
    So, as you can see, the relevant files are in not just one, but two places that I had assumed were in the classpath. Judging from the error messages, they are not. Am I doing something wrong here?
    Here's some of the config...
    The relevant line from web-apps.xml:
    <web-app uri="/#####" dir="/export/home/websites/#####" enable="true"/>
    The classpath from jvm12.conf:
    jvm.classpath=/opt/iplanet/servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar
    That's all that I can find that is relevant. Please ask if there is anything else I can give you (apart from access to the server or the application -- I can't give that).
    Any ideas?

    The solution was to download the DTD file and change
    the URL to a file: link, so iPlanet could
    successfully use the DTD. Did you have to define the file link as an absolute path? Or where you able to use a relative link.? If so, can you please provide the full syntax?
    We faced a similar problem and after much trial and error ended up placing the DTD on the server in /usr. But we'd like to try and find a way to define a relative file path and put the DTD right in the WEB-INF directory (or somewhere similar) so that we have one less configuration hassle and platform/server independence (i.e. the war file has everything it needs). But we have not been able to determine a way of doing this.
    Thanks

  • Manifesting Classpath Issues + Ant

    Having some problems with classpath and manifest file.
    I'm using ant to build manifest in jar. The classpath seems to be set OK in the manifest.
    I include an external jar(log4j) in my app jar, and it seems to go in the correct place in my app jar(lib directory).
    The manifest file seems to be created OK, and is put in the MANIFEST-INF directory in app jar.
    I can compile and build everything OK.
    The main issue is that at runtime, it does not seem to pickup the log4j jar. I get a NoClassDefFoundError when trying to create a Logger class.
    Any help would be appreciated. I will include relevant information below.
    ant stuff          <jar jarfile="${dist}/lib/mosaixsegment8-${DSTAMP}.jar" basedir="${build}">
                   <manifest>
                        <attribute name="Built-By" value="${user.name}"/>
                        <attribute name="Main-Class" value="com.company.TestClient"/>
                        <attribute name="Class-Path" value="lib/log4j-1.2.8.jar"/>
                   </manifest>
              </jar>
    Manifest File CreatedManifest-Version: 1.0
    Ant-Version: Apache Ant 1.5.4
    Created-By: 1.4.2_01-b06 (Sun Microsystems Inc.)
    Built-By: user
    Main-Class: com.company.TestClient
    Class-Path: lib/log4j-1.2.8.jar
    Code Snippitimport org.apache.log4j.Logger;
    public class TestClient{
         public static void main (String argv [])
              // Get Logger
              org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger("name");
    Error Message
    [java] java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    [java] at com.company.TestClient.main(Unknown Source)
    [java] Exception in thread "main"
    [java] Java Result: 1

    pkwooster,
    If there are complex solutions then the problem must be complex and perhaps I did not understand the problem (it takes a few hits on my head for the problem domain to get cleared up :). Reason I say this is because my problem is not complex & neither is the solution.
    What I have is this:
    1. Manually created (I know ANT does this; but I didn't use ant; I used a sh script) the MF file with just the Class-Path defined.
    Here is the MF entry from my standalone application (it is really a messaging application):
    Class-Path: log4j-1.2.7.jar bta_notify-facade-client.jar bta_notify-ex
    ception.jar bta_notify-vo.jar
    2. IN my sh script I use the following command to create my jar:
    jar cvfm $BTA_ADAPTER_JAR_OUT \
         meta-inf/adapter-manifest.mf \
         $BTA_ADAPTER_CLASSES/*.class \
         $BTA_EXCEPTION_CLASSES/*.class \
         $BTA_MESSAGE_CLASSES/*.class \
         $BTA_VO_CLASSES/*.class \
         $BTA_GRAIN_BEAN_CLASSES/*.class \
         -C $BTA_SRC_CONFIG_DIR log4j.xml \
         -C $LOG4J_DIR $LOG4J_JAR
    (the BTA_EXCEPTION_CLASSES & BTA_VO_CLASSES are not the same as the jars mentioned in the mf classpath).
    That is all that I did. The adapter.jar contains log4j.jar (without the path) & the mf (meta-inf/ as the path).
    I did something very similar on a j2ee app that is deployed as an EAR file in weblogic. That is where I have ear containing jar1 which contains log4j, other jars & jar1's mf which lists these contained jars (log4j & others) in its classpath.
    I presume my problem & the problem that is being solved by these other complex solutions are not the same.

  • JavaCompiler classpath issue

    Hello,
    I'm writing a maven annotation parser plugin which should be able to parse java files for any annotations, and then starts the given annotation in phase generate-sources (greetings to the Maven community ^_^).
    OK, but as you might guess already: something is not working as expected. Currently, the JavaCompiler that I keep using tells me that it can't find the processor. But funnily it can compile my given test class with all annotations that are bundled in the same jar the processor is in.
    It seems that there is a classloading issue. Can you give me some hints how the JavaCompiler makes use of the -cp param?
    Regards,
    Dirk

    I found out what the problem was here. It wasn't with the RMI Registry classpath. The problem was with the webserver I was using to serve the classes - it needs to be started from folder containing the root package for the Java classes so that it can find the Java class when requested for it.
    I was using these commands, which were throwing an exception:
    <tt>
    * C:>rmiregistry
    * E:\RMI-EXAMPLE-2>java -cp classes core.java.book.chpt10.example.NanoHTTPD 8080
    * E:\RMI-EXAMPLE-2>java -cp classes -Djava.rmi.server.codebase=http://localhost:8080/ core.java.book.chpt10.example.WarehouseServer
    </tt>
    This makes sense to me now as to why it as throwing an exception.
    * The webserver was being requested for the class <tt>core.java.book.chpt10.example.Warehouse</tt>
    * The webserver was started from the directory E:\RMI-EXAMPLE-2, so it used this as its root directory to start looking for the class.
    * This meant that the webserver was looking for the Warehouse.class file in the following location E:\RMI-EXAMPLE-2\core\java\book\chpt10\example , when the actual class file was located in the following directory E:\RMI-EXAMPLE-2\classes\core\java\book\chpt10\example
    But when I switch to these commands, they run successfully:
    <tt>
    * C:>rmiregistry
    ** E:\RMI-EXAMPLE-2\classes>java -cp . core.java.book.chpt10.example.NanoHTTPD 8080*
    * E:\RMI-EXAMPLE-2>java -cp classes -Djava.rmi.server.codebase=http://localhost:8080/ core.java.book.chpt10.example.WarehouseServer
    </tt>
    Notice that I am now running the webserver from the directory that is the root location of my Java classes\packages.

  • HELP! Jdbc connection to oracle ClassNotFoundException classpath issues..

    Okay I am a newbie to this but all the other posts concerning this just say add the classes12.jar to my classpath.
    I am using websphere 5.0
    connecting to a 9i db.
    after trying to find out what my classpath is ( websphere 5.0 makes it difficult to see it) i found this:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="var"
    path="SERVERJDK_50_PLUGINDIR/jre/lib/rt.jar"
    rootpath="SERVERJDK_SRCROOT" sourcepath="SERVERJDK_50_PLUGINDIR/src.jar"/>
    <classpathentry kind="src" path="Java Source"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/j2ee.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/servletevent.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/ivjejb35.jar"/>
    <classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/runtime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/string.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxen-full.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/utility.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jspsql.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xercesImpl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/xalan.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/datetime.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/mailer.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dom.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jstl.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/standard.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jdbc2_0-stdext.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/saxpath.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/sax.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/dbbeans.jar"/>
    <classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxp-api.jar"/>
    <classpathentry kind="lib" path="C:/oracle/ora92/jdbc/lib/classes12.jar"/>
    <classpathentry kind="output" path="Web Content\WEB-INF\classes"/>
    </classpath>
    to me it looks like it is in my classpath.. (if thats what this is).
    I have imported the classes12.jar file several times through out my project to no avail.
    the error i get it here:
    Error: It Screwed up agian java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    SystemOut O Connecting ... cisinv
    Error: java.sql.SQLException: No suitable driver
    SystemErr R Exception: null
    from this code:
    package Business;
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    * @author jeffreak
    * To change this generated comment edit the template variable "typecomment":
    * Window>Preferences>Java>Templates.
    * To enable and disable the creation of type comments go to
    * Window>Preferences>Java>Code Generation.
    public class beanDbConnect {
         * Constructor for beanDbConnect.
         public beanDbConnect() {
              super();
         private Connection con = null;
         private Statement cmd = null;
         private ResultSet rs = null;
         public Connection connect()
              //Declare variable
              boolean blnSuccessfulOpen = false;
              Driver driver;
              String driverName;
              String serverAddress;
              //Begin try block
              try
                   //Load JdbcOdbcDriver
                   driverName = "oracle.jdbc.driver.OracleDriver";
                                  //oracle.jdbc.driver.OracleDriver     
                   System.out.println("Loading ..." + driverName);
                   //try{
                   Class.forName(driverName).newInstance();
                   //catch (Exception err)
    //                    System.err.println("Error: new instance: " + err.toString());
              System.out.println("Database loaded successfully");
              //catch (ClassNotFoundException e)
              catch (Exception e)
                   System.err.println("Error: It Screwed up agian " + e.toString());
                   blnSuccessfulOpen = false;
              try
                   //Instantiate connection to bean-defined DSN
                   //serverAddress = ("jdbc:oracle:thin:scott/tiger@localhost:1243:" + dbInstance);
                   System.out.println("Connecting ... " );
                   String serverName = "**********";//changed for post
                   String portNumber = "1521";
                   String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + "cisinv";
                   con = DriverManager.getConnection(url, "scott", "tiger");
                   System.out.println("Ready.");
                   blnSuccessfulOpen = true;
              catch (SQLException e)
                   System.err.println("Error: " + e.toString());
              //End try block
              return con;
         }//end connect()
    Please help. ive been working on it for days =(.

    If you're running a Web app, put all JARs that your app needs in the WEB-INF/lib directory. That's always in the CLASSPATH.
    I don't know WebSphere. Do you really have to edit something to add all those CLASSPATH entries?
    In Tomcat, all I'd have to do is put a WAR file in the webapps directory.
    Your code needs some work. You're not following Sun's Java coding standards. Capitalize your class name, for starters.
    Is the username and password for your database still "scott" and "tiger"? Nice security there.
    Your connect method makes a database connection. Do you leave it to users to close it? (You do close your connections when you're done with them, don't you?)
    I'd make Connection a data member and create it in a constructor. I'd write a close method to close it up.
    Doesn't WebSphere do connection pooling? Do you really want to write your own class to handle this?
    MOD

  • Weird classpath issue in EAR.Some classes can access jars that others cant!

    Hi,
    I'm experiencing a very frustrating problem that's proving to be a bit of a show stopper for me. I would really appreciate some help...
    I have an EAR deployed successfully on Sun Appserver 8 which passes the tests from the sun EAR verifier tool. The ear contains a jar file that I built which has a stateless session bean, home, remote interfaces and rmi stubs, deployment descriptors, as well as some utility classes. The EAR also contains some third-party jars such as Hibernate, Log4-j, apache-commons etc etc. The jar I built has in it's manifest file, the classpath information to reference the other jars in the ear.
    The problem I am having is that one of the classes in a third-party jar (hibernate3.jar) cannot see a class in another of the third party jars (log4j-1.2.8.jar) and as a result is throwing a NoClassDefFoundError for org/apache/log4j/Layout while trying to initialise - the two jars are at the root of the EAR.
    Furthermore, my utility classes can access and use Log4j classes without any problem and logging command from those classes is output successfully to the server console. However, my session bean, which is packaged in the same jar as the utility classes, fails to log anything even though it uses exactly the same logger and log configuration as the utility classses.
    I have tried adding classpath information to the manifest of the EAR so that the third-party jars can pick it up but this makes no difference. Also, according to the EAR verifier tool, you are not allowed to put any classpath information in the EAR manifest.
    I have also tried deploying this in weblogic but am experiencing the same problem.
    If anyone can offer any advice or solutions I would greatly appreciate it.
    :)

    what´s type error have you?
    perhaps external libraries (located in classpath) invoke opsCommon.jar and config-3.0.jar classes. then, classnotfound is normal.
    and... why separate external libraries (opsCommon.jar and config-3.0.jar inside ear, and other in classpath)?

  • Classpath issues when executing from a jar

    I have a jar that I built for an RMI server that has a need to access another jar. (log4j). I run the jar from the command line using:
    java -jar -Djava.rmi.server.codebase=my.jar my.jar
    and the code runs fine but when I try to add in the log4j.jar I can't find it. I have placed it in my.jar in a lib directory within my.jar, I have placed it in the current directory, I have placed it in other directories I know are on the classpath, I have done all kinds of variations with the -classpath switch on the command line and nothing works.
    How do I package, configure and/or call such that the Logger class in log4j.jar can be found by my RMI server when I execute my.jar?
    Thanks

    Running from the jar-file ignores the CLASSPATH. See Bug #4459663
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4459663
    You have a few options:
    First, you can unjar all of the jars you depend on and rejar 'em up with your jar. This is the simplest solution.
    Second, you can skip running "from the jar" and just put that jar in your CLASSPATH.
    Third, you can put jars you depend on in the $JAVA_HOME/jre/lib/ext directory.
    Fourth, you can modify the manifest to specify a classpath, and then put the libraries you depend on at the places specified.
    And, if you think There Ought To Be A Better Way, vote for the RFE!

  • Runtime classpath issue -- NoClassDefFoundError

    Hi,
    It shames me to post such a common, everyday problem, but I cannot figure this one out.
    I have a class in the package service: service.SynchImage. I have a class in another package as well: vigra.matlab.LOTFClient. In LOTFClient, I am importing service.SynchImage and trying to instantiate it.
    All my source code compiles successfully.
    When I try to run my program, I get a NoClassDefFoundError telling me it cannot find service/SynchImage.
    This is how I am trying to use service.SynchImage (from LOTFClient):
    package vigra.matlab;
    import service.SynchImage;
    public final class LOTFClient implements Runnable {
        private static byte[] in;
        public void run() {
            try {
                if (imAq == null) { //imAq is not relevant
                    throw new Exception("Proxy to LOTFVigra is invalid");
                } else {
                    System.out.println("Connection to LOTFVigra service successful");
                    in = imAq.acquireImage();
                    SynchImage si = new SynchImage(in, 640, 480);
            } catch (Exception e) {
                System.err.println(e.getMessage());
    }Again, this DOES compile successfully. Here is how I am running this class:
    package vigra.matlab;
    public class LOTFDriver {
         public static void main(String[] args) {
              LOTFClient client = new LOTFClient();
              Thread thread = new Thread(client);
              thread.start();
    }Alrighty. I'm using an Ant build script to compile all this. In my build script, I set the classpath to the appropriate directories, as follows:
         <!-- Define the Java classpath -->
         <path id="classpath">
              <pathelement location="${CATALINA_HOME}/webapps/kdb/WEB-INF/classes" />
              <pathelement location="/u/dgresh/Ice-3.1.0/lib/Ice.jar" />
         </path>
         <!-- Compile the Java code -->
         <target name="compile" depends="init">
              <javac srcdir="${src}" destdir="${build}">
                   <classpath refid="classpath" />
              </javac>
         </target>When I browse to $CATALINA_HOME/webapps/kdb/WEB-INF/classes I see the "service" package there. When I browse inside the package, I see "SynchImage.class" there. I found a duplicate "service" package that did not contain the SynchImage.class file and deleted it, but I still get the error.
    Is there anything else I should be checking for? What on earth am I missing? It must be something incredibly obvious, but what is it?
    Oh, here is SynchImage, if it matters:
    package service;
    import java.awt.image.BufferedImage;
    public class SynchImage {
         private static byte[] input;
         private static int width;
         private static int height;
         public SynchImage(byte[] input, int width, int height) {
              this.input = input;
              this.width = width;
              this.height = height;
              ImageProcessor.createAndSaveImage(input, width, height);
         public static BufferedImage fetchImage() {
              return ImageProcessor.createImage(input, width, height);
    }Thanks

    Okay, I'm now very confused.
    In $CATALINA_HOME/webapps/kdb/WEB-INF/classes I was building my project to "LOTFVigra/$project", and the service package to "classes".
    If I don't build it to LOTFVigra/vigra/matlab/*.class and simply build it to CATALINA_HOME/webapps/kdb/WEB-INF/classes/vigra/matlab/*.class, it will run. Why on earth would this occur?

  • [Sun Studio 11] Classpath issue: com.mysql.jdbc.Driver not found

    Greetings !!
    I'm trying in an Applet to connect to a mysql database but the Applet fails everytime.
    It works perfectly in console environnement with the same javaconnector.
    I read this:
    +Classpath. Specifies the path to the classes that the IDE uses. By default the IDE uses its internal class path, which includes all mounted filesystems and various directories in the IDE's installation and user directories. The IDE ignores your CLASSPATH environment variable. Click the ellipsis button to display a property editor in which you can change the class path settings.+
    So my CLASSPATH environnement variable is passed by (as I redoubted) but I don't know why even specifying classpathes in Options/Building/Compiler Types/internal compilations/expert/class path the I got the same behaviour from the Applet... is there another way to specify that this Driver* is located in */usr/share/java/mysql-connector-java-5.1.7-bin.jar* ??
    I also added the jar files in Options/IDE configuration/System/File System settings/java librairies but same behaviour again... but when compiling the output windows indicates that it has finished jdbc... that's all, the Applet still can't open a connexion with the mysql server...
    Can somebody could explain to me how set up the IDE to use this javaconnector in order to connect to the mysql database ?
    Thank you for your time...
    Hurukan

    This forum is about the tools provided with Sun Studio, the development system for C, C++, and Fortran programming.
    Since your question is about Java, you are more likely to get a helpful answer in a Java forum. Go to forums.sun.com, and look under the Java heading.
    Or if your question is about Netbeans, try a forum at netbeans.org

Maybe you are looking for

  • Archiving AVCHD Video

    All, I am a complete newbie to Video so please do not be frustrated with my question. I am using a Panasonic HS700 in 1920x1080 in maximum resolution mode 1080p/60. I understand that the files are not directly importable into imovie11 and I have purc

  • Error in Creating Outgoing Inovice

    Dear All While saving the general billing dcoument by VF01 for excise invoice to be carried out; the system gives the follwoing message: "Print Excise Invoice in Series grp D1 using J1IP for billing document #...." while trying to retrieve the billin

  • ADF selectmanylistbox with horizontal scrollbar

    <af:selectManyListbox value="#{tree.lstValus}" size="10" inlineStyle="width:260px"> I have that, if I have more then values 10. a vertical scrollbar will be shown.But in case a value is larger then the selectmanylistbox no horizontal scrollbar shows

  • Urgent :How to Start the JavaBean in the start up of Tomcat Server

    Hi All 1. I need JavaBeans to be Started at the time of Starting of the Tomcat Server where i am Storing some global Database values in Hashtable collection. 2. I dont want to show the full address like http://domain.com:8080/mypath/jsp/file.jsp how

  • Elements 6 to 8 - lost tags and ratings

    I was running Elements 6 on my old computer with over 6000 photos tagged and rated.... the computer died and I had the hard drive removed. I installed Elements 8 (trial version) on my new computer and copied over all the photos from my old drive. The