2 Replies Latest reply on Oct 4, 2001 1:42 AM by Daniel Flesner

    Oracle 8i and CMPFieldMetaData null pointer exception

    Daniel Flesner Newbie

      I'm just beginning with JBOSS, but I've connected to my oracle 8i instance and get a null pointer exception when I try to access the database. I't something to do with the CMPFieldMetaData. I'm using default column and table mappings and i turned on SQL debug and the SQL looks fine. Anyone have a suggestion why the null pointer?

      [JAWS] Create, id is my place
      [JAWS] Exists command executing: SELECT COUNT(*) FROM FIELD WHERE name=?
      [JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=my place
      [JAWS] Create command executing: INSERT INTO FIELD (name,area,descript) VALUES (?,?,?)
      [JAWS] Set parameter: idx=1, jdbcType=VARCHAR, value=my place
      [JAWS] java.lang.NullPointerException
      [JAWS] at org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData.getValue(CMPFieldMetaData.java:363)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getCMPFieldValue(JDBCCommand.java:640)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.setParameters(JDBCCreateEntityCommand.java:163)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
      [JAWS] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:135)
      [JAWS] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersistenceManager.java:128)
      [JAWS] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:231)
      [JAWS] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:616)
      [JAWS] at java.lang.reflect.Method.invoke(Native Method)
      [JAWS] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:843)
      [JAWS] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:231)
      [JAWS] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:154)
      [JAWS] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:108)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
      [JAWS] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      [JAWS] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:103)
      [JAWS] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
      [JAWS] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:420)
      [JAWS] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:370)
      [JAWS] at java.lang.reflect.Method.invoke(Native Method)
      [JAWS] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      [JAWS] at sun.rmi.transport.Transport$1.run(Transport.java:152)
      [JAWS] at java.security.AccessController.doPrivileged(Native Method)
      [JAWS] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      [JAWS] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      [JAWS] at java.lang.Thread.run(Thread.java:484)

        • 1. Re: Oracle 8i and CMPFieldMetaData null pointer exception
          Ignacio Newbie

          Please post your JAWS settings for that entity bean and, if possible, drop the table, let JAWS create the table for you and try again.

          • 2. Re: Oracle 8i and CMPFieldMetaData null pointer exception
            Daniel Flesner Newbie

            it doesn't matter if i drop the table or not, and i'm using these files (and it's JBoss 2.4.1 and jdk 1.3.1_01):

            --jaws.xml

            <enterprise-beans>

            <ejb-name>Field</ejb-name>
            <table-name>FIELD</table-name>
            <create-table>false</create-table>
            <cmp-field>
            <field-name>name</field-name>
            <column-name>name</column-name>
            </cmp-field>
            <cmp-field>
            <field-name>descript</field-name>
            <column-name>descript</column-name>
            </cmp-field>
            <cmp-field>
            <field-name>area</field-name>
            <column-name>area</column-name>
            </cmp-field>

            </enterprise-beans>

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

            false
            <enterprise-beans>

            <ejb-name>Spring</ejb-name>
            <jndi-name>ejb/session/Spring</jndi-name>


            <ejb-name>Field</ejb-name>
            <jndi-name>ejb/entity/Field</jndi-name>

            </enterprise-beans>