Java.lang.NoClassDefFoundError: Weblogic looks for wrong drivers

Hi all,
I have a strange problem with weblogic. I use weblogic7.0 with MS SQLServer database.
All my jdbc related code from anywhere within my web application works without
a problem.
But when I try to access the database as a client using weblogic's datasource(obtained
by JNDI lookup), I get the NoClassDefFoundError. Weblogic seems to be looking
for some Oracle drivers strangely, where as I don't have any thing related to
Oracle at all. It breaks on getConnection() call on data source. My connection
pool and data source are defined properly and I have the JDBC drivers for SQLServer
in weblogic's classpath and also in client's classpath(although not required).
Again, all the database access code within my session beans using the same datasource
works fine. Weblogic server and the client application are running on the same(local)
machine.
Any help would be appreciated.
Thanks in advance.
Vas
Here's the stack trace.
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleStatement
     at java.lang.Class.getMethods0(Native Method)
     at java.lang.Class.getMethods(Class.java:737)
     at weblogic.rmi.utils.Utilities.getRemoteMethods(Utilities.java:382)
     at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:79)
     at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:60)
     at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:637)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:656)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:651)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:59)
     at weblogic.common.internal.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:249)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:134)
     at java.lang.reflect.Method.invoke(Native Method)
     at java.io.ObjectStreamClass.invokeMethod(ObjectStreamClass.java:1610)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:388)
     at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
     at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
     at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:161)
     at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:128)
     at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
     at com.actiontech.jmetro.server.core.DBSession.executeQuery(DBSession.java:109)
     at com.actiontech.jmetro.server.query.NamespaceMappings.loadMappings(NamespaceMappings.java:76)
     at com.actiontech.jmetro.server.query.NamespaceMappings.<init>(NamespaceMappings.java:56)
     at com.actiontech.jmetro.server.query.NamespaceMappings.getInstance(NamespaceMappings.java:50)
     at com.actiontech.jmetro.server.query.NamespaceMappingsTest.testSave(NamespaceMappingsTest.java:21)
     at java.lang.reflect.Method.invoke(Native Method)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     at junit.framework.TestSuite.run(TestSuite.java:203)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:360)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:246)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:146)

Hi all,
I have a strange problem with weblogic. I use weblogic7.0 with MS SQLServer database.
All my jdbc related code from anywhere within my web application works without
a problem.
But when I try to access the database as a client using weblogic's datasource(obtained
by JNDI lookup), I get the NoClassDefFoundError. Weblogic seems to be looking
for some Oracle drivers strangely, where as I don't have any thing related to
Oracle at all. It breaks on getConnection() call on data source. My connection
pool and data source are defined properly and I have the JDBC drivers for SQLServer
in weblogic's classpath and also in client's classpath(although not required).
Again, all the database access code within my session beans using the same datasource
works fine. Weblogic server and the client application are running on the same(local)
machine.
Any help would be appreciated.
Thanks in advance.
Vas
Here's the stack trace.
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleStatement
     at java.lang.Class.getMethods0(Native Method)
     at java.lang.Class.getMethods(Class.java:737)
     at weblogic.rmi.utils.Utilities.getRemoteMethods(Utilities.java:382)
     at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:79)
     at weblogic.rmi.internal.StubGenerator.<init>(StubGenerator.java:60)
     at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:637)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:656)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:651)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:59)
     at weblogic.common.internal.RemoteObjectReplacer.resolveObject(RemoteObjectReplacer.java:249)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:134)
     at java.lang.reflect.Method.invoke(Native Method)
     at java.io.ObjectStreamClass.invokeMethod(ObjectStreamClass.java:1610)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:388)
     at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2258)
     at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:514)
     at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1407)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
     at weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:161)
     at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:128)
     at weblogic.jdbc.common.internal.RmiDataSource_WLStub.getConnection(Unknown Source)
     at com.actiontech.jmetro.server.core.DBSession.executeQuery(DBSession.java:109)
     at com.actiontech.jmetro.server.query.NamespaceMappings.loadMappings(NamespaceMappings.java:76)
     at com.actiontech.jmetro.server.query.NamespaceMappings.<init>(NamespaceMappings.java:56)
     at com.actiontech.jmetro.server.query.NamespaceMappings.getInstance(NamespaceMappings.java:50)
     at com.actiontech.jmetro.server.query.NamespaceMappingsTest.testSave(NamespaceMappingsTest.java:21)
     at java.lang.reflect.Method.invoke(Native Method)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at junit.framework.TestSuite.runTest(TestSuite.java:208)
     at junit.framework.TestSuite.run(TestSuite.java:203)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:360)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:246)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:146)

Similar Messages

  • Java.lang.NoClassDefFoundError: weblogic/Home$HomeSingleton error

    hi,
    I am using the Weblogic version 10.3.5.0 and i have py script inorder to check the admin server and admin port.
    but when i am running
    java weblogic.WLST checkServer.py "weblogic" "welcome1" "localhost:7001"
    i get the following error : Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic/Home$HomeSingleton
    Note: before running the script i run: . ./setWLSEnv.sh
    the answer was:
    CLASSPATH=/app/ofm/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app/ofm/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/app/ofm/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/app/ofm/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/app/ofm/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/app/ofm/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/app/ofm/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/app/ofm/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/app/ofm/Oracle/Middleware/wlserver_10.3/server/bin:/app/ofm/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/app/ofm/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/app/ofm/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/patrol/bin
    Your environment has been set.
    Please advice?

    Hi,
    What you have in .py file based on it it trying to look for $HomeSingleton which is not specified.
    Try to check that .py file and let me or else put the .py file here I will check and let you know the updates.
    Regards,
    Kal

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint

    Hi,
    I have an application jar file which is run from a .sh file.
    The application uses ridc api to checkin a document on UCM.
    I have placed jars for supporting the application on the folder where we have kept the application jar
    also we have mentioned the supporting jar file names in the Manifest.mf file of the application jar.
    The necessary jar files which we have placed are:
    com.lnt.ucm.integrationutility.ucm.Client
    log4j-1.2.16.jar
    oracle.ucm.ridc-11.1.1.jar
    poi-2.5.1.jar
    commons-codec-1.2.jar
    commons-httpclient-3.1.jar
    commons-logging-1.0.4.jar
    mail.jar
    jxl-2.6.10.jar
    com.bea.core.antlr.runtime_2.7.7.jar
    com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar
    jrf.jar
    org.eclipse.persistence_1.1.0.0_2-1.jar
    weblogic.jar
    wlfullclient.jar
    wseeclient.jar
    jaxws-rt-2.1.4.jar
    we are getting below exception when we run the jar from the .sh file.
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/diagnostics/instrumentation/JoinPoint
    at weblogic.wsee.jaxws.spi.WLSProvider.<clinit>(WLSProvider.java:90)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:31)
    at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
    at javax.xml.ws.spi.Provider.provider(Provider.java:83)
    at javax.xml.ws.Service.<init>(Service.java:56)
    at com.abc.ucm.proxy.JDEUCMManagerService.<init>(JDEUCMManagerService.java:66)
    at com.abc.ucm.integrationutility.ucm.Client.executeUtilty(Client.java:50)
    at com.abc.ucm.integrationutility.ucm.Client.main(Client.java:540)
    I'm not able to find any jar for weblogic/diagnostics/instrumentation/JoinPoint can you please tell me which jar needs to be added.
    Regards,
    Tejaswini L

    914897 wrote:
    I encounter the similar error. Anyone knows how to fix it?By providing a configuration file which validates with the corresponding XSDs found in coherence.jar. Sorry, but can't point you to the specific issue without seeing the erroneous configuration file.
    Best regards,
    Robert

  • Java.lang.NoClassDefFoundError: weblogic/rjvm/LocalRJVM

    Has anyone seen this error, when trying to get an InitialContext?
    java.lang.NoClassDefFoundError: weblogic/rjvm/LocalRJVM
    If I create an InitialContext within the main function of my test
    program everything is fine. However, when
    I try to call a method on the class that is supposed to create the
    InitialContext I get this error. The settings for
    creating the InitialContext are identical in 'main' and the helper class
    I have to create the InitialContext. I can't
    make any sense out of this one. I'm running WLS 5.1 with service pack
    3.
    Jay
    [att1.html]

    Has anyone seen this error, when trying to get an InitialContext?
    java.lang.NoClassDefFoundError: weblogic/rjvm/LocalRJVM
    If I create an InitialContext within the main function of my test
    program everything is fine. However, when
    I try to call a method on the class that is supposed to create the
    InitialContext I get this error. The settings for
    creating the InitialContext are identical in 'main' and the helper class
    I have to create the InitialContext. I can't
    make any sense out of this one. I'm running WLS 5.1 with service pack
    3.
    Jay
    [att1.html]

  • Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server

    Dear Sir/Madam
    I downloaded the Weblogic610 server five times, and when I install it on my Linux
    box (RedHat 7.1), I always met the exception like:
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server
    When I check with lib directory, there is weblogic.jar here, but the file looks
    was damaged, the file size is ok, but I can't open it by use jar tool or other
    tools.
    Some packeage is very strange, after my downloaded, and install, there are only
    a few files in lib directory and some subdirectory and weblogic.jar is missing,
    but the download is normal.
    So, I hope who guy have similar experience, please let me know.
    Thank you
    Cidy

    Hi Raj,
    Could you provide more information from the log; is there a full
    traceback. A first step may be to use the latest service pack [1].
    Also you might try your question in the management newsgroup [2] or
    contact our outsanding support group [3].
    Hope this is of some value,
    Bruce
    [1]
    http://commerce.bea.com/showproduct.jsp?family=WLS&major=8.1&minor=2
    [2]
    http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=xover&group=weblogic.developer.interest.management
    [3]
    http://[email protected]
    Raj wrote:
    >
    Hello All,
    I have installed wls 8.1 and created domain. I have manged server running at other location.I am getting the following Log,When i tried to start managed server from admin server
    java.lang.NoClassDefFoundError: weblogic/Server Exception in thread "main"
    and on admin side
    The request to start the server ecgNode01 of domain CQ6UIDomain failed because the node manager did not hear from the managed server in the configured timeout period. Despite this, if the managed server has not failed, it will come up and the node manager will start monitoring it. To adjust this timeout so that the task does not fail prematurely, please refer to the node manager property ScavangerDelaySeconds (Default value : 180 seconds. Current value : 180 seconds
    can anyone tell me where i went wrong

  • Java.lang.NoClassDefFoundError: weblogic/Server

    Hello All,
    I uninstall my Jdeveloper 11.1.2.3.0 and reinstall it again, and this is not the first time I do this, and the installation was completed successfully. but whenever I create a simple ADF application and run the page I get this error message in the log.
    The system cannot find the path specified.
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m  -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=C:\Oracle\Middleware11.1.2.3-new\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;C:\Oracle\Middleware11.1.2.3-new\oracle_common\modules\oracle.jrf_11.1.1\jrf.jar;C:\Oracle\Middleware11.1.2.3-new\wlserver_10.3\server\lib\xqrl.jar
    PATH=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files (x86)\MiKTeX 2.6\miktex\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Oracle\Middleware11.1.2.1.0\jdk160_24\bin
    *  To start WebLogic Server, use a username and   *
    *  password assigned to an admin-level user.  For *
    *  server administration, use the WebLogic Server *
    *  console at http:\\hostname:port\console        *
    starting weblogic with Java version:
    java version "1.6.0_35"
    Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
    Starting WLS with line:
    C:\PROGRA~1\Java\JDK16~1.0_3\bin\java    -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m  -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\Middleware11.1.2.3-new\wlserver_10.3\server\lib\weblogic.policy -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true   -da -Dplatform.home=C:\Oracle\Middleware11.1.2.3-new\wlserver_10.3 -Dwls.home=C:\Oracle\Middleware11.1.2.3-new\wlserver_10.3\server -Dweblogic.home=C:\Oracle\Middleware11.1.2.3-new\wlserver_10.3\server  -Djps.app.credential.overwrite.allowed=true -Dcommon.components.home=C:\Oracle\Middleware11.1.2.3-new\oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1 -Djrockit.optfile=C:\Oracle\Middleware11.1.2.3-new\oracle_common\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.server.config.dir=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.domain.config.dir=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1  -Digf.arisidbeans.carmlloc=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\carml  -Digf.arisidstack.home=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\FMWCON~1\arisidprovider -Doracle.security.jps.config=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware11.1.2.3-new\oracle_common\modules\oracle.ossoiap_11.1.1,C:\Oracle\Middleware11.1.2.3-new\oracle_common\modules\oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol  -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\Users\MOHSA~2.ATS\AppData\Roaming\JDEVEL~1\SYSTEM~1.1\DEFAUL~1\oracle\store\gmds   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole=  weblogic.Server
    java.lang.NoClassDefFoundError: weblogic/Server
    Caused by: java.lang.ClassNotFoundException: weblogic.Server
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: weblogic.Server.  Program will exit.
    Exception in thread "main" Process exited.

    The solution in this thread
    java.lang.NoClassDefFoundError: weblogic/Server

  • Java.lang.NoClassDefFoundError: weblogic/utils/StringUtils

    Everything was working fine for past 2 months. Now suddenly I am facing some weird issue starting the weblogic admin server 10.3 on Linux. There were no changes at all to any of the script.
    Please advise.
    Starting WLS with line:
    /root/bea/jdk160_05/bin/java -client -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms256m -Xmx768m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=192m -Xverify:none -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dplatform.home=/root/bea/wlserver_10.3 -Dwls.home=/root/bea/wlserver_10.3/server -Dweblogic.home=/root/bea/wlserver_10.3/server -Dweblogic.wsee.bind.suppressDeployErrorMessage=true -Dweblogic.wsee.skip.async.response=true -Dweblogic.management.discover=true -Dwlw.iterativeDev=true -Dwlw.testConsole=true -Dwlw.logErrorsToConsole=true -Dweblogic.ext.dirs=/root/bea/patch_wlw1030/profiles/default/sysext_manifest_classpath:/root/bea/patch_wls1030/profiles/default/sysext_manifest_classpath:/root/bea/patch_wlp1030/profiles/default/sysext_manifest_classpath:/root/bea/patch_cie670/profiles/default/sysext_manifest_classpath:/root/bea/wlportal_10.3/p13n/lib/system:/root/bea/wlportal_10.3/light-portal/lib/system:/root/bea/wlportal_10.3/portal/lib/system:/root/bea/wlportal_10.3/info-mgmt/lib/system:/root/bea/wlportal_10.3/analytics/lib/system:/root/bea/wlportal_10.3/apps/lib/system:/root/bea/wlportal_10.3/info-mgmt/deprecated/lib/system:/root/bea/wlportal_10.3/content-mgmt/lib/system -Dweblogic.alternateTypesDirectory=/root/bea/wlportal_10.3/portal/lib/security -Dweblogic.management.username=xxxx -Dweblogic.management.password=xxxx-Dweblogic.Name=AdminServer -Djava.security.policy=/root/bea/wlserver_10.3/server/lib/weblogic.policy weblogic.Server
    Listening for transport dt_socket at address: 8453
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/utils/StringUtils
    at weblogic.Server.getLibraryExtensions(Server.java:222)
    at weblogic.Server.getExtensionJars(Server.java:198)
    at weblogic.Server.intializeClassloader(Server.java:135)
    at weblogic.Server.main(Server.java:66)
    Caused by: java.lang.ClassNotFoundException: weblogic.utils.StringUtils
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    ... 4 more
    Stopping PointBase server...

    StringUtils is in com.bea.core.utils_1.4.0.0.jar (in your modules folder).
    Probably it is needed on your classpath and it's not there..

  • Thread: java.lang.NoClassDefFoundError: weblogic/Server

    iam getting the below error during deployment within jdev11.1.1.20, could somebody help please...
    *** Using port 7101 ***
    C:\Users\admin\AppData\Roaming\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\bin\startWebLogic.cmd
    [waiting for the server to complete its initialization...]
    JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m
    WLS Start Mode=Development
    CLASSPATH=D:\oracle\MIDDLE~1\JDK160~1.5-3\lib\tools.jar;D:\oracle\MIDDLE~1\utils\config\10.3\config-launch.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic_sp.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.jar;D:\oracle\MIDDLE~1\modules\features\weblogic.server.modules_10.3.2.0.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\webservices.jar;D:\oracle\MIDDLE~1\modules\org.apache.ant_1.7.0/lib/ant-all.jar;D:\oracle\MIDDLE~1\modules\net.sf.antcontrib_1.0.0.0_1-0b2/lib/ant-contrib.jar;D:\oracle\MIDDLE~1\oracle_common\modules\oracle.jrf_11.1.1\jrf.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\common\eval\pointbase\lib\pbclient57.jar;D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\xqrl.jar;.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
    PATH=;D:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32;D:\oracle\MIDDLE~1\WLSERV~1.3\server\bin;D:\oracle\MIDDLE~1\modules\org.apache.ant_1.7.0\bin;D:\oracle\MIDDLE~1\JDK160~1.5-3\jre\bin;D:\oracle\MIDDLE~1\JDK160~1.5-3\bin;D:\app11g\domain\product\11.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Common Files\DivX Shared\;D:\oracle\MIDDLE~1\WLSERV~1.3\server\native\win\32\oci920_8
    * To start WebLogic Server, use a username and *
    * password assigned to an admin-level user. For *
    * server administration, use the WebLogic Server *
    * console at http:\\hostname:port\console *
    starting weblogic with Java version:
    java version "1.6.0_14"
    Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
    Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode)
    Starting WLS with line:
    D:\oracle\MIDDLE~1\JDK160~1.5-3\bin\java -client -Xms256m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m -Dweblogic.Name=DefaultServer -Djava.security.policy=D:\oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy -Djavax.net.ssl.trustStore=D:\oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Dweblogic.nodemanager.ServiceEnabled=true -Xverify:none -da -Dplatform.home=D:\oracle\MIDDLE~1\WLSERV~1.3 -Dwls.home=D:\oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=D:\oracle\MIDDLE~1\WLSERV~1.3\server -Djps.app.credential.overwrite.allowed=true -Ddomain.home=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1 -Dcommon.components.home=D:\oracle\MIDDLE~1\oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djrockit.optfile=D:\oracle\MIDDLE~1\oracle_common\modules\oracle.jrf_11.1.1\jrocket_optfile.txt -Doracle.domain.config.dir=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1 -Doracle.server.config.dir=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\servers\DefaultServer -Doracle.security.jps.config=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\fmwconfig\jps-config.xml -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Digf.arisidbeans.carmlloc=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\carml -Digf.arisidstack.home=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\config\FMWCON~1\arisidprovider -Dweblogic.alternateTypesDirectory=\modules\oracle.ossoiap_11.1.1,\modules\oracle.oamprovider_11.1.1 -Dweblogic.jdbc.remoteEnabled=false -Dwsm.repository.path=C:\Users\admin\AppData\Roaming\JDEVEL~1\SYSTEM~1.36\DEFAUL~1\oracle\store\gmds -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= weblogic.Server
    java.lang.NoClassDefFoundError: weblogic/Server
    Caused by: java.lang.ClassNotFoundException: weblogic.Server
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: weblogic.Server. Program will exit.
    Exception in thread "main" Process exited.
    regards,

    I am having the same issues as koloo, I am willing to provide any other debugging information that you may need.
    I am running Windows 7, 64 bit, 8gigs
    Jdeveloper 11.1.1.2.0 the studio edition with embedded jdk
    I can start the integrated appserver outside of jdev using the cmd script that is supplied but it fails to run if I kick it off from inside of jdeveloper.
    Thanks

  • Java.lang.NoClassDefFoundError: src/myproject/myapp (wrong name: myproject/

    Hi
    I was trying to build an app using JBuilder personal. It would build and run fine. Then i realised that i could not use the api from jdk1.4 as JBuilder would only work with jdk1.3.
    So, i moved the project from JBuilder to Forte thinking that Forte would allow me to use the jdk1.4 api. After significant trouble porting the project, i got the project to build successfully.
    But when i try to run it , i get the following error
    What could be causing it and how do i fix it? these errors are very frustrating. searching this site or the forte help, hasnt given me any tips yet. Thanks
    java.lang.NoClassDefFoundError: src/myproject/myapp (wrong name: myproject/myapp )
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    Exception in thread "main"

    But when i try to run from Forte, it still gives the same dumb errors ..
    Could it be a Forte settings problem??Definitely. Choose the Project menu, then the Settings... at the bottom. That brings you up a new dialog. On the left, select the "Execution types", and the "external execution" within. On the right pane, click on the "expert" tab on the bottom. There you have a field named classpath; add your classpath directories there. Then your program will probably run from Forte.
    For compiling, you also should set the classpath; you need "Compiler types" on the left pane, and you have to set the classpath for the fastJavac compilation and/or for the external compilation, depending which one you use.
    On the left also a "Java Sources" node - click on it, and check if the "default compilation" is either external or (preferable) fastJavac; and that the default execution is external.
    How Forte works with internal compilation, and internal execution, I don't know, never tried that.
    Best Regards,
    Ivan

  • Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic.management

    Hi Guys!
    I want craete the new user 'jdoe' for domain 'tst2_domain' (WebLogic Server Version: 10.3.5.0)
    For it I have script 'create_user.sh':
    # Set the Environment Variables
    /home/testuser/Oracle/Middleware/user_projects/domains/tst2_domain/bin/setDomainEnv.sh
    export JAVA_HOME=/home/testuser/Oracle/Middleware/jdk160_24/
    export PATH=$PATH:$JAVA_HOME/bin/
    export CLASSPATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/modules/com.bea.common.configfwk_1.5.0.0.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-api.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-impl.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-common.jar:/home/testuser/Oracle/Middleware/Oracle_OSB1/lib/sb-kernel-resources.jar
    # Execute the WLST script..
    cd resources
    java weblogic.WLST createUsers.py.../resources/createUsers.py:
    url = 'localhost:7001'
    username = 'weblogic'
    password = 'welcome1'
    print 'Adding users to DefaultAuthenticator.'
    connect(username, password, url)
    # Check if user already exists
    cd('/')
    authProvider = cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
    if authProvider.userExists('jdoe'):
         print 'User jdoe already exists'
         exit()
    else:
         # Create users
         print 'Creating new user: jdoe'
         authProvider.createUser('jdoe','welcome2','a sample service bus administrator')
         authProvider.addMemberToGroup('Administrators','jdoe')
    print 'Users created successfully.'
    exit()Domain 'tst2_domain' is running...
    I started the create_user.sh and then i had the error:
    $ ./create_user.sh
    Initializing WebLogic Scripting Tool (WLST) ...
    Problem invoking WLST - java.lang.NoClassDefFoundError: weblogic.management.scripting.WLScriptContext
    Could you please help me? Which the problem in the script?
    $ ./setWLSEnv.sh
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
    Your environment has been set.
    $ java weblogic.WLST
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic.WLST
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)
    Caused by: java.lang.ClassNotFoundException: weblogic.WLST not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
       at java.net.URLClassLoader.findClass(libgcj.so.7rh)
       at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
       at gnu.java.lang.MainThread.run(libgcj.so.7rh)

    But if run script as $ ./wlst.sh /home/testuser/create_user/resources/createUsers.py - its ok!
    $ ./wlst.sh /home/testuser/labs/Practice_05/create_user/resources/createUsers.py
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/home/testuser/Oracle/Middleware/wlserver_10.3/server/bin:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/testuser/bin
    Your environment has been set.
    CLASSPATH=/home/testuser/Oracle/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_oepe1050/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/patch_ocp360/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/home/testuser/Oracle/Middleware/jrockit_160_24_D1.1.2-4/lib/tools.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar:/home/testuser/Oracle/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/server/lib/webservices.jar:/home/testuser/Oracle/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/home/testuser/Oracle/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar::/home/testuser/Oracle/Middleware/utils/config/10.3/config-launch.jar::/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbynet.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/home/testuser/Oracle/Middleware/wlserver_10.3/common/derby/lib/derbytools.jar::
    Initializing WebLogic Scripting Tool (WLST) ...
    Welcome to WebLogic Server Administration Scripting Shell
    Type help() for help on available commands
    Adding users to DefaultAuthenticator.
    Connecting to t3://localhost:7001 with userid weblogic ...
    Successfully connected to Admin Server 'tst2_as_server' that belongs to domain 'tst2_domain'.
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    Creating new user: jdoe
    Users created successfully.
    Exiting WebLogic Scripting Tool.

  • Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/

    hi,
    I am getting error message when i run HttpClient in my java class. Will the HttpClient will work in weblogic.
    HttpClient httpclient = new HttpClient();
    I added "commons-httpclient-3.1.jar" in the class path also.
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/kernel/KernelLogManager
         at weblogic.logging.commons.LogImpl.<init>(LogImpl.java:14)
         at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:21)
         at weblogic.logging.commons.LogFactoryImpl.getInstance(LogFactoryImpl.java:18)
         at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66)
    Thanks
    Manu

    Again you need to make a difference between what runs within the weblogic container to what runs in a vanilla JVM. Understanding this is crucial to your problem.
    1. web service -> client -> another web service
    The webservice will always run within the weblogic container and you should never get the ClassnotFound because weblogic.jar is always available there. Any subsequent clients loaded into the same JVM will presumably be in the same classloader and wont have problems either
    2. client -> web service;
    If you are using a standalone client in a JVM you shouldnt have any dependency on weblogic and commons-httpclient will work just fine as would commons-logging. However if you include some weblogic jars in the classpath, when you launch the client JVM you would need to include the jars mentioned in the other post because they reference other weblogic classes. But this isn't necessary if you just clean up your classpath to only have the jars you need.

  • Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/securit

    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    hi i am trying to run ejb2 stateless session bean program but i am unable to solve the exception
    can anybody please help me to solve this problem..
    thanks in advance..
    Edited by: 959687 on Sep 17, 2012 10:17 PM

    E:\Oracle\Middleware\jdk160_35\bin>java weblogic.WLST E:\Oracle\Middleware\Oracl
    e_SOA\bin\soa-createUDD.py --domain_home E:/Oracle/Middleware/user_projects/doma
    ins/EPMSystem --soacluster soacluster
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/WLST
    Caused by: java.lang.ClassNotFoundException: weblogic.WLST
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: weblogic.WLST.  Program will exit.

  • JMS error- Exception in thread "Main Thread" java.lang.NoClassDefFoundError

    Hi guys,
    I am new to JMS programming and i'm have the following error...I have set up a simple weblogic server on my local machine and i am trying to send a message to a queue i've created on a JMS server. I am trying to manually run an example provided by BEA WebLogic... the code follows.
    //package examples.jms.queue;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    /** This example shows how to establish a connection
    * and send messages to the JMS queue. The classes in this
    * package operate on the same JMS queue. Run the classes together to
    * witness messages being sent and received, and to browse the queue
    * for messages. The class is used to send messages to the queue.
    * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
    public class QueueSend
      // Defines the JNDI context factory.
      public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
      // Defines the JMS context factory.
      public final static String JMS_FACTORY="weblogic.examples.jms.QueueConnectionFactory";
      // Defines the queue.
      public final static String QUEUE="weblogic.examples.jms.exampleQueue";
      private QueueConnectionFactory qconFactory;
      private QueueConnection qcon;
      private QueueSession qsession;
      private QueueSender qsender;
      private Queue queue;
      private TextMessage msg;
       * Creates all the necessary objects for sending
       * messages to a JMS queue.
       * @param ctx JNDI initial context
       * @param queueName name of queue
       * @exception NamingException if operation cannot be performed
       * @exception JMSException if JMS fails to initialize due to internal error
      public void init(Context ctx, String queueName)
        throws NamingException, JMSException
        qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
        qcon = qconFactory.createQueueConnection();
        qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
        queue = (Queue) ctx.lookup(queueName);
        qsender = qsession.createSender(queue);
        msg = qsession.createTextMessage();
        qcon.start();
       * Sends a message to a JMS queue.
       * @param message  message to be sent
       * @exception JMSException if JMS fails to send message due to internal error
      public void send(String message) throws JMSException {
        msg.setText(message);
        qsender.send(msg);
       * Closes JMS objects.
       * @exception JMSException if JMS fails to close objects due to internal error
      public void close() throws JMSException {
        qsender.close();
        qsession.close();
        qcon.close();
    /** main() method.
      * @param args WebLogic Server URL
      * @exception Exception if operation fails
      public static void main(String[] args) throws Exception {
        if (args.length != 1) {
          System.out.println("Usage: java examples.jms.queue.QueueSend WebLogicURL");
          return;
        System.out.println(args[0]);
        InitialContext ic = getInitialContext(args[0]);
        QueueSend qs = new QueueSend();
        qs.init(ic, QUEUE);
        readAndSend(qs);
        qs.close();
      private static void readAndSend(QueueSend qs)
        throws IOException, JMSException
        BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
        String line=null;
        boolean quitNow = false;
        do {
          System.out.print("Enter message (\"quit\" to quit): \n");
          line = msgStream.readLine();
          if (line != null && line.trim().length() != 0) {
            qs.send(line);
            System.out.println("JMS Message Sent: "+line+"\n");
            quitNow = line.equalsIgnoreCase("quit");
        } while (! quitNow);
      private static InitialContext getInitialContext(String url)
        throws NamingException
        Hashtable<String,String> env = new Hashtable<String,String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
        env.put(Context.PROVIDER_URL, url);
        return new InitialContext(env);
    }when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.

    when i run the main method with args[0] = "t3://localhost:7001", i get the following errors:
    Exception in thread "Main Thread" java.lang.NoClassDefFoundError: weblogic/security/subject/AbstractSubject
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.init(InitialContext.java:223)
    at javax.naming.InitialContext.<init>(InitialContext.java:197)
    at QueueSend.getInitialContext(QueueSend.java:122)
    at QueueSend.main(QueueSend.java:91)
    Could someone please help. thanks.This is Java 101:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rtrb_classload_viewer.html
    You've got to have the WebLogic JAR that contains the necessary .class files in your CLASSPATH when you run.
    Don't use a CLASSPATH environment variable; use the -classpath option when you run.
    %

  • Exception in thread "main" java.lang.NoClassDefFoundError: utils.CertGen

    I want to set the environment by using the setWLSEnv.sh shell in linux OS. Then execute the "java weblogic.utils.CertGen" the below error is occurred.
    [root@loaclhost ~]# cd /oracle/Middleware_1033/wlserver_10.3/server/bin/
    [root@loaclhost bin]# ll
    total 16
    drwxr-x--- 2 root root 4096 Dec 3 14:37 international
    -rwxr-x--- 1 root root 3845 Dec 3 14:38 setWLSEnv.sh
    -rwxr-x--- 1 root root 4150 Dec 3 14:38 startNodeManager.sh
    [root@loaclhost bin]# sh setWLSEnv.sh
    CLASSPATH=/oracle/Middleware_1033/patch_wls1033/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware_1033/patch_ocp353/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware_1033/patch_jdev1111/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/oracle/Middleware_1033/jdk160_18/lib/tools.jar:/oracle/Middleware_1033/wlserver_10.3/server/lib/weblogic_sp.jar:/oracle/Middleware_1033/wlserver_10.3/server/lib/weblogic.jar:/oracle/Middleware_1033/modules/features/weblogic.server.modules_10.3.3.0.jar:/oracle/Middleware_1033/wlserver_10.3/server/lib/webservices.jar:/oracle/Middleware_1033/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/oracle/Middleware_1033/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:
    PATH=/oracle/Middleware_1033/wlserver_10.3/server/bin:/oracle/Middleware_1033/modules/org.apache.ant_1.7.1/bin:/oracle/Middleware_1033/jdk160_18/jre/bin:/oracle/Middleware_1033/jdk160_18/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
    Your environment has been set.
    [root@loaclhost bin]# java weblogic.utils.CertGen welcome1 vinoth_MS1_cert vinoth_MS1_key domestic vinoth
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic.utils.CertGen
    at gnu.gcj.runtime.FirstThread.run() (/usr/lib64/libgcj.so.5.0.0)
    at JvThreadRun(java.lang.Thread) (/usr/lib64/libgcj.so.5.0.0)
    at JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib64/libgcj.so.5.0.0)
    at __gcj_personality_v0 (/oracle/Middleware_1033/wlserver_10.3/server/bin/java.version=1.4.2)
    at __libc_start_main (/lib64/tls/libc-2.3.4.so)
    at JvRegisterClasses (/oracle/Middleware_1033/wlserver_10.3/server/bin/java.version=1.4.2)
    You have new mail in /var/spool/mail/root
    But i use check the command " echo CLASSPATH " it's doesn't show any thing.
    How to resolve this problem to execute the mentioned command "java weblogic.utils.CertGen welcome1 vinoth_MS1_cert vinoth_MS1_key domestic vinoth"
    Regards,
    S.Vinoth Babu
    Edited by: Vinoth Babu on Dec 13, 2010 5:14 AM

    You have to 'source' the call the setWLSEnv, for example,
    source ./setWLSEnv.sh or the short version
    . ./setWLSEnv.sh

  • Java.lang.NoClassDefFoundError when trying to create my first EJB

    Hi All,
    I am trying to learn EJB's on my own. I installed the WebLogic Server Trial version and then wrote the Home Interface, Component Interface and the Bean Class. Now I started the WebLogic server and tried and create the deployment descriptor.. I am getting the error below even after I set the classpath. Is there any other correct way to set the classpath?
    C:\bea\jdk150_04\bin\ejb\demo>set classpath=C:\bea\weblogic92\server\lib\weblogic.jar;
    C:\bea\jdk150_04\bin\ejb\demo>java weblogic.ejb.utils.DDCreator -dir dploymentDescriptor.txt
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/ejb/utils/DDCreator
    Please help me.
    Thanks.

    If you're just learning EJBs now I'd recommend you start with the EJB 3.0 API. It's much
    easier to use than past releases and otherwise much of what you learn (e.g. Home/Component
    interfaces) are not emphasized in EJB 3.0. You can start with the EJB chapters in the
    Java EE 5 Tutorial :
    http://java.sun.com/javaee/5/docs/tutorial/doc/
    We have some additional resources here :
    https://glassfish.dev.java.net/javaee5/ejb/
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • I NEED HELP My cellular data is not working! I called and went to Apple INC. And At

    So after July 4th 2013 I experienced wi-fi problems. I wasn't able to keep connected and i kept getting kicked out my own wi-fi. I left it continue a while because i thought it was only temporary. But i noticed my cellular data with at&t hadn't been

  • Problem using JSTL tag libraries with OC4J 9.0.3

    Hi I'm using the JSTL tag libraries with OC4J 9.0.3. I'm using JDeveloper10.1.2. I put the fmt.tld and c.tld in the WEB-INF directory and I'm adding the jstl.jar and standard.jar library to the EAR file. Both tlds have: <tlib-version>1.0</tlib-versio

  • Accounting Entries when Invoice Verification takes place before GR

    Hello All, I have some difficulty in understanding the accounting entries when Invoice Verification takes place before Goods Receipt. The scenario is as below: - (It is taken from one of the SAP documentation - AC530 - Actual Costing & Material Ledge

  • FILTER logic getting jumbled when GENERATED...

    Environment: OWB10g Client on Windows XP Professional Repository - 9.2.0.4 on UNIX (AIX 5.2) Target - 9.2.0.4 on UNIX (AIX 5.2) I have a FILTER operator with the following in it: ( INOUTGRP1.ORDER_TYPE_PDDCTO = 'RX' And trunc ( INOUTGRP1.TRANSACTION_

  • Mail Won't Quit & Can't Send Mail

    On Monday I started experiencing problems with my Gmail mail in Apple Mail and through the week evolved into my AOL emails and all not being able to send now. Also, when I open the App. the viewer (main window) does not come up, I have to open it man