NoClassDefFoundError

I have been using NetBeans to develop the java program that I am working. I just recently finished everything and it works fine when I run it in NetBeans. If I try to compile it via the command line 搄ava 杍ar Location.jar?It will have 揓ava.lang.NoClassDefFoundError?I have set the CLASSPATH variable to contain all the exact same Libraries as NetBeans.

Since I was not able to get it to run on the command line I started searching for the classes that it was wanting and added them to my CLASSPATH. That was working fine and I was moving through all the errors, but I ended up having a problem, I got:

Exeception in thread 搈ain?java.lang.NoClassDefFoundError: com/ibm/ejs/ras/Tr

at com.ibm.ws.webservices.engine.transport.jms.JMSSender.<clinit>(JMSSender,java:134)

So I found the .JAR file that contained the Tr class and added it to my CLASSPATH, but now I get an error that I cannot figure out. It抯 the same as above, but no longer says that class that it is missing. Here is the error:

Exeception in thread 搈ain?java.lang.NoClassDefFoundError

at com.ibm.ws.webservices.engine.transport.jms.JMSSender.<clinit>(JMSSender,java:134)

It抯 the exact same error as before I added the Tr class, but now its missing the class. Do you have any idea what I can do about this? I have had to add about 6 different jar files to the CLASSPATH to get it this far, even though I don抰 have those JAR抯 in my NetBeans project. Do you know why NetBeans would be able to work fine but the command line wouldn抰? I have also added my program to Websphere and I get the same errors as the command line.

[1667 byte] By [duqxa] at [2007-10-2 19:53:44]
# 1

There isn't quite enough information to solve this but ultimately the issue is that a class that the constructor in com.ibm.ws.webservices.engine.transport.jms.JMSSender is looking for is missing. It will likely be further down the stack trace.

When the classpath starts to get very large I tend to put the running into a shell script or batch file. I've also used ant to create a run target so that it is cross platform.

stdunbara at 2007-7-13 22:32:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Here is the full information that it gives me when I try to run it:

java -jar "C:\WTK22\apps\Location\dist\Location.jar"

Exception in thread "main" java.lang.NoClassDefFoundError

at com.ibm.ws.webservices.engine.transport.jms.JMSSender.<clinit>(JMSSender.java:134)

at com.ibm.ws.webservices.engine.configuration.BasicClientConfig.<init>(BasicClientConfig.java:94)

at com.ibm.ws.webservices.engine.configuration.DefaultEngineConfigurationFactory.getClientEngineConfig(DefaultEn

gineConfigurationFactory.java:127)

at com.ibm.ws.webservices.engine.client.Service.initService(Service.java:319)

at com.ibm.ws.webservices.engine.client.Service.initService(Service.java:290)

at com.ibm.ws.webservices.engine.client.Service.<init>(Service.java:190)

at org.csapi.www.parlayx.location.MobileTerminalLocationServiceLocator.<init>(MobileTerminalLocationServiceLocat

or.java:11)

at location.Main.GetLocation(Main.java:119)

at location.Main.<init>(Main.java:62)

at location.Main.main(Main.java:40)

I do not have the source for JMSSender, so I have no clue what it is failing on. All the other times I gor a NoClasDefFoundError it would have a semicolon then right after that say which class it could not find, in this error is doesn't say which class it cannot find. I have no clue why Eclipse can run this with ant using the same classes I am trying to use when I run it from the command line.

duqxa at 2007-7-13 22:32:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3
Hi, I have te same problem with Tr.class but I cant find the right package.Can you tell me in what package did you find the Tr.class?Thank you
giax25a at 2007-7-13 22:32:56 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...