tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: OpenEJB + Tomcat + Eclipse problem
Date Thu, 19 Jan 2017 13:33:24 GMT
Hi

which version do you use? think it should be tomee.war if >= 4.x.

Also: why not using tomee instead of tomcat directly? the setup is well
done there




Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-01-19 12:33 GMT+01:00 saurabhrj99 <saurabhrj99@gmail.com>:

>  Hi All,
> I m very new to OpenEJB..wanted to run a EJB project in Tomcat..Using
> Eclipse neon as IDE,Tomcat 6and JDK7.
> I am successfully done with installation of openejb.war in tomcat/webApps
> directory and have done automatic installation of listner class and
> javaagent to tomcat.
>
> I have created a Dynamic web project named TestEJB in eclipse having
> session
> beans, calling it from servlet(TestServlet).using Hibernate as
> JPAimplementation.
>
> After adding a instance of tomcat server and started it.
> Its started with..Error in console
> *NO Listener found for openEJB.*
>
> java.lang.NullPointerException
>         at
> org.apache.openejb.tomcat.loader.OpenEJBListener.lifecycleEvent(
> OpenEJBListener.java:49)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
> LifecycleSupport.java:142)
>         at
> org.apache.catalina.core.StandardServer.initialize(
> StandardServer.java:820)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> After then while running TestEJB (Dynamic web project) while calling
> servlet
> as
> http://localhost:8080/TestEJB/TestServlet getting exception
>
> Inside servlet i am injecting sessionbean as
>         @EJB
>          private UserService userService;
>
>
>
>
> message : Error instantiating servlet class
> org.saurabh.test.openejb.web.TestServlet
>
> description : The server encountered an internal error that prevented it
> from fulfilling this request.
>
> exception
> javax.servlet.ServletException: Error instantiating servlet class
> org.saurabh.test.openejb.web.TestServlet
>
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:103)
>         org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:293)
>         org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:859)
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> process(Http11Protocol.java:610)
>         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> JIoEndpoint.java:503)
>         java.lang.Thread.run(Thread.java:745)
>
>
>
> root cause
> javax.naming.NameNotFoundException: Name
> org.saurabh.test.openejb.web.TestServlet is not bound in this Context
>         org.apache.naming.NamingContext.lookup(NamingContext.java:776)
>         org.apache.naming.NamingContext.lookup(NamingContext.java:159)
>
> org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(
> DefaultAnnotationProcessor.java:278)
>
> org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(
> DefaultAnnotationProcessor.java:192)
>
> org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:103)
>         org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:293)
>         org.apache.coyote.http11.Http11Processor.process(
> Http11Processor.java:859)
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.
> process(Http11Protocol.java:610)
>         org.apache.tomcat.util.net.JIoEndpoint$Worker.run(
> JIoEndpoint.java:503)
>         java.lang.Thread.run(Thread.java:745)
>
> What i am doing wrong ..Need your support.
>
> Thanks,
> Saurabh
>
>
>
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/OpenEJB-Tomcat-Eclipse-problem-tp4680895.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message