[Installation, Configuration & DEPLOYMENT] - JBOSS Migration issue from 3.2 to 4.0 NullPointerException
by marajukiran
Hi,
Is there any steps to follow migrating application from JBOSS 3.2 to JBOSS 4.0 .i am migrating my application from JBOSS 3.2.6 to JBOSS 4.0.5 and getting the following NullPointerException JDOservice get() method.
The same code is working properly with JBOSS 3.2.6 but, when i migrating to JBOSS 4.0.5 throwing NullPointerException
Stacktrace:
ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.util.Iterator mypackage.xxx.ejb.xxxBean.searchGlossary.searchGlossary(java.lang.String) throws java.rmi.RemoteException:
java.lang.NullPointerException
at com.mypackage.services.jdo.JDOService.get(Unknown Source)
at com.mypackage.xxx.ejb.xxxBean.searchGlossary(Unknown Source)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
at org.jboss.ejb.Container.invoke(Container.java:954)
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:324)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
at $Proxy64.searchGlossary(Unknown Source)
at com.mypackage.xxx.appflow.SearchGlossaryAction.execute(Unknown Source)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:534)
please let me know how to solve this.
Regards,
Kiran Maraju
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170243#4170243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170243
17 years, 11 months
[Installation, Configuration & DEPLOYMENT] - Re: 4.2.2 MBean getClientHost java.rmi.server.ServerNotActiv
by guy_rouillier
Ok, I finally got this figured out. For those who may stumble upon this thread, here is a quick summary of what I had to do to get this to work. If someone can tell me where to post a code sample, I'll do that when I get some time:
(1) Implement a client interceptor that captures the client IP address in a static initialization block:
| aIpAddr = InetAddress.getLocalHost().getHostAddress();
|
Then, in the invoke method, add this value to the invocation object:
| invocation.setValue("client_ip_addr", aIpAddr);
|
This code runs in the client VM.
(2) Implement a container interceptor to copy the captured value into the server VM. In order to have this value retrievable by an EJB and then by MBeans called by that EJB, you'll need a ThreadLocal variable. In the code below ClientIpAddress manages a ThreadLocal variable.
| String aIpAddr = (String) mi.getValue("client_ip_addr");
| ClientIPAddress.set(aIpAddr);
|
(3) ThreadLocal variables are managed as class static variables, at least in my simple case (and in the Sun Java documentation.) So, to use the value in an EJB or MBean, you just reference it. This assumes the EJB and the MBean are running in the same VM. If not, I suppose you'll have to figure out some way to pass along the value to the target VM, I imagine through another pair of invokers.
| ClientIPAddress.get()
|
I'd like to say a sincere thanks to myself for helping me through this ;).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170242#4170242
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170242
17 years, 11 months