<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: JBoss 5 --> JBoss 6 M5 EJB3 already registered
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/tecnico">tecnico</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/570221#570221">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Thank you for your answer.</p><p>Actually in my ear there were more then one time the same ejb:</p><p>myear.ear</p><p>     mywar.war</p><p>          myejb.jar</p><p>     myejb.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>and this was working in JBoss 5.</p><p>I'm packaging my application with maven so now I've changed the dependencies in the pom.xml of the "war project" updating the scope of the ejb project to provided:</p><blockquote class="jive-quote"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><br/>    <dependencies><br/>        <!-- javaee per ejb --><br/>        <dependency><br/>            <groupId>javaee</groupId><br/>            <artifactId>javaee-api</artifactId><br/>            <version>5</version><br/>            <scope>provided</scope><br/>        </dependency><br/>        <dependency><br/>            <groupId>org.jboss.resteasy</groupId><br/>            <artifactId>resteasy-jaxrs</artifactId><br/>            <version>2.0.1.GA</version><br/>            <exclusions><br/>                <exclusion><br/>                    <artifactId>slf4j-simple</artifactId><br/>                    <groupId>org.slf4j</groupId><br/>                </exclusion><br/>                <exclusion><br/>                    <artifactId>slf4j-api</artifactId><br/>                    <groupId>org.slf4j</groupId><br/>                </exclusion><br/>                <exclusion><br/>                    <artifactId>javassist</artifactId><br/>                    <groupId>javassist</groupId><br/>                </exclusion><br/>            </exclusions><br/>        </dependency><br/><strong>        <dependency><br/>            <groupId>tpi.gimovit</groupId><br/>            <artifactId>gimovit-ejb</artifactId><br/>            <version>1.0</version><br/>            <scope>provided</scope><br/>        </dependency></strong><br/>        <!--  GWT dependencies (from central repo) --><br/>        <dependency><br/>            <groupId>com.google.gwt</groupId><br/>            <artifactId>gwt-servlet</artifactId><br/>            <version>${gwt.version}</version><br/>            <scope>runtime</scope><br/>        </dependency><br/>        <dependency><br/>            <groupId>com.google.gwt</groupId><br/>            <artifactId>gwt-user</artifactId><br/>            <version>${gwt.version}</version><br/>            <scope>provided</scope><br/>        </dependency><br/>        <!-- SmartGWT --><br/>        <dependency><br/>            <groupId>com.smartgwt</groupId><br/>            <artifactId>smartgwt</artifactId><br/>            <version>2.2</version><br/>        </dependency><br/>        <dependency><br/>            <groupId>com.smartgwt</groupId><br/>            <artifactId>smartgwt-skins</artifactId><br/>            <version>2.2</version><br/>        </dependency><br/>        <!-- test --><br/>        <dependency><br/>            <groupId>junit</groupId><br/>            <artifactId>junit</artifactId><br/>            <version>4.7</version><br/>            <scope>test</scope><br/>        </dependency><br/>    </dependencies></p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Now the ejb isn't included in the war and I can compile, package and start the application but when in the application calls the ejb I recieve this error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote">10:01:24,604 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/gimovit-gwt]] Exception while dispatching incoming RPC call: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String tpi.gimovit.gwt.client.GreetingService.checkLogin(java.lang.String,java.lang.String)' threw an unexpected exception: javax.ejb.EJBException: java.lang.NullPointerException<br/>    at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) [:]<br/>    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546) [:]<br/>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166) [:]<br/>    at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) [:]<br/>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Beta2]<br/>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Beta2]<br/>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.20100911-M5]<br/>    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.20100911-M5]<br/>    at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR3]<br/>    at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR3]<br/>    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.20100911-M5]<br/>    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.20100911-M5]<br/>    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.20100911-M5]<br/>    at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.20100911-M5]<br/>    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.20100911-M5]<br/>    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.20100911-M5]<br/>    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:6.0.0.20100911-M5]<br/>    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.20100911-M5]<br/>    at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]<br/>Caused by: javax.ejb.EJBException: java.lang.NullPointerException<br/>    at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:183) [:0.0.1]<br/>    at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [:0.0.1]<br/>    at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]<br/>    at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]<br/>    at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:369) [:1.5.1]<br/>    at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:88) [:1.5.1]<br/>    at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:75) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62) [:1.0.1.GA]<br/>    at $Proxy553.invoke(Unknown Source)    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11-alpha-2]<br/>    at $Proxy552.getSession(Unknown Source)    at tpi.gimovit.gwt.server.GreetingServiceImpl.checkLogin(GreetingServiceImpl.java:65) [:]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]<br/>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]<br/>    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]<br/>    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) [:]<br/>    ... 23 more<br/>Caused by: java.lang.NullPointerException<br/>    at tpi.gimovit.ejb.GimovitCoreBean.getSession(GimovitCoreBean.java:50) [:]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]<br/>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]<br/>    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72) [:1.0.7]<br/>    at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76) [:1.0.7]<br/>    at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62) [:1.0.7]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_22]<br/>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_22]<br/>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_22]<br/>    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_22]<br/>    at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72) [:1.0.7]<br/>    at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_23069842.invoke(InvocationContextInterceptor_z_fillMethod_23069842.java)<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88) [:1.0.7]<br/>    at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_23069842.invoke(InvocationContextInterceptor_z_setup_23069842.java)<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.async.impl.interceptor.FutureSerializingInterceptor.invoke(FutureSerializingInterceptor.java:88) [:1.0.0-alpha-5]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68) [:1.5.1]<br/>    at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.Alpha3]<br/>    at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:90) [:1.5.1]<br/>    at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]<br/>    ... 57 more<br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>In the ejb GimovitCoreBean at line 50, I call an Entity Bean but I've recieved no errors with the persistence unit.</p><p>I don't understand if there is something wrong in my configuration, can you suggest me where I have to make changes?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Thank you for the help.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/570221#570221">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>