Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

java.lang.NoClassDefFoundError in quartz

Thread view: 
rony.john@gmail.com - 23 Nov 2007 11:15 GMT
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
anshu - 23 Nov 2007 11:23 GMT
On Nov 23, 4:15 pm, rony.j...@gmail.com wrote:
> Hi all,
>   i am using quartz job scheduling api for my project. when i run a
[quoted text clipped - 6 lines]
> thanks,
> ronan

hi ronan

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

regards

Anshul
Lew - 23 Nov 2007 16:48 GMT
> On Nov 23, 4:15 pm, rony.j...@gmail.com wrote:
>> Hi all,
[quoted text clipped - 12 lines]
>              this is probleam of class path chech ur class path
> properly then use..

Usually it's a problem with an incomplete build of a project, or with use of a
modern compiler for that obsolete JVM without using -target and
-bootclasspath, not the application class path.

See
<http://www.mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR>

Signature

Lew

Arne Vajhøj - 23 Nov 2007 16:52 GMT
>   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
Roedy Green - 24 Nov 2007 08:35 GMT
>NoClassDefFoundError

my condolences.

see
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

luna085@gmail.com - 29 Nov 2007 23:20 GMT
On 23 nov, 05:15, rony.j...@gmail.com wrote:
> Hi all,
>   i am using quartz job scheduling api for my project. when i run a
[quoted text clipped - 6 lines]
> 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!
Lew - 30 Nov 2007 02:07 GMT
> On 23 nov, 05:15, rony.j...@gmail.com wrote:
>> Hi all,
[quoted text clipped - 13 lines]
> 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.

Signature

Lew

Roedy Green - 30 Nov 2007 07:45 GMT
>NoClassDefFoundError
see
http://mindprod.com/jgloss/runerrormessages.html#NOCLASSDEFFOUNDERROR
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Esmond Pitt - 30 Nov 2007 09:25 GMT
> 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.
marzetas@gmail.com - 04 Dec 2007 11:27 GMT
> rony.j...@gmail.com wrote:
> > Hi all,
[quoted text clipped - 6 lines]
> 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?
Lew - 04 Dec 2007 15:35 GMT
>> rony.j...@gmail.com wrote:
>>> Hi all,
[quoted text clipped - 7 lines]
>
> 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.

Signature

Lew

Esmond Pitt - 04 Dec 2007 23:11 GMT
> 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.
richard.e.conway@gmail.com - 26 Jan 2008 23:24 GMT
> marze...@gmail.com wrote:
> > 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.

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.