0 Replies Latest reply on May 15, 2007 10:53 AM by grininger.h

    basic question about linking JCA connection pool (jboss 4.2

    grininger.h Newbie

      Hi,
      my previous posting is maybe to long so I try to ask again with focusing on the core problem:

      1. I want to get an JCA Datasource from java: namespace (JVM locale), e.g "java:/jdbc/maindb"
      2. Then I want to bind this object (an org.jboss.resource.adapter.jdbc.WrapperDataSource) again (=a second time) into the JNDI tree but this time into the global namespace. Eg. "/globalds/maindb".

      Now my problem: when doing this (the bind) I get the following exception:

      java.lang.NullPointerException
      16:40:02,392 ERROR [STDERR] at org.jnp.interfaces.NamingContext.bind(NamingContext.java:556)
      16:40:02,392 ERROR [STDERR] at org.jnp.interfaces.NamingContext.bind(NamingContext.java:531)
      16:40:02,392 ERROR [STDERR] at test.TestServlet.init(TestServlet.java:126)
      16:40:02,392 ERROR [STDERR] at javax.servlet.GenericServlet.init(GenericServlet.java:212)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4071)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4375)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
      16:40:02,392 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
      16:40:02,392 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:40:02,392 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      16:40:02,392 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,392 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,392 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
      16:40:02,392 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,393 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
      16:40:02,393 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:40:02,393 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      16:40:02,393 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,393 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,393 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,393 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:300)
      16:40:02,393 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
      16:40:02,393 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:372)
      16:40:02,393 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
      16:40:02,393 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
      16:40:02,393 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      16:40:02,393 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      16:40:02,393 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      16:40:02,393 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      16:40:02,393 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,393 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:40:02,393 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,418 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      16:40:02,418 ERROR [STDERR] at $Proxy0.start(Unknown Source)
      16:40:02,418 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
      16:40:02,418 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      16:40:02,418 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,418 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      16:40:02,418 ERROR [STDERR] at $Proxy45.start(Unknown Source)
      16:40:02,418 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      16:40:02,418 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
      16:40:02,418 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,418 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:40:02,418 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      16:40:02,419 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      16:40:02,419 ERROR [STDERR] at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      16:40:02,419 ERROR [STDERR] at $Proxy46.start(Unknown Source)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
      16:40:02,419 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
      16:40:02,419 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      16:40:02,419 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      16:40:02,419 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      16:40:02,419 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      16:40:02,420 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      16:40:02,420 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
      16:40:02,420 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      16:40:02,420 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
      16:40:02,420 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      16:40:02,420 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      16:40:02,420 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      


      What's wrong?
      I can register a dummy object (new Object()) into the global namespace without problems, it seems like the problem lies somewhere in the WrapperDatasource object, but I'm not sure.

      I'm using Jboss 4.2 .0 CR1.

      Thanks for you effort!!!