java.lang.NoClassDefFoundError in quartz

R

rony.john

Hi all,
i am using quartz job scheduling api for my project. when i run a
simple
hello world program against jdk 1.4.1_02-b06, its giving
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction.

any idea?


thanks,
ronan
 
A

anshu

Hi all,
i am using quartz job scheduling api for my project. when i run a
simple
hello world program against jdk 1.4.1_02-b06, its giving
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction.

any idea?

thanks,
ronan

hi ronan

this is probleam of class path chech ur class path
properly then use..


regards

Anshul
 
A

Arne Vajhøj

i am using quartz job scheduling api for my project. when i run a
simple
hello world program against jdk 1.4.1_02-b06, its giving
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction.

any idea?

javax.transaction.UserTransaction is not part of Java SE but of Java EE.

I guess your code is intended to run inside an app server and not as
standalone app.

Arne
 
L

luna085

Hi all,
i am using quartz job scheduling api for my project. when i run a
simple
hello world program against jdk 1.4.1_02-b06, its giving
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction.

any idea?

thanks,
ronan

Hi everybody!

This could be because you are using the last version of quartz but
your jvm is older that 5. I had the same problem and that was the
reason!
 
L

Lew

Hi everybody!

This could be because you are using the last version of quartz but
your jvm is older that 5. I had the same problem and that was the
reason!

If that is true, it would definitely behoove one to upgrade to Java 5, or
better yet to the current version, since Java 1.4 will be retired in 2008, and
all earlier versions are already past End-of-Life.
 
E

Esmond Pitt

Hi all,
java.lang.NoClassDefFoundError: javax/transaction/UserTransaction.

This exception always causes a *lot* of confusion. It is *not* the same
as ClassNotFouncException: it is not a classpath or JRE version or
jar-contents problem. What it means is that the file that was reached
via the normal classpath search mechanism didn't contain the expected
class, i.e. that the directory the .class file was in didn't correspond
to its package declaration.
 
M

marzetas

This exception always causes a *lot* of confusion. It is *not* the same
as ClassNotFouncException: it is not a classpath or JRE version or
jar-contents problem. What it means is that the file that was reached
via the normal classpath search mechanism didn't contain the expected
class, i.e. that the directory the .class file was in didn't correspond
to its package declaration.

In this case, how can I get it right?
 
L

Lew

In this case, how can I get it right?

Make sure all dependencies are in the right place in the environment. Make
sure that the deployment JVM version is at least the target version of your
app. Make sure that all classes in your project got recompiled. Make sure
that classes that get injected at runtime, as is common with a lot of javax
classes, actually do get injected at runtime.

Sometimes a bad deployment descriptor can ruin your whole day.
 
E

Esmond Pitt

In this case, how can I get it right?

In *any* case, make sure that the directory the .class file appears in
corresponds to its package name, and don't rename or move .class files
around after they're compiled.
 
R

richard.e.conway

In *any* case, make sure that the directory the .class file appears in
corresponds to its package name, and don't rename or move .class files
around after they're compiled.

This is confusing and the Quartz documentation doesn't help much. But
here's how to get things running:

In order to run the Quartz demo applications, you MUST have the Sun
Java Transaction API classes (available here: http://java.sun.com/products/jta/)

Download the class files and create a JAR file named jta.jar by
executing the command: jar cf jta.jar javax

Then add the file jta.jar to your eclipse project and add the library
to the class path.

If you don't do this, you will get the following error when you try to
execute a Quartz based application: java.lang.NoClassDefFoundError:
javax/transaction/UserTransaction
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top