[EJB 3.0] - WebApplication fails to lookup SessionBean
by masoodah@mdsit.com
Hi,
I have an ear application that runs under jboss 4.2.0.GA version. I have implemented EJB3 session bean.
The AdSetSchedule Session Bean is bound as shown below in jndi view
+- DPDS-Enterprise (class: org.jnp.interfaces.NamingContext)
|
| +- AdSetScheduleBean (class: org.jnp.interfaces.NamingContext)
| | +- local (proxy: $Proxy99 implements interface com.dreamplay.dpds.ejb.AdSetScheduleLocal,interface org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
| | +- remote (proxy: $Proxy98 implements interface com.dreamplay.dpds.ejb.AdSetScheduleRemote
The war application that uses JavaServer Faces calls the session bean like so.
try {
InitialContext ctx = new InitialContext();
System.out.println("Lookup AdSetScheduleBean");
Object o = ctx.lookup("DPDS-Enterprise/AdSetScheduleBean/local");
System.out.println("Done Lookup");
System.out.println("class name " + o.toString());
System.out.println("-----------");
com.dreamplay.dpds.ejb.AdSetScheduleLocal ad = (com.dreamplay.dpds.ejb.AdSetScheduleLocal) o;
System.out.println("-----Done Lookup");
System.out.println("class name " + ad.toString());
} catch (NamingException e) {
System.out.println("Naming Error occurred: " + e.toString());
} catch (ClassCastException e) {
System.out.println("ClassCast Error occurred: " + e.toString());
}
In my log I get the following error.
09:47:38,181 INFO [STDOUT] Lookup AdSetScheduleBean
09:47:38,181 INFO [STDOUT] Done Lookup
09:47:38,181 INFO [STDOUT] class name AdSetScheduleBean
09:47:38,181 INFO [STDOUT] -----------
09:47:38,181 INFO [STDOUT] ClassCast Error occurred: java.lang.ClassCastException: $Proxy247 cannot be cast to com.dreamplay.dpds.ejb.AdSetScheduleLocal
I tried casting the object like
com.dreamplay.dpds.ejb.AdSetScheduleLocal ad = (com.dreamplay.dpds.ejb.AdSetScheduleBean)o;
Even this gives me the error
10:04:21,506 INFO [STDOUT] ClassCast Error occurred: java.lang.ClassCastException: $Proxy247 cannot be cast to com.dreamplay.dpds.ejb.AdSetScheduleBean
What am I doing wrong.
Can anybody help.
Thanks
Masoodah
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140531#4140531
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140531
18 years
[Installation, Configuration & DEPLOYMENT] - schedulable job blocks other schedulable jobs
by skymic
Hi,
I am running a JBoss V4.0.5 GA cluster on a LINUX platform.
I have two schedulable jobs. The configuration in scheduler-service.xml is as follows:
<mbean code="org.jboss.varia.scheduler.Scheduler" name="ch.skyguide.aim.schedulable:service=ISUPAgentProxy">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">ch.skyguide.aim.schedulable.agent.isup.ISUPAgentProxy</attribute>
| <attribute name="SchedulableArguments">localhost,8080,localhost,8080</attribute>
| <attribute name="SchedulableArgumentTypes">java.lang.String,java.lang.String,java.lang.String,java.lang.String</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">60000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| <attribute name="FixedRate">true</attribute>
| </mbean>
|
| <mbean code="org.jboss.varia.scheduler.Scheduler" name="ch.skyguide.aim.schedulable:service=ImportNavDataProxy">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">ch.skyguide.aim.schedulable.agent.importnavdata.ImportNavDataProxy</attribute>
| <attribute name="SchedulableArguments">c:/NavDataUpload,c:/NavDataUploadTmp,${jboss.server.log.dir},jnp://zhwtdeibeckml:1099/SDOCIImportApp/ImportNavDataAgentImpl/local</attribute>
| <attribute name="SchedulableArgumentTypes">java.lang.String,java.lang.String,java.lang.String,java.lang.String</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">180000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| <attribute name="FixedRate">true</attribute>
| </mbean>
Both schedulable classes ISUPAgentProxy and ImportNavDataProxy are deployed in the same jar-archive in the <jboss dir>/server/default/lib directory. This is to ensure that the schedulable jobs are started automatically with jboss server startup.
Both schedulable classes ISUPAgentProxy and ImportNavDataProxy
call stateless session beans which perform the actual job. The call is done like this:
InitialContext ic = new InitialContext();
| ImportNavDataAgent importNavDataAgent =
| (ImportNavDataAgent) ic.lookup(urlString);
| importNavDataAgent.doSomething();
The schedulable class ImportNavDataProxy looks up a stateless session bean ImportNavDataAgent which performs a task that can take up to 2 hours.
I have the effect that this long running job blocks the whole scheduler (also other scheduled jobs) until the task is finished.
This effect is highly undesirable.
How can I trigger a job from inside a schedulable class which then runs independently of the scheduler? The scheduler is not supposed to wait for the termination of the job and carry on with its work in the sense of "fire and forget".
Who can help?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140516#4140516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140516
18 years
[Clustering/JBoss] - Re: How do servlets communicate with session beans across cl
by yugantshah
Hello,
Thanks for reply.
I have done the look up programmatically as said below.
The code works.
I have one more issue, while testing one scenario:
The current configuration is:
I am having Two clusters clusterA and clusterB
clusterA is having the war file and this is deployed one separate machine(say machine X) in a JBOSS instance.
clusterB is having the ear. This is deployed as farm deployment and the there are two JBOSS instances on separete machines.(say machine Y and Z)
So, there are three machines each having JBOSS instance.
Further, Apache HTTP server is deployed on machine X
Cluster A has one node and B has two nodes.
The test scenario is :
we have a JSP page which makes a call to the session bean.
The session bean has a for loop that counts and prints counter till 40.
We hit one request
1. One node in clusterB starts processing(Node Y)
2. Now, we down this node.
3. The request is shifted to other node(Node Z)
4. We start the previous node(Node Y) and then close the node(Node Z) which is processing
Expected. The node A should again start processing the request
Actual: error occurs on the node X of clusterA i.e where the war file is deployed.
NOTE:
Also, pLease confirm if Jboss handles such test scenario.
Is there any limit while toggling the request between the nodes.
Error:
008-04-01 13:31:55,340 WARN [org.jgroups.protocols.UDP] discarded message from different group "clusterB-EntityCache" (our group is "clusterA-EntityCache"). Sender was 192.168.0.15:2163
2008-04-01 13:31:56,068 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a554da, socket://192.168.0.13:3873] got Exception java.net.ConnectException: Connection refused: connect, creation attempt took 1192 ms
2008-04-01 13:31:56,068 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a554da, socket://192.168.0.13:3873] got Exception java.net.ConnectException: Connection refused: connect, creation attempt took 1192 ms
2008-04-01 13:31:56,068 DEBUG [org.jboss.remoting.InvokerRegistry] decremented SocketClientInvoker[a554da, socket://192.168.0.13:3873]'s count, current count 1
2008-04-01 13:31:56,068 WARN [com.ecebs.hops.messaging.MessagingRequestHandlerServlet] Exception occured while executing the Download message request
java.lang.RuntimeException: cluster invocation failed, last exception was:
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:166)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:112)
at $Proxy87.handleDownloadMessageRequest(Unknown Source)
at com.ecebs.hops.messaging.MessagingRequestHandlerServlet.doGet(MessagingRequestHandlerServlet.java:161)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://192.168.0.13:3873/]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:532)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
... 30 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:815)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:525)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:112)
at $Proxy87.handleDownloadMessageRequest(Unknown Source)
at com.ecebs.hops.messaging.MessagingRequestHandlerServlet.doGet(MessagingRequestHandlerServlet.java:161)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
... 32 more
2008-04-01 13:31:56,068 DEBUG [org.jboss.remoting.InvokerRegistry] removed SocketClientInvoker[a554da, socket://192.168.0.13:3873] from registry
2008-04-01 13:31:56,068 DEBUG [org.jboss.remoting.transport.socket.MicroSocketClientInvoker] SocketClientInvoker[a554da, socket://192.168.0.13:3873] disconnecting ...
2008-04-01 13:31:56,068 WARN [com.ecebs.hops.messaging.MessagingRequestHandlerServlet] Exception occured while executing the Download message request
java.lang.RuntimeException: cluster invocation failed, last exception was:
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:166)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:112)
at $Proxy87.handleDownloadMessageRequest(Unknown Source)
at com.ecebs.hops.messaging.MessagingRequestHandlerServlet.doGet(MessagingRequestHandlerServlet.java:161)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://192.168.0.13:3873/]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:532)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
... 30 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:815)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:525)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:77)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor.invoke(ClusteredIsLocalInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:112)
at $Proxy87.handleDownloadMessageRequest(Unknown Source)
at com.ecebs.hops.messaging.MessagingRequestHandlerServlet.doGet(MessagingRequestHandlerServlet.java:161)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
... 32 more
2008-04-01 13:31:56,332 WARN [org.jgroups.protocols.UDP] discarded message from different group "clusterB-EntityCache" (our group is "clusterA-EntityCache"). Sender was 192.168.0.15:2163
2008-04-01 13:31:57,199 WARN [org.jgroups.protocols.UDP] discarded message from different group "Tomcat-clusterB" (our group is "Tomcat-clusterA"). Sender was 192.168.0.15:2146
2008-04-01 13:31:58,190 WARN [org.jgroups.protocols.UDP] discarded message from different group "Tomcat-clusterB" (our group is "Tomcat-clusterA"). Sender was 192.168.0.15:2146
2008-04-01 13:32:03,782 DEBUG [org.jboss.web.tomcat.service.session.JBossCacheManager] Looking for sessions that have expired ...
2008-04-01 13:32:04,804 WARN [org.jgroups.protocols.UDP] discarded message from different group "clusterB" (our group is "clusterA"). Sender was 192.168.0.15:2152
Thanks in advance,
Yugant Shah
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140514#4140514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140514
18 years
[EJB 3.0] - Using @Resource causes NPE at org.jboss.ejb3.JndiUtil.lookup
by gsendt
Hello,
In a stateless EJB im using:
| @Resource(name = "mail/localMail", mappedName = "Mail", shareable = true, type = Session.class)
| private Session m_mailSession;
|
Trying to connect the Bean from a Client I got an NullPointerException.
Im using JBoss-4.2.2.GA default installation without any changes
Windows XP
Any hints?
Regards,
Georg
| Exception in thread "main" java.lang.NullPointerException
| at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:49)
| at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:87)
| at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:112)
| at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:107)
| at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:65)
| at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:111)
| at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:49)
| at org.jboss.ejb3.ThreadlocalPool.create(ThreadlocalPool.java:50)
| at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:90)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
| at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
| at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:769)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.registration(Unknown Source)
| at gse.client.Client.main(Client.java:13)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
| at $Proxy0.registration(Unknown Source)
| at gse.client.Client.main(Client.java:13)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140505#4140505
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140505
18 years