java.lang.NoClassDefFoundError in quartz

Discussion in 'Java' started by rony.john@gmail.com, Nov 23, 2007.

  1. Guest

    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
    , Nov 23, 2007
    #1
    1. Advertising

  2. anshu Guest

    On Nov 23, 4:15 pm, wrote:
    > 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
    anshu, Nov 23, 2007
    #2
    1. Advertising

  3. Lew Guest

    anshu wrote:
    > On Nov 23, 4:15 pm, wrote:
    >> 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..


    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>

    --
    Lew
    Lew, Nov 23, 2007
    #3
  4. Arne Vajhøj Guest

    wrote:
    > 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
    Arne Vajhøj, Nov 23, 2007
    #4
  5. Roedy Green Guest

    Roedy Green, Nov 24, 2007
    #5
  6. Guest

    On 23 nov, 05:15, wrote:
    > 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!
    , Nov 29, 2007
    #6
  7. Lew Guest

    wrote:
    > On 23 nov, 05:15, wrote:
    >> 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!


    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.

    --
    Lew
    Lew, Nov 30, 2007
    #7
  8. Roedy Green Guest

    Roedy Green, Nov 30, 2007
    #8
  9. Esmond Pitt Guest

    wrote:

    > 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.
    Esmond Pitt, Nov 30, 2007
    #9
  10. Guest

    On 30 nov, 11:25, Esmond Pitt <> wrote:
    > wrote:
    > > 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.


    In this case, how can I get it right?
    , Dec 4, 2007
    #10
  11. Lew Guest

    wrote:
    > On 30 nov, 11:25, Esmond Pitt <> wrote:
    >> wrote:
    >>> 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.

    >
    > 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.

    --
    Lew
    Lew, Dec 4, 2007
    #11
  12. Esmond Pitt Guest

    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.
    Esmond Pitt, Dec 4, 2007
    #12
  13. Guest

    On Dec 4 2007, 6:11 pm, Esmond Pitt <>
    wrote:
    > 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
    , Jan 26, 2008
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page