Results 1 to 8 of 8
  1. #1
    vikt0r87 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default EJB 3 jboss 4.2 error

    Hello World :),

    i'm trying to learn ejb3. i found this tutorial for the classic "hello world" (...jairrillo.com/blog/2008/04/25/example-of-ejb3-session-bean-using-eclipse-europa-and-jboss/). I'm not using eclipse europa, i`m using eclipse helios. Anyway in eclipse europa i get the same errors.

    At the beggining i used jboss 6 but it didn't let me deploy the ear. Now i'm using jboss4.2 just like the tutorial says, i can deploy the ear file but when i click the link in the servlet i get the folowing error:
    Java Code:
    11:44:00,801 ERROR [[TestServlet]] Servlet.service() for servlet TestServlet threw exceptionjava.lang.ClassCastException: $Proxy72 cannot be cast to lesson.stateless.HelloWorld	at lesson.servlets.TestServlet.doGet(TestServlet.java:21)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)	at java.lang.Thread.run(Thread.java:662)
    Can some help please.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default Re: EJB 3 jboss 4.2 error

    That's not the easiest stack trace to read...

    What's happening at:
    at lesson.servlets.TestServlet.doGet(TestServlet.java :21)

  3. #3
    vikt0r87 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default Re: EJB 3 jboss 4.2 error

    Any ideas?

    Line 21: HelloWorld hello = (HelloWorld) ctx.lookup("TestApplication/HelloWorldBean/remote");

  4. #4
    vikt0r87 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default Re: EJB 3 jboss 4.2 error

    Sorry for the stack trace ... i`m new to this forum

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default Re: EJB 3 jboss 4.2 error

    OK.
    It seems to think they're two different classes.
    I'm not so up on JBOss, but it's possible either that the local and remote interfaces were compiled under different Java versions or, more likely, there's something up with your class loaders. I had a quick Google and it sounds like the latter might be the problem.

    Can't say I found an easy to post solution.

  6. #6
    vikt0r87 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default Re: EJB 3 jboss 4.2 error

    So ... what do i have to do next? Check the class loaders? If so, what do i need to check them for? Please give me a hint.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,006
    Rep Power
    20

    Default Re: EJB 3 jboss 4.2 error

    You might have to wait for someone else to come in and answer that.
    Have you tried the JBoss forums?

  8. #8
    vikt0r87 is offline Member
    Join Date
    Sep 2011
    Posts
    8
    Rep Power
    0

    Default Re: EJB 3 jboss 4.2 error

    I`ll try now. Thanks for helping.

Similar Threads

  1. where soap in jboss
    By javastuden in forum Advanced Java
    Replies: 0
    Last Post: 03-11-2010, 03:28 AM
  2. I'm getting this error when i starts jboss
    By javastuden in forum Advanced Java
    Replies: 1
    Last Post: 01-21-2010, 07:51 AM
  3. Error in deployment of MDB in jboss
    By s.saikia in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 09-30-2009, 02:33 PM
  4. JBoss and JBoss Profiler
    By 82rathi.angara in forum Networking
    Replies: 0
    Last Post: 06-18-2008, 01:47 PM
  5. Replies: 3
    Last Post: 05-14-2007, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •