1 Reply Latest reply on Jul 25, 2003 7:45 AM by pauster007

    Entity deployment in Postgre using CMP

    pauster007 Newbie

      i don't know where im heading for, i am at a lost right now....im experiencing a null pointer exception and i have no idea where to start searching so i can resolve the bug....

      2003-07-25 19:56:50,032 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/G:/jboss-3.2.1/server/default/deploy/Entity.jar
      2003-07-25 19:56:50,032 DEBUG [org.jboss.ejb.EJBDeployer] start application, deploymentInfo: org.jboss.deployment.DeploymentInfo@6f39ced1 { url=file:/G:/jboss-3.2.1/server/default/deploy/Entity.jar }
      deployer: org.jboss.ejb.EJBDeployer@426b16
      status: Starting
      state: START_DEPLOYER
      watch: file:/G:/jboss-3.2.1/server/default/deploy/Entity.jar
      lastDeployed: 1059134208910
      lastModified: 1059134210000
      mbeans:
      jboss.j2ee:jndiName=local/TenderConfigEJB,service=EJB state: Created
      jboss.j2ee:jndiName=TestJNDI,service=EJB state: Created
      , short name: Entity.jar, parent short name: null
      2003-07-25 19:56:50,032 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:module=Entity.jar,service=EjbModule
      2003-07-25 19:56:50,032 INFO [org.jboss.ejb.EjbModule] Starting
      2003-07-25 19:56:50,032 DEBUG [org.jboss.ejb.EjbModule] startService, starting container: TenderConfigEJB
      2003-07-25 19:56:50,032 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:jndiName=local/TenderConfigEJB,service=EJB
      2003-07-25 19:56:50,032 INFO [org.jboss.ejb.EntityContainer] Starting
      2003-07-25 19:56:50,032 DEBUG [org.jboss.ejb.EntityContainer] Begin java:comp/env for EJB: TenderConfigEJB
      2003-07-25 19:56:50,032 DEBUG [org.jboss.ejb.EntityContainer] TCL: java.net.URLClassLoader@39f16f
      2003-07-25 19:56:50,042 DEBUG [org.jboss.ejb.EntityContainer] Binding resource manager: java:/DefaultDS to JDNI ENC as: jdbc/Postgre
      2003-07-25 19:56:50,042 DEBUG [org.jboss.ejb.EntityContainer] End java:comp/env for EJB: TenderConfigEJB
      2003-07-25 19:56:50,062 DEBUG [org.jboss.ejb.plugins.local.BaseLocalProxyFactory] Bound EJBLocalHome of TenderConfigEJB to local/TenderConfigEJB
      2003-07-25 19:56:50,062 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Starting InvalidableEntityInstanceCache...
      2003-07-25 19:56:50,062 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.TenderConfigEJB] Initializing CMP plugin for TenderConfigEJB
      2003-07-25 19:56:50,062 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.TenderConfigEJB] Loading standardjbosscmp-jdbc.xml : file:/G:/jboss-3.2.1/server/default/conf/standardjbosscmp-jdbc.xml
      2003-07-25 19:56:50,252 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.TenderConfigEJB] jar:file:/G:/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/Entity.jar/42.Entity.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
      2003-07-25 19:56:50,402 DEBUG [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] Using properties: {user=pau, password=pau}
      2003-07-25 19:56:51,063 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.TenderConfigEJB] Insert Entity SQL: INSERT INTO tenderconfig (tndrCfgName, tndrID, tndrCfgDataType, tndrCfgDesc, tndrType, tndrCfgValue) VALUES (?, ?, ?, ?, ?, ?)
      2003-07-25 19:56:51,063 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.TenderConfigEJB] Entity Exists SQL: SELECT COUNT(*) FROM tenderconfig WHERE tndrCfgName=? AND tndrID=?
      2003-07-25 19:56:51,063 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.TenderConfigEJB] entity-command: [commandName=default,commandClass=class org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand,attributes={}]
      2003-07-25 19:56:51,063 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.TenderConfigEJB] Remove SQL: DELETE FROM tenderconfig WHERE tndrCfgName=? AND tndrID=?
      2003-07-25 19:56:51,063 ERROR [org.jboss.ejb.EntityContainer] Starting failed
      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:239)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:87)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:499)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:170)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:339)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy12.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      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:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy111.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy12.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)


      jboss.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
      "http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">

      <enterprise-beans>

      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <jndi-name>TestJNDI</jndi-name>

      </enterprise-beans>


      jbosscmp-jdbc.xml

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

      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN"
      "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
      <!--
      <!DOCTYPE jbosscmp-jdbc SYSTEM "G:\jboss-3.2.1\docs\dtd\jbosscmp-jdbc_3_2.dtd">
      -->

      <jbosscmp-jdbc>
      <enterprise-beans>

      <ejb-name>TenderConfigEJB</ejb-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      <table-name>TenderConfig</table-name>
      <cmp-field>
      <field-name>tndrCfgDataType</field-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(64)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>tndrCfgDesc</field-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(64)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>tndrCfgName</field-name>
      <not-null/>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(64)</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>tndrType</field-name>
      <jdbc-type>INTEGER</jdbc-type>
      <sql-type>INTEGER</sql-type>

      </cmp-field>
      <cmp-field>
      <field-name>tndrID</field-name>
      <not-null/>
      <jdbc-type>INTEGER</jdbc-type>
      <sql-type>INTEGER</sql-type>
      </cmp-field>
      <cmp-field>
      <field-name>tndrCfgValue</field-name>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(64)</sql-type>

      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>


      ejb-jar.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
      <ejb-jar>
      <display-name>Ejb1</display-name>
      <enterprise-beans>

      <display-name>TenderConfigEJB</display-name>
      <ejb-name>TenderConfigEJB</ejb-name>
      <local-home>com.uniserv.comn.controller.ejb.entity.tenderconfig.LocalTenderConfigHome</local-home>
      com.uniserv.comn.controller.ejb.entity.tenderconfig.LocalTenderConfig
      <ejb-class>com.uniserv.comn.controller.ejb.entity.tenderconfig.TenderConfigEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>com.uniserv.comn.controller.ejb.entity.tenderconfig.TenderConfigPK</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>TenderConfig</abstract-schema-name>
      <cmp-field>
      no description
      <field-name>tndrCfgDataType</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>tndrCfgDesc</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>tndrCfgName</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>tndrType</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>tndrID</field-name>
      </cmp-field>
      <cmp-field>
      no description
      <field-name>tndrCfgValue</field-name>
      </cmp-field>
      <security-identity>

      <use-caller-identity/>
      </security-identity>
      <resource-ref>
      <res-ref-name>jdbc/Postgre</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>


      <query-method>
      <method-name>findAll</method-name>
      <method-params/>
      </query-method>
      <ejb-ql>SELECT DISTINCT OBJECT (o) FROM TenderConfig o</ejb-ql>



      <display-name>TerminalSessionFacadeEJB</display-name>
      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeHome
      com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacade
      <ejb-class>com.uniserv.comn.controller.ejb.session.terminalfacade.TerminalSessionFacadeEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>
      <ejb-local-ref>
      <ejb-ref-name>ejb/TenderConfigEJB</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>com.uniserv.comn.controller.ejb.entity.tenderconfig.LocalTenderConfigHome</local-home>
      com.uniserv.comn.controller.ejb.entity.tenderconfig.LocalTenderConfig
      <!-- <ejb-link>ejb-jar-ic.jar#TenderConfigEJB</ejb-link> -->
      <ejb-link>TenderConfigEJB</ejb-link>
      </ejb-local-ref>
      <security-identity>

      <use-caller-identity/>
      </security-identity>

      </enterprise-beans>
      <assembly-descriptor>
      <method-permission>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>findByPrimaryKey</method-name>
      <method-params>
      <method-param>com.uniserv.comn.controller.ejb.entity.tenderconfig.TenderConfigPK</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getPrimaryKey</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrType</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>remove</method-name>
      <method-params>
      <method-param>java.lang.Object</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrID</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTenderConfigVO</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>findAll</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getEJBLocalHome</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgDesc</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrType</method-name>
      <method-params>
      <method-param>int</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>LocalHome</method-intf>
      <method-name>create</method-name>
      <method-params>
      <method-param>com.uniserv.comn.model.TenderConfigVO</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>isIdentical</method-name>
      <method-params>
      <method-param>javax.ejb.EJBLocalObject</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgName</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgDataType</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgDesc</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>remove</method-name>
      <method-params/>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgDataType</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgValue</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>


      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgValue</method-name>
      <method-params/>

      </method-permission>
      <method-permission>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>remove</method-name>
      <method-params>
      <method-param>java.lang.Object</method-param>
      </method-params>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>getHandle</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>addTenderConfig</method-name>
      <method-params>
      <method-param>com.uniserv.comn.model.TenderConfigVO</method-param>
      </method-params>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>remove</method-name>
      <method-params>
      <method-param>javax.ejb.Handle</method-param>
      </method-params>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>getHomeHandle</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>getPrimaryKey</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>getEJBMetaData</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>remove</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Home</method-intf>
      <method-name>create</method-name>
      <method-params/>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>isIdentical</method-name>
      <method-params>
      <method-param>javax.ejb.EJBObject</method-param>
      </method-params>


      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>getEJBHome</method-name>
      <method-params/>

      </method-permission>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTenderConfigVO</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrID</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgName</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrType</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrType</method-name>
      <method-params>
      <method-param>int</method-param>
      </method-params>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgDataType</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgDataType</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgValue</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgDesc</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>remove</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>getTndrCfgValue</method-name>
      <method-params/>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TenderConfigEJB</ejb-name>
      <method-intf>Local</method-intf>
      <method-name>setTndrCfgDesc</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      <container-transaction>

      <ejb-name>TerminalSessionFacadeEJB</ejb-name>
      <method-intf>Remote</method-intf>
      <method-name>addTenderConfig</method-name>
      <method-params>
      <method-param>com.uniserv.comn.model.TenderConfigVO</method-param>
      </method-params>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>




      Can anyone HELP me? It's really disappointing and frustrating to encounter a bug and to resolve it just to find another one...oh well...There are really things worth learning the hard way =) .....HELP!!!

        • 1. Re: Entity deployment in Postgre using CMP
          pauster007 Newbie

          can this help?

          private String getEntityCreateTableSQL(DataSource dataSource)

          220 throws DeploymentException {

          221

          222 62 StringBuffer sql = new StringBuffer();

          223 62 sql.append("CREATE TABLE ").append(entity.getTableName());

          224

          225 62 sql.append(" (");

          226 // add fields

          227 62 sql.append(SQLUtil.getCreateTableColumnsClause(entity.getFields()));

          228

          229 // add a pk constraint

          230 62 if(entityMetaData.hasPrimaryKeyConstraint()) {

          231 62 JDBCFunctionMappingMetaData pkConstraint =

          232 manager.getMetaData().getTypeMapping().getPkConstraintTemplate();

          233 62 if(pkConstraint == null) {

          234 0 throw new IllegalStateException("Primary key constraint is " +

          235 "not allowed for this type of data source");

          236 }

          237

          238 62 String name =

          239 "pk_" + entity.getMetaData().getDefaultTableName();
          240 62 name = SQLUtil.fixConstraintName(name, dataSource);

          241 62 String[] args = new String[] {

          242 name,

          243 SQLUtil.getColumnNamesClause(entity.getPrimaryKeyFields())};

          244 62 sql.append(", ").append(pkConstraint.getFunctionSql(args));

          245 }

          246

          247 62 sql.append(")");

          248

          249 62 return sql.toString();

          250 }


          this is where i caught that null pointer exception:

          java.lang.NullPointerException
          at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:239)



          Can anyone help me debug this?or can you give some possible solution? Null pointer exceptions are really pain the A S S!