Exception in thread "Thread-1" java.lang.NoClassDefFoundError:
Hi
When we are trying to deploy one of our application in Tomcat 5.0 we are seeing below error -
- 18:58:51,721 [Thread-1] INFO (support.context.ApplicationContext) Done building hibernate session factory, time 21,296.396 ms
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:212)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
java:437)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
java:461)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
java:469)
at com.splwg.base.support.context.ApplicationContext.newHibernateSession
(ApplicationContext.java:264)
at com.splwg.base.support.context.FrameworkSession.initialize(FrameworkS
ession.java:175)
at com.splwg.base.support.context.FrameworkSession.<init>(FrameworkSessi
on.java:162)
at com.splwg.base.support.context.ApplicationContext.createSession(Appli
cationContext.java:255)
at com.splwg.base.support.context.ApplicationContext.createThreadBoundSe
ssion(ApplicationContext.java:298)
at com.splwg.base.support.context.SessionExecutable.doInReadOnlySession(
SessionExecutable.java:92)
at com.splwg.base.support.context.SessionExecutable.doInReadOnlySession(
SessionExecutable.java:75)
at com.splwg.base.support.context.ApplicationContext.initialize(Applicat
ionContext.java:157)
at com.splwg.base.support.context.ContextFactory.buildContext(ContextFac
tory.java:144)
at com.splwg.base.support.context.ContextFactory.buildContext(ContextFac
tory.java:65)
at com.splwg.base.support.context.ContextFactory.createDefaultContext(Co
ntextFactory.java:426)
at com.splwg.base.web.startup.DeferredXAIStartup.run(DeferredXAIStartup.
java:59)
at java.lang.Thread.run(Thread.java:595)
Your pointers can help us.
Thanks
Manish
Your classpath is probably wrong. You are missing the javax.transaction.Synchronization class/interface.
Kaj
Similar Messages
-
Java.lang.NoClassDefFoundError: javax/mail/Service
Hi,
Happy New Year Everyone! Sadly, it's not that happy for me right now, I'm trying to write a mail app using JavaMail, but I'm getting a NoClassDefFoundError when I run the program.... The program compiles fine, it only crashes when I run the program. Does anyone have any ideas why that's happenning? I compile the program using javac -classpath .:mail.jar *.java and I'm working on a Unix Box. Any help anyone can provide is greatly appreciated!
The error message I received is pasted below (I left out the stack trace to make reading easier).
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: javax/mail/Service
[Stack Trace]
Thanks in Advance!
JuivetteRead the directions that came with the javamail API...it tells you the OTHER API you need. Also, word of advice....I un jar'd and re-jar'd all the classes from BOTH API's in one file...makes life easier.
-
Hi,
I have recently installed toplink. When I try to connect to the Oracle Server (same machine) I get the below error
I am running 9i (DB) and I have Sun JDK 1.4.1_03. The classpath looks like this
c:\oracle\ora92\toplink\core\lib\toplink.jar;c:\oracle\ora92\toplink\core\lib\xerces.jar;c:\oracle\ora92\toplink\core\lib\antlr.jar;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\oracle\ora92\jdbc\lib\nls_charset12.jar
Assistance greatly appreciated.
Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: java/sql/Savepoint
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at oracle.toplink.workbench.model.db.BldrDatabase.login(Unknown Source)
at oracle.toplink.workbench.ui.BldrMainView.login(Unknown Source)
at oracle.toplink.workbench.ui.BldrActionManager$32.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)Hi,
I am using Oracle 10g Express Edition. I try to connect to oracle using Web Sphere Appserver. I am getting java.lang.NoClassDefFoundError: java/sql/Savepoint
java.lang.NoClassDefFoundError: java/sql/Savepoint
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:547)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:347)
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:194)
at org.apache.jsp._index._jspService(_index.java:76)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
Could you please help me to solve this exception?
Thanks,
Siva -
Exception in thread "main" java.lang.NoClassDefFoundError
Am using java 1.3.1 on Red Hat Linux 7.1
i get this error
Exception in thread "main" java.lang.NoClassDefFoundError
while running a simple program HelloWorld.java
helpWhen you use the "java" command, the only required argument is the name of the class that you want to execute. This argument must be a class name, not a file name, and class names are case sensitive. For example, "java HelloWorld.java" won't work because the class name isn't HelloWorld.java, it's HelloWorld. Similarly, "java helloworld" won't work because a class defined as "public class HelloWorld {" is not named helloworld due to case sensitivity. Finally, the .class file must be in a directory that is in the Classpath - that's where java.exe searches to find the file that contains the class.
-
Hi,
system i am using for Oracle SOA is :
Windows 64 Bit
i5 Processor
6 GB RAM
29 GB on C Drive is already free after installation of all SOA related products.
I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
setting memory limit
starting weblogic server (Admin Server)
starting weblogic managed server
and so on
now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
est_classpath weblogic.Server
Listening for transport dt_socket at address: 8453
Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
Caused by: java.lang.ClassNotFoundException: vXmx512m
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: ++Xmx512m. Program will exit.
Now to resolve this what i already tried are :
I change JAVA_HOME and PATH to jdk6 which came with web logic installer
Location is at :
JAVA_HOME : C:\Oracle\Middleware\jdk160_29
PATH : C:\Oracle\Middleware\jdk160_29\bin
The above dose not include any space between path
I ran the startWebLogic.cmd and got same error
After that I also added
CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
WL_HOME: C:\Oracle\Middleware\wlserver_10.3
I ran the startWebLogic.cmd and got same error
I also used earlier path which I used with eclipse when I was working on other java development.
JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
PATH : C:\Program Files\Java\jdk1.7.0_21\bin
I ran the startWebLogic.cmd and got same error
Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib (including the existing one using ; )
I ran the startWebLogic.cmd and got same error
Now may be there is a file called setSOADomainEnv.cmd in
< C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
That include some values for memory set :
set JAVA_OPTIONS=%JAVA_OPTIONS%
set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
set PORT_MEM_ARGS=-Xms512m –Xmx768m
if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
WebLogic :
C:\Oracle\Middleware\wlserver_10.3
C:\Oracle\Middleware\coherence_3.7
C:\Oracle\Middleware\oepe_11.1.1.8.0
SOA Oracle Home Directory :
C:\Oracle\Middleware\Oracle_SOA1
OSB Home Location :
C:\Oracle\Middleware\Oracle_OSB1
Domain name : soa_div_domain
Domain Location : C:\Oracle\Middleware\user_projects\domains
Application Location : C:\Oracle\Middleware\user_projects\applications
Domain Location: C:\Oracle\Middleware\user_projects\domains\soa_div_domain
form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
Please tell me any body want more details.
Thanks.I think you are missing a character '-'
USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
"-Xms512m -Xmx512m -XX:MaxPermSize=128m" -
Hi,
I have created a class JaxmClient.java. When I compile the class with appropriate jar files assigned to -classpath it compiles successfully with no errors. But when I run the classe "java JaxmClient" it produces the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/SOAPElement
Can someone help me I am knew to this technology.
Thanks in advanceI tried to use in my execution all the jar files that I used for compilation.
java -cp jaxm-jar; etc.jar Request
but it still gives me this execption
Exception in thread "main" java.lang.NoClassDefFoundError: Request
I am in the right directory where is the Request.class file is and it is present in this directory....
Thanks appreciate your help... -
I am trying to develop a web service client for amazon webservice.but i am getting this error while running the app. Can anyone please help me. I have installed the JWSDP and but could not understand why i have to locate all the jar files in the classpath?Please help.
===== error=========================================
C:\abr\classes>java -classpath c:\abr\test.jar;C:\abr\jaxrpc-api.jar;C:\abr\jaxrpc-impl.jar;C:\abr\jaxrpc-spi.jar;c:\abr\classes\amazon.jar;C:\abr\mail.jar;C:\a
br\saaj-api.jar;C:\abr\activation.jar;c:\abr\FastInfoset.jar;%classpath% Client
[b]Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLS
treamWriter
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.
java:672)
at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:87)
at amazon.AmazonSearchPort_Stub.authorSearchRequest(AmazonSearchPort_Stu
b.java:988)
at Client.main(Client.java:21)I'm assuming you're using JWSDP 1.6 as I see Fastinfoset.jar in your list. You are missing some jar files in your classpath there. The best way to know what you need is to look at the release notes for JWSDP 1.6. Since you're building a web serivce start with the table in there and lookup JAX-RPC. It'll show you what jar files are needed and what other libraries are needed. Now depending on what you're doing you don't really need all those.
For sure you're missing jsr173_api.jar which is where I believe that class you need is located. This is in the JWSDP_1_6\sjsxp\lib directory. You will probably need the other jar thats in there too. Best bet is to follow the dependancy chart in the release notes.
This should get you going.
Ryan -
I want to run an jar file so on command prompt i am giving the command
" java -jar jSimpleX_3.0.jar "
I am getting the following error:
"exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/SAXException "
Can any body explain the reason of this exception
Thanks in advance.Hi
I am getting an exception while running code of "
Reading an XML file in Java"
The error is " Exception in thread "main"
java.lang.NoClassDefFoundError:
org/xml/sax/SAXException "
I am using j2sdk1.4.0 and j2sdk1.4.2_13 and both are
containing rt.jar file. But still i am receiving the
same Error Exception.
Can anybody there help me out.
Thanks in Advance. !!!!Please help me out. Its urgent !!!!!!!!!!!!!!!!!!!!!!! -
Exception in thread main java.lang.NoClassDefFoundError: com/object/msg/SmsService
caused by: java.lang.NotFoundException: com.object.msg.SmsService
at java.net........................
at java.security.......
I'm trying to send SMS using this code and it gives above Exception during Runtime.
import java.io.File;
import com.objectxp.msg.*;
public class SendSMS
public static void main(String[] args)
SmsService service = null;
try {
// Configuration
File config = new File("jsms.conf");
// create service object.
service = new GsmSmsService();
service.init(config);
// create a new Message.
Message msg = new Message();
msg.setRecipient("7894561");
msg.setMessage("jSMS is cool!");
// Connect to the device
service.connect();
// send the Message
service.sendMessage(msg);
System.out.println("Message sent successfully, ID is ");
} catch (Exception ex) {
System.err.println("Message could not be sent: "+ex.getMessage());
ex.printStackTrace();
} finally {
if (service != null) {
try {
service.disconnect();
} catch( Exception unknown ) {}
service.destroy();
}run this one in command prompt and then convert the applet using converter tool
JC_HOME = C:\java_card_kit-2_2_2\bin\
set CLASSES=%JCHOME%\lib\apduio.jar;%JC_HOME%\lib\apdutool.jar;%JC_HOME%\lib\jcwde.jar;%JC_HOME%\lib\converter.jar;%JC_HOME%\lib\scriptgen.jar;%JC_HOME%\lib\offcardverifier.jar;%JC_HOME%\lib\api.jar;%JC_HOME%\lib\installer.jar;%JC_HOME%\lib\capdump.jar;
D:\NareshPalle\jcardRE\Smart\src>java -classpath %_CLASSES% com.sun.javacard.con
verter.Converter -out EXP JCA CAP -exportpath .\exp -applet 0x0a:0x00:0x00:0x00:0x0e:0x01:0x02:
0x03:0x04:0x05:0x06 PackageName appletName 0x01:0x02:0x03:0x04:0x05:0x0
6:0x07:0x08 1.0
or
go to following directory and run the converter tool in command prompt
step 1: cd C:\java_card_kit-2_2_2\bin\
then run this command under the above directory
step 2:converter -classdir E:\Pathof Your applet class file -out EXP JCA CAP -exportpath E:\path of exp files folder -applet AID PackageName AppletName PackAID major.minor no
For more doubts mail me....
*[removed by moderator]*
Thanks and Regards
NareshPalle
Edited by: EJP on 31/03/2012 20:09: removed your email address. Unless you like spam and unless you think these forums are provided for your personal benefit only, posting an email address here serves no useful purpose whatsoever. -
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/
XSLException
Hi
I have downloaded XDK and was trying to use the XSU feature..
I unzipped the XDK file, I ran the following query on SQL plus
select * from emp. It displayed the full table.
Then i set the class path for XDK,XMLparserv2,oracle JDBC driver and then ran the same query on dos prompt(that is front end command line for java in my case).
The following is the line i tried to execute on the command prompt
java OracleXML getXML -user "scott/tiger" -conn "jdbc:oracle:thin:@localhost
:1521:PomonaT" "select * from emp"
PomonaT is the db name(Host string i use to enter SQL+)
I get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/xml/parser/v2/
XSLException
at OracleXML.To_XML(OracleXML.java:1038)
at OracleXML.ExecuteGetXML(OracleXML.java:917)
at OracleXML.main(OracleXML.java:184)
IS SOMETHING MISSING IN MY CLASSPATH??
IF YES? Could anyone tell what??
KunalAdd xmlparserv2.jar to Classpath & reboot.
-
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: HelloWorldSwing
Hello;
I got a error to run my application, i have not problem with compile it. But it give me the following error massage when i run it.
Could anyone help me please.
E:\Java>javac HelloWorldSwing.java
E:\Java>java HelloWorldSwing
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldSwing
E:\Java>path
PATH=C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\QuickTime\QTSystem\;C:\
Program Files\Common Files\Adobe\AGL;C:\Program Files\Microsoft SQL Server\80\To
ols\BINN;C:\Program Files\Java\jre1.6.0\bin;C:\Program Files\Java\jre1.6.0\bin;C
:\Program Files\Java\j2re1.4.2_13\bin
The following are where my jdk and jre store.
C:\Program Files\Java>dir
Volume in drive C has no label.
Volume Serial Number is 3023-229B
Directory of C:\Program Files\Java
04/02/2007 12:22 AM <DIR> .
04/02/2007 12:22 AM <DIR> ..
01/02/2007 10:54 PM <DIR> j2re1.4.2_13
03/02/2007 04:54 PM <DIR> jdk1.6.0
01/02/2007 10:02 PM <DIR> jre1.5.0_06
04/02/2007 12:22 AM <DIR> jre1.6.0
0 File(s) 0 bytes
6 Dir(s) 5,761,228,800 bytes freeIt even tries to tell you what's wrong. Run class "start.HelloWorldSwing", not "HelloWorldSwing".
I bet that copying that error message without the class name into Google would have given you the answer right away. -
Java.lang.NoClassDefFoundError: Exception in thread "main"
Hello People,
I am aware that this topic has been raised before. I have browsed through all the postings of this particular question, but i have not found the solution.
While compilign i get no errors but this is what i get when i run the java program.
java.lang.NoClassDefFoundError: Exception in thread "main"
Tool completed with exit code 1
The following is my path and classpath files under autoexec.bat
SET PATH=%PATH%;C:\j2sdk1.4.0_03\bin
SET CLASSPATH=.;%CLASSPATH%;C:\j2sdk1.4.0_03\bin
These are the settings i have in MY COMPUTER properties/environments
SYSTEM VARIABLES
Variable - classpath
Value - C:\Program Files\TextPad 4
USER VARIABLES
Variable - PATH
Value - C:\j2sdk1.4.0_03\bin
SYSTEM VARIABLES
Variable - path
Value - C:\PROGRA~1\PVCS\VM\win32\bin;C:\WINNT4\system32;C:\WINNT4;C:\WINNT4\system32\nls\ENGLISH;C:\WINNT4\system32\nls;C:\Program Files\Rational\common
USER VARIABLES
Variable - PATH
Value - C:\j2sdk1.4.0_03\bin
I hope this infromation will help.
Thanks
Regards,
ShahSET PATH=%PATH%;C:\j2sdk1.4.0_03\bin
SET CLASSPATH=.;%CLASSPATH%;C:\j2sdk1.4.0_03\bin
These are the settings i have in MY COMPUTER
properties/environments
SYSTEM VARIABLES
Variable - classpath
Value - C:\Program Files\TextPad 4I am concerned that the classpath in the autoexec.bat is different from what you posted under System variables. What version of Windows are you running? autoexec.bat is used by 98. Others use the system variables. The classpath you show for autoexec.bat looks OK but the classpath you show for system variables looks wrong. It should be the same as what you show for autoexec.bat You do not need the sdk\bin directory in your classpath unless you plan to put classes there.
The NoClassDefFound error means that the java.exe command could not find the class that you specified. You did not post the command that you entered. You may have specified the class wrong. Otherwise, it is probably a classpath problem. -
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 L914897 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 -
Exception in thread "main" java.lang.NoClassDefFoundError: Springer
Hi,
i'm trying to programm the knight-problem, but i am not sure, that the Code is right:
public class Springer {
public static int[] sx = new int[10];
public static int[] sy = new int[10];
public static int[][] feld;
public static int nquad;
// Springzuege:
void init(int[] sx,int[] sy,int[][] feld,int n,int nquad) {
//Pringerzuege
sx[1] = 2; sy [1] = 1;
sx[2] = 1; sy [2] = 2;
sx[3] = -1; sy [3] = 2;
sx[4] = -2; sy [4] = 1;
sx[5] = -2; sy [5] = -1;
sx[6] = -1; sy [6] = -2;
sx[7] = 1; sy [7] = -2;
sx[8] = 2; sy [8] = -1;
// Schachbrett Inizialisation
for(int i=0; i<8; ++i){
for(int j=0; j<8; ++j){
feld[i][j]=-1; //Umrandung = -1
for(int i=2; i<=5; ++i){
for(int j=2; j<=5; ++j){
feld[i][j]=0; //Spielfelder auf 0 setzen
nquad=n*n;
boolean zug(int x,int y,int tiefe) {
int u; // Index
int v; // Index
int k=1; //zaehlt die 8 Moeglichkeiten
boolean erg=false; //bisher keine Loesung
while(!erg && k<=8) {
u=x + sx[k];
v=y + sy[k];
if(feld[u][v]==0) {
feld[u][v]=tiefe;
if(tiefe<nquad) {
erg=zug(u,v,tiefe+1); //Rekursion
if(!erg) //ruecksetzen
feld[u][v]=0;
else
erg=true; //Loesung gefunden
++k;
return erg;
public static void main(String [] args) {
int n;
int i=1;
int j=1;
boolean okay=false;
Springer s = new Springer();
s.init(sx,sy,feld,4,nquad);
feld[i][j]=1; //Anfangsfeld besetzen
okay=s.zug(i,j,2);
if(okay)
System.out.print("Ein solches Pfad ist gefunden");
else
System.out.print("Keine Loesung gefunden");
There is no errors by the compiling. But when i want to run the application follows:
Exception in thread "main" java.lang.NoClassDefFoundError: Springer
Can someone help me??
I need that program!A few more comments on your code...
- In Java arrays index start at 0 not at 1. You may want to change your init() method accordingly.
- In init() the parameter nquad hide the field of the same name so the assignment you make at the end of the method is lost
Hope this help,
Eric -
Hi,
I am new to SQLJ. Now, in my PC (with Win98), I have JDK 1.2 and Oracle 8i (personal edition). I have used Java and Oracle in my PC without any problem. Now, I am going to learn SQLJ in order to create a java program to access Oracle database. What I have done is to set up several classpaths in DOS:
SET classpath=C:\ora_program\sqlj\lib\translator.zip;
SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
The code of my program is:
import java.sql.Date;
import java.sql.SQLException;
import oracle.sqlj.runtime.Oracle;
import java.util.Date;
public class Hello{
public static void main(String[] args){
java.sql.Date current_date;
try{
// connect to the db
Oracle.connect(
"C:\ora_program\bin",
"system",
"manager");
// get the current date from the database
#sql{SELECT sysdate INTO :current_date FROM dual};
// display message
System.out.println("Hello, the current date is: "+ current_date);
catch(SQLException e){
System.err.println("sqlException: "+e);
finally{
try{
Oracle.close();
catch(SQLException e){
System.err.println("sqlException: "+e);
And then I compile my program in DOS with the typing: sqlj Hello.sqlj
The program cannot be compiled and the error message is:
"Exception in thread main java.lang.NoClassDefFoundError: sqlj/tools/Sqlj"
It indicates that the SQLJ translator class files cannot be found.
I have set up the classpath in DOS (see above). How does the error come? Please help. Thanks.
PC>
SET classpath=C:\ora_program\sqlj\lib\translator.zip;
SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
The above only sets the classpath to the last value. You need to use the following.
SET classpath=%classpath%;C:\ora_program\sqlj\lib\runtime.zip;
Maybe you are looking for
-
I'm having an issue where people trying to send emails to me are getting bounced back randomly, sometimes they will get through but often they won't and they get these responses: Diagnostic information for administrators: Generating server: canat0472
-
SInce updating to FCP 6 we've been having trouble with the rendered files. If a sequence is duplicated and the name is changed I have to render again and the sequence doesn't appear in the render manager, same happens if I copy and paste onto a new s
-
Removing Snow Leopard and Installing only Windows on Mini
I've owned my Mac Mini now for about a month; it was my first immersion into OS X and, quite frankly, I do not like it. I do like the physical form of the mini and figured I would just delete Snow Leopard and install Windows 7 (preferably 64 bit) on
-
i had an error with my java.library.path, after setting the path, i ran the program again i.e. outcall.java. The error i have now is javax.telephony.invalidArgumentExeception MyOutCallObserve.caaChangedEvent java.lang.NullPointerException java.lang.N
-
I come from Windows c++ to Java and am used to storing values in the registry. There is a nice replacement for this in java.util.prefs.Preferences. I can pick up the values when I create the controls, the problem how do I store the values? There may