2 Replies Latest reply on Aug 6, 2002 1:59 PM by Douglas Campbell

    Nullpointer when deploying simple JCA

    Douglas Campbell Newbie

      Hi,

      I've put together a very basic jca resource adapter and the service.xml file to go with it under jboss3.0 (i.e. jboss3.0.0, the latest, not a snapshot)

      When the RARDeployment attempts to bind my connection factory in jndi it's throwing a null pointer exception.

      I've included my meta files below. Any help is much appreciated...

      stack---

      java.lang.NullPointerException
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:400)
      at org.jnp.interfaces.NamingContext.bind(NamingContext.java:381)
      at org.jboss.naming.Util.bind(Util.java:83)
      at org.jboss.naming.Util.bind(Util.java:70)
      at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnectionFactory(RARDeployment.java:590)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.startService(BaseConnectionManager2.java:382)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:894)
      at $Proxy6.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:340)
      at org.jboss.system.ServiceController.start(ServiceController.java:358)
      at org.jboss.system.ServiceController.start(ServiceController.java:358)

      service.xml
      ------------

      <?xml version="1.0" encoding="UTF-8"?>




      <!--make the rar deploy - A BIG HACK till xslt based deployment is written-->
      jboss.jca:service=RARDeployer

      <depends optional-attribute-name="ManagedConnectionFactoryName">


      <!--more hack-->

      <!-- NOTE!!! the value you give to 'name=' below should be the same as that
      given for the display-name tag in the ra.xml -->
      <depends optional-attribute-name="OldRarDeployment">
      jboss.jca:service=RARDeployment,name=OFS Adapter


      myJndiName




      <depends optional-attribute-name="ManagedConnectionPool">


      ByContainer




      <depends optional-attribute-name="CachedConnectionManager">
      jboss.jca:service=CachedConnectionManager


      <depends optional-attribute-name="JaasSecurityManagerService">
      jboss.security:name=JaasSecurityManager






      ra.xml
      ------
      <!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.com/j2ee/dtds/connector_1_0.dtd'>


      <display-name>OFS Adapter</display-name>
      <vendor-name>Apexion</vendor-name>
      <spec-version>1.0</spec-version>
      1.0
      <eis-type>OFS</eis-type>

      <managedconnectionfactory-class>com.apexion.jca.spi.ManagedConnectionFactoryImpl</managedconnectionfactory-class>
      <connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
      <connectionfactory-impl-class>com.apexion.jca.cci.ConnectionFactoryImpl</connectionfactory-impl-class>
      <connection-interface>javax.resource.cci.Connection</connection-interface>
      <connection-impl-class>com.apexion.jca.cci.ConnectionImpl</connection-impl-class>
      <transaction-support>NoTransaction</transaction-support>
      <authentication-mechanism>
      <authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
      <credential-interface>javax.resource.security.PasswordCredential</credential-interface>
      </authentication-mechanism>
      <reauthentication-support>false</reauthentication-support>


      -doug