Announcement Announcement Module
Collapse
No announcement yet.
java.lang.NullPointerException: domain was null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.NullPointerException: domain was null

    This is the quirkiest thing I've dealt with yet. We're using Spring EJB to access a separate instance on an OC4J 10.1.2 application server. The method is intercepted using the NameMatchMethodPointcutAdvisor class. We then call a proxy to get an EJB to access the instance methods. So the steps are as follows:

    1) User "saves"
    2) The saveMethod() is advised and separate logic is called based on the method name, We Make a Proxy call to get an EJB from another instance
    3) The Proxy creation is performed successfully. But as soon as the RMI call is made we throw:

    07/10/01 13:28:52 java.lang.reflect.InvocationTargetException
    07/10/01 13:28:52 at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    07/10/01 13:28:52 at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    07/10/01 13:28:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    07/10/01 13:28:52 at java.lang.reflect.Method.invoke(Method.java:324)
    07/10/01 13:28:52 at com.evermind.server.rmi.RMICallHandler.run(RMICall Handler.java:124)
    07/10/01 13:28:52 at com.evermind.server.rmi.RMICallHandler.run(RMICall Handler.java:48)
    07/10/01 13:28:52 at com.evermind.util.ReleasableResourcePooledExecutor $MyWorker.run(ReleasableResourcePooledExecutor.jav a:192)
    07/10/01 13:28:52 at java.lang.Thread.run(Thread.java:534)
    07/10/01 13:28:52 Caused by: com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: java.lang.reflect.UndeclaredThrowableException; nested exception is:
    java.lang.reflect.UndeclaredThrowableException
    07/10/01 13:28:52 at VoucherSession_StatelessSessionBeanWrapper2.saveVo ucher(VoucherSession_StatelessSessionBeanWrapper2. java:1987)
    07/10/01 13:28:52 ... 8 more
    07/10/01 13:28:52 Caused by: java.lang.reflect.UndeclaredThrowableException
    07/10/01 13:28:52 at $Proxy0.saveVoucher(Unknown Source)
    07/10/01 13:28:52 at edu.suny.sysadm.finance.accountspayable.services.s ession.voucher.VoucherSessionBean.saveVoucher(Vouc herSessionBean.java:189)
    07/10/01 13:28:52 at VoucherSession_StatelessSessionBeanWrapper2.saveVo ucher(VoucherSession_StatelessSessionBeanWrapper2. java:1934)
    07/10/01 13:28:52 ... 8 more
    07/10/01 13:28:52 Caused by: edu.suny.sysadm.finance.object.mgt.FinanceObjectLo ckingException: edu.suny.sysadm.finance.object.mgt.FinanceObjectLo ckingException: edu.suny.sysadm.finance.object.mgt.ObjectManagemen tException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'objectLockingSessionBean' defined in class path resource [META-INF/ObjectManagement-applicationContext-Client.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: domain was null
    07/10/01 13:28:52 at edu.suny.sysadm.finance.accountspayable.advice.Obj ectLockBeforeAdvice.before(ObjectLockBeforeAdvice. java:87)
    07/10/01 13:28:52 at org.springframework.aop.framework.adapter.MethodBe foreAdviceInterceptor.invoke(MethodBeforeAdviceInt erceptor.java:49)
    07/10/01 13:28:52 at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :161)
    07/10/01 13:28:52 at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:203)
    07/10/01 13:28:52 ... 11 more
    07/10/01 13:28:52 Caused by: edu.suny.sysadm.finance.object.mgt.FinanceObjectLo ckingException: edu.suny.sysadm.finance.object.mgt.ObjectManagemen tException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'objectLockingSessionBean' defined in class path resource [META-INF/ObjectManagement-applicationContext-Client.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: domain was null
    07/10/01 13:28:52 at edu.suny.sysadm.finance.accountspayable.advice.Obj ectLockBeforeAdvice.before(ObjectLockBeforeAdvice. java:78)
    07/10/01 13:28:52 ... 14 more
    07/10/01 13:28:52 Caused by: edu.suny.sysadm.finance.object.mgt.ObjectManagemen tException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'objectLockingSessionBean' defined in class path resource [META-INF/ObjectManagement-applicationContext-Client.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: domain was null
    07/10/01 13:28:52 at edu.suny.sysadm.finance.object.mgt.proxy.FinanceOb jectManagementLocator.getObjectManagementServicePr oxy(FinanceObjectManagementLocator.java:128)
    07/10/01 13:28:52 at edu.suny.sysadm.finance.accountspayable.services.A ccountsPayableServiceDictionary.getObjectMangagmen tProxy(AccountsPayableServiceDictionary.java:115)
    07/10/01 13:28:52 at edu.suny.sysadm.finance.accountspayable.advice.Obj ectLockBeforeAdvice.before(ObjectLockBeforeAdvice. java:74)
    07/10/01 13:28:52 ... 14 more
    07/10/01 13:28:52 Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'objectLockingSessionBean' defined in class path resource [META-INF/ObjectManagement-applicationContext-Client.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException: domain was null
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1148)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:427)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 51)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:144)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:248)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:160)
    07/10/01 13:28:52 at org.springframework.context.support.AbstractApplic ationContext.getBean(AbstractApplicationContext.ja va:703)
    07/10/01 13:28:52 at edu.suny.sysadm.finance.util.spring.FinanceService Factory.getProxy(FinanceServiceFactory.java:139)
    07/10/01 13:28:52 at edu.suny.sysadm.finance.object.mgt.proxy.FinanceOb jectManagementLocator.getObjectManagementServicePr oxy(FinanceObjectManagementLocator.java:123)
    07/10/01 13:28:52 ... 16 more
    07/10/01 13:28:52 Caused by: java.lang.NullPointerException: domain was null
    07/10/01 13:28:52 at com.evermind.server.rmi.RMIServer.addNode(RMIServe r.java:873)
    07/10/01 13:28:52 at com.evermind.server.rmi.RMIServer.getConnection(RM IServer.java:976)
    07/10/01 13:28:52 at com.evermind.server.rmi.RMIInitialContextFactory.g etInitialContext(RMIInitialContextFactory.java:382 )
    07/10/01 13:28:52 at javax.naming.spi.NamingManager.getInitialContext(N amingManager.java:662)
    07/10/01 13:28:52 at javax.naming.InitialContext.getDefaultInitCtx(Init ialContext.java:243)
    07/10/01 13:28:52 at javax.naming.InitialContext.init(InitialContext.ja va:219)
    07/10/01 13:28:52 at javax.naming.InitialContext.<init>(InitialContext. java:195)
    07/10/01 13:28:52 at org.springframework.jndi.JndiTemplate.createInitia lContext(JndiTemplate.java:105)
    07/10/01 13:28:52 at org.springframework.jndi.JndiTemplate.execute(Jndi Template.java:83)
    07/10/01 13:28:52 at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:121)
    07/10/01 13:28:52 at org.springframework.jndi.JndiTemplate.lookup(JndiT emplate.java:146)
    07/10/01 13:28:52 at org.springframework.jndi.JndiLocatorSupport.lookup (JndiLocatorSupport.java:91)
    07/10/01 13:28:52 at org.springframework.jndi.JndiObjectLocator.lookup( JndiObjectLocator.java:105)
    07/10/01 13:28:52 at org.springframework.ejb.access.AbstractRemoteSlsbI nvokerInterceptor.lookup(AbstractRemoteSlsbInvoker Interceptor.java:92)
    07/10/01 13:28:52 at org.springframework.ejb.access.AbstractSlsbInvoker Interceptor.refreshHome(AbstractSlsbInvokerInterce ptor.java:104)
    07/10/01 13:28:52 at org.springframework.ejb.access.AbstractSlsbInvoker Interceptor.afterPropertiesSet(AbstractSlsbInvoker Interceptor.java:91)
    07/10/01 13:28:52 at org.springframework.ejb.access.SimpleRemoteStatele ssSessionProxyFactoryBean.afterPropertiesSet(Simpl eRemoteStatelessSessionProxyFactoryBean.java:97)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1175)
    07/10/01 13:28:52 at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1145)
    07/10/01 13:28:52 ... 24 more
    07/10/01 13:28:52 Read command: 4

    I've looked into this deeply I've removed dedicated.connection = true
    I have also turned off the caching of the home interface neither of these things solves my problem, and what makes me pull my hair out is that this is totally random. Sometimes the connection is there sometimes the connection is not. If you restart the instance running the Advice, the exception goes way. I've already spent way to much time on this problem. Anyone with any ideas feel free to let me have them.

    Thanks in advance
    Charles
Working...
X