openejb-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Gallimore <jonathan.gallim...@gmail.com>
Subject Re: Openejb + Tomcat
Date Sun, 27 Feb 2011 20:58:35 GMT
Hi there,

Thanks for giving the TomEE bundle a try. It looks like you have included
the OpenEJB jars in your war's WEB-INF directory, which you don't need to do
(the container should provide them for you), and should avoid doing as we'll
try and scan them and deploy them as ejb jars at deploy time.

I've removed these from your project, and included javaee-api.jar in a
directory that doesn't get included in the war when it is exported from
Eclipse. It looks like it builds and runs correctly now.

I've uploaded a zip of your modified project to:
http://people.apache.org/~jgallimore/poc.zip

Hope that helps.

Regards

Jon

On Sat, Feb 26, 2011 at 1:41 PM, Amirouche Boubekki <
amirouche.boubekki@gmail.com> wrote:

> Héllo,
>
> I'm trying to get working a java jee project with openejb and tomcat with
> no
> success so far.
>
> I'm using the lastest openejb jars 3.1.4 with Apache TomEE pre-bundled with
> openejb, I'm using java 1.6.0_24 from sun
>
> I use Helios Eclipse to run the project.
>
> A simple web application is available at bitbucket [1] demonstrating how i
> use openejb+servlet.
>
> Currently the server fail to build the Foo servlet which use an ejb
> injected
> with the @EJB annotations, here is the stacktrace from the 500 page :
>
> *exception*
>
> javax.servlet.ServletException: Erreur à l'instantiation de la classe
> servlet faf.Foo
>
>  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
>
>  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>
>  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>        java.lang.Thread.run(Thread.java:662)
>
> *cause mère*
>
> javax.naming.NameNotFoundException: Le Nom faf.Foo n'est pas lié à ce
> Contexte
>        org.apache.naming.NamingContext.lookup(NamingContext.java:770)
>        org.apache.naming.NamingContext.lookup(NamingContext.java:153)
>
>  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:102)
>
>  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
>
>  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
>
>  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
>
>  org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
>        java.lang.Thread.run(Thread.java:662)
>
>
> There is also an error in the console :
>
> ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
> property 'source' to 'org.eclipse.jst.jee.server:faf2' did not find a
> matching property.
> java.lang.NullPointerException
>    at
>
> org.apache.openejb.tomcat.loader.OpenEJBListener.lifecycleEvent(OpenEJBListener.java:60)
>    at
>
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>    at
> org.apache.catalina.core.StandardServer.initialize(StandardServer.java:770)
>    at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
>    at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    at java.lang.reflect.Method.invoke(Method.java:597)
>    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> What am I missing ?
>
>
> [1] https://bitbucket.org/abki/tomcatopenejbspring/src
>

Mime
View raw message