FAQ
Hi,

I'm trying to develop a web app using JDK1.6 and Tomcat 6.0.18 and JPA. When creating a new web app in Netbeans 6.1, I chose the Java EE 5 version. Then I proceed to create Entity Classes from Databases which were successful. If I try to create JSF pages from Entity Classes, I get:
The class javax.transaction.UserTransaction is unavailable. Add an appropriate jar file ...

After adding javaee.jar from Glassfish v2 into my web app and deployed the web app, I got this error:
INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)

I think it's because of the javaee.jar causing conflict with tomcat's jar files.

I know that Tomcat is only a web container but is there a way I can implement JavaEE5/EJB3.0 for full Persistence support without having to switch to Geronimo 2.x or Glassfish v2/v3? (I think this is a stupid question but I just want to know my options :) I rather not switch to Glassfish if I don't have to because of default directory browsing Glassfish has :D

Thanks,
Tommy

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Search Discussions

  • Caldarale, Charles R at Aug 17, 2008 at 10:31 pm

    From: Tommy Pham
    Subject: Tomcat 6.0.18 & JavaEE 5/EJB3.0

    I think it's because of the javaee.jar causing conflict with
    tomcat's jar files.
    Correct; you don't want to have javaee.jar (or its predecessor, j2ee.jar) anywhere near Tomcat. You can try to extract the necessary packages from javaee.jar and place them in Tomcat's lib directory. Haven't tried it myself; we normally use JBoss for EJBs.

    - Chuck


    THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Martin Gainty at Aug 18, 2008 at 1:55 am
    doc from JBOSS 4.2.2.GA
    Tomcat 6 is now bundled as part of JBoss Web.
    deploy/jbossweb-tomcat55.sar has been replaced by
    deploy/jboss-web.deployer.
    (much easier to configure in TC than resin)

    Martin
    ______________________________________________
    Disclaimer and confidentiality note
    Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.

    From: Chuck.Caldarale@unisys.com
    To: users@tomcat.apache.org
    Date: Sun, 17 Aug 2008 17:30:47 -0500
    Subject: RE: Tomcat 6.0.18 & JavaEE 5/EJB3.0
    From: Tommy Pham
    Subject: Tomcat 6.0.18 & JavaEE 5/EJB3.0

    I think it's because of the javaee.jar causing conflict with
    tomcat's jar files.
    Correct; you don't want to have javaee.jar (or its predecessor, j2ee.jar) anywhere near Tomcat. You can try to extract the necessary packages from javaee.jar and place them in Tomcat's lib directory. Haven't tried it myself; we normally use JBoss for EJBs.

    - Chuck


    THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
    _________________________________________________________________
    See what people are saying about Windows Live. Check out featured posts.
    http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008
  • Bill Barker at Aug 17, 2008 at 11:52 pm
    "Tommy Pham" <tommyhp2@yahoo.com> wrote in message
    news:279203.49298.qm@web38205.mail.mud.yahoo.com...
    Hi,

    I'm trying to develop a web app using JDK1.6 and Tomcat 6.0.18 and JPA.
    When creating a new web app in Netbeans 6.1, I chose the Java EE 5
    version. Then I proceed to create Entity Classes from Databases which
    were successful. If I try to create JSF pages from Entity Classes, I get:
    The class javax.transaction.UserTransaction is unavailable. Add an
    appropriate jar file ...

    After adding javaee.jar from Glassfish v2 into my web app and deployed the
    web app, I got this error:
    INFO: Illegal access: this web application instance has been stopped
    already. Could not load java.lang.Object. The eventual following stack
    trace is caused by an error thrown for debugging purposes as well as to
    attempt to terminate the thread which caused the illegal access, and has
    no functional impact.
    java.lang.IllegalStateException
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)

    I think it's because of the javaee.jar causing conflict with tomcat's jar
    files.

    I know that Tomcat is only a web container but is there a way I can
    implement JavaEE5/EJB3.0 for full Persistence support without having to
    switch to Geronimo 2.x or Glassfish v2/v3? (I think this is a stupid
    question but I just want to know my options :) I rather not switch to
    Glassfish if I don't have to because of default directory browsing
    Glassfish has :D
    GlassFish contains only a forked version of Tomcat, so changes to Tomcat may
    not show up there (and conversely, changes to GlassFish may not show up in
    Tomcat). The only J2EE Container that I know uses a pure version of Tomcat
    is Geronimo (but, while not having looked, I understand that the changes in
    JBoss are pretty minor).

    I agree with Chuck that you shouldn't include a full J2EE jar (any vendor)
    with Tomcat, and often times the easiest is to just include the pieces you
    need. But I'm guessing that it will be easier for you to just pick a J2EE
    vendor.
    Thanks,
    Tommy

    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org



    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Johnny Kewl at Aug 18, 2008 at 2:08 am
    ----- Original Message -----
    From: "Tommy Pham" <tommyhp2@yahoo.com>
    To: <users@tomcat.apache.org>
    Sent: Sunday, August 17, 2008 11:50 PM
    Subject: Tomcat 6.0.18 & JavaEE 5/EJB3.0

    Hi,

    I'm trying to develop a web app using JDK1.6 and Tomcat 6.0.18 and JPA.
    When creating a new web app in Netbeans 6.1, I chose the Java EE 5
    version. Then I proceed to create Entity Classes from Databases which
    were successful. If I try to create JSF pages from Entity Classes, I get:
    The class javax.transaction.UserTransaction is unavailable. Add an
    appropriate jar file ...

    After adding javaee.jar from Glassfish v2 into my web app and deployed the
    web app, I got this error:
    INFO: Illegal access: this web application instance has been stopped
    already. Could not load java.lang.Object. The eventual following stack
    trace is caused by an error thrown for debugging purposes as well as to
    attempt to terminate the thread which caused the illegal access, and has
    no functional impact.
    java.lang.IllegalStateException
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
    at
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)

    I think it's because of the javaee.jar causing conflict with tomcat's jar
    files.

    I know that Tomcat is only a web container but is there a way I can
    implement JavaEE5/EJB3.0 for full Persistence support without having to
    switch to Geronimo 2.x or Glassfish v2/v3? (I think this is a stupid
    question but I just want to know my options :) I rather not switch to
    Glassfish if I don't have to because of default directory browsing
    Glassfish has :D

    Thanks,
    Tommy
    Tommy if you havnt already... have a look at Visual Web Pages... it has the
    dB wizards and it works with TC.
    Doesnt use JPA, it uses Cached Rowsets to persist... which are actually
    easier to understand, I think ;)

    ... nothing stopping you from making a lib that uses JPA, and then using
    that in TC, but you not going to get the dB wizards to work with the web...

    Visual Web Pages is the JSF technology... I didnt even know Sun had got JPA
    and WEB wizards working yet ;)
    Anyway... TC and JSF are friendly... via VWP... if you wont to give that a
    spin on NB
    Make a web project... select VWP... choose TC as the server... maybe ;)

    ---------------------------------------------------------------------------
    HARBOR : http://www.kewlstuff.co.za/index.htm
    The most powerful application server on earth.
    The only real POJO Application Server.
    See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
    ---------------------------------------------------------------------------


    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Tommy Pham at Aug 18, 2008 at 2:31 am
    Hi Johnny,

    --- On Sun, 8/17/08, Johnny Kewl wrote:
    Tommy if you havnt already... have a look at Visual Web
    Pages... it has the
    dB wizards and it works with TC.
    Doesnt use JPA, it uses Cached Rowsets to persist... which
    are actually
    easier to understand, I think ;)

    ... nothing stopping you from making a lib that uses JPA,
    and then using
    that in TC, but you not going to get the dB wizards to work
    with the web...

    Visual Web Pages is the JSF technology... I didnt even know
    Sun had got JPA
    and WEB wizards working yet ;)
    Anyway... TC and JSF are friendly... via VWP... if you wont
    to give that a
    spin on NB
    Make a web project... select VWP... choose TC as the
    server... maybe ;)
    I did try out VWP before but I had some problems with it regarding db automatically generating PK. http://forums.java.net/jive/message.jspa?messageID=259409#259409
    Since my database is normalized creating multiple one-to-many relationships, I need the generated key to insert into other tables at the same time. With Persistence, I can make full use of transaction if any part of the inserts failed w/o having to worry much about incomplete/junk data in my db because Persistence can give me the generated key right after insert :)

    Thanks,
    Tommy

    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Johnny Kewl at Aug 18, 2008 at 3:03 am
    ----- Original Message -----
    From: "Tommy Pham" <tommyhp2@yahoo.com>
    To: "Tomcat Users List" <users@tomcat.apache.org>
    Sent: Monday, August 18, 2008 4:29 AM
    Subject: Re: Tomcat 6.0.18 & JavaEE 5/EJB3.0

    Hi Johnny,

    --- On Sun, 8/17/08, Johnny Kewl wrote:
    Tommy if you havnt already... have a look at Visual Web
    Pages... it has the
    dB wizards and it works with TC.
    Doesnt use JPA, it uses Cached Rowsets to persist... which
    are actually
    easier to understand, I think ;)

    ... nothing stopping you from making a lib that uses JPA,
    and then using
    that in TC, but you not going to get the dB wizards to work
    with the web...

    Visual Web Pages is the JSF technology... I didnt even know
    Sun had got JPA
    and WEB wizards working yet ;)
    Anyway... TC and JSF are friendly... via VWP... if you wont
    to give that a
    spin on NB
    Make a web project... select VWP... choose TC as the
    server... maybe ;)
    I did try out VWP before but I had some problems with it regarding db
    automatically generating PK.
    http://forums.java.net/jive/message.jspa?messageID=259409#259409
    Since my database is normalized creating multiple one-to-many
    relationships, I need the generated key to insert into other tables at the
    same time. With Persistence, I can make full use of transaction if any
    part of the inserts failed w/o having to worry much about incomplete/junk
    data in my db because Persistence can give me the generated key right
    after insert :)
    Tommy I actually have my own persist framework... but just having a quick
    squiz at that, that problem is just a normal Java thing... ie type
    conversions can be a little tricky...

    int and Integer are not the same thing in Java...

    its going to be something like

    int i = Integer.parseInt(TheThing);
    I think...

    same story for long... ie one is a primitive type and one is a class... diff
    mem structure but Java alsways has a slightly obscure conversion
    somewhere...

    Have fun
    Anyway, just wanted to make sure you knew VWP was there

    ---------------------------------------------------------------------------
    HARBOR : http://www.kewlstuff.co.za/index.htm
    The most powerful application server on earth.
    The only real POJO Application Server.
    See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
    ---------------------------------------------------------------------------


    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Tommy Pham at Aug 18, 2008 at 4:23 am

    --- On Sun, 8/17/08, Johnny Kewl wrote:

    Tommy I actually have my own persist framework... but just
    having a quick
    squiz at that, that problem is just a normal Java thing...
    ie type
    conversions can be a little tricky...

    int and Integer are not the same thing in Java...

    its going to be something like

    int i = Integer.parseInt(TheThing);
    I think...

    same story for long... ie one is a primitive type and one
    is a class... diff
    mem structure but Java alsways has a slightly obscure
    conversion
    somewhere...

    Have fun
    Anyway, just wanted to make sure you knew VWP was there
    Thanks, because of VWP (with table navigation/pagination and sort features), that's why I stuck with Netbeans for my IDE :D. Only drawback IMO with Netbeans is lack of various server support like Eclipse.

    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org
  • Johnny Kewl at Aug 18, 2008 at 11:37 am
    ----- Original Message -----
    From: "Tommy Pham" <tommyhp2@yahoo.com>
    To: "Tomcat Users List" <users@tomcat.apache.org>
    Sent: Monday, August 18, 2008 6:21 AM
    Subject: Re: Tomcat 6.0.18 & JavaEE 5/EJB3.0

    --- On Sun, 8/17/08, Johnny Kewl wrote:
    Tommy I actually have my own persist framework... but just
    having a quick
    squiz at that, that problem is just a normal Java thing...
    ie type
    conversions can be a little tricky...

    int and Integer are not the same thing in Java...

    its going to be something like

    int i = Integer.parseInt(TheThing);
    I think...

    same story for long... ie one is a primitive type and one
    is a class... diff
    mem structure but Java alsways has a slightly obscure
    conversion
    somewhere...

    Have fun
    Anyway, just wanted to make sure you knew VWP was there
    Thanks, because of VWP (with table navigation/pagination and sort
    features), that's why I stuck with Netbeans for my IDE :D. Only drawback
    IMO with Netbeans is lack of various server support like Eclipse.
    Yes, you see it in the NB user group as well... people running more than one
    IDE... ie they just there to get at swing tools, or VWP, but they got their
    JBOSS or whatever running in Eclipse, or something else.

    I think running more than one IDE is now just a fact of life... and there
    are two definite camps... you want swing, you go NB, you want to dev on
    Android, it only works well in Eclipse... its more about allegiances than
    technology, who's making what, and what tool are they into.
    GlassFish is NB... most of the others are Eclipse... TC is pleasantly
    neutral...

    NB is good with TC, but works a little diff to Eclipse...

    When it comes to dB tools on the web, I still do it the old way... make the
    site in an HTML editor, do the JSP and use JDBC for the dB... the first time
    is difficult, learning the MVC model in TC... after that I think its much
    faster...
    .... just check out VWP carefully... its a very heavy application of JSF..
    and for a large site, it gets slow, very slow.

    We use VWP, but we cannibalize it... ie if we need a tree in a web page, we
    use the wizards... then open up the source and just extract the CSS, and
    script ;)
    How you use Java tools, is as much a skill as just learning the langauge
    itself... I think ;)

    NB 5.5 is a better product for TC dev, than NB 6 is... NB 6 is still very
    very buggy... its got a little too fishy for my liking ;)

    Why we only use TC and have put a tremendous amount of investment into
    it.... its a no nonsense light weight container... it does what it does very
    very well.
    Master of the WEB and people understand it... as apposed to jack of all
    trades, master of none... there is very little you cant make TC do... the
    way we run TC, eats fish for breakfast ;)

    Have fun...
    ---------------------------------------------------------------------------
    HARBOR : http://www.kewlstuff.co.za/index.htm
    The most powerful application server on earth.
    The only real POJO Application Server.
    See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
    ---------------------------------------------------------------------------




    ---------------------------------------------------------------------
    To start a new topic, e-mail: users@tomcat.apache.org
    To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
    For additional commands, e-mail: users-help@tomcat.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriestomcat
postedAug 17, '08 at 9:52p
activeAug 18, '08 at 11:37a
posts9
users5
websitetomcat.apache.org
irc#tomcat

People

Translate

site design / logo © 2018 Grokbase