0 Replies Latest reply on Apr 9, 2002 7:58 PM by roysun

    findBy<fieldname> exception during deploying

    roysun Newbie

      Does any one can tell me what is the reason for the following execption during deploying a CMP with home method findBy. Does jboss (3.0alpha) generates the implementation automatically?

      Roy

      filed name : accountId
      descriptor:




      <display-name>Location Bean</display-name>
      <ejb-name>Location</ejb-name>

      <local-home>com.inquent.iqos.ejb.log.persistence.LocationLocalHome</local-home>
      com.inquent.iqos.ejb.log.persistence.LocationLocal

      <ejb-class>com.inquent.iqos.ejb.log.persistence.LocationBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      false
      <abstract-schema-name>LocationBean</abstract-schema-name>
      <cmp-version>2.x</cmp-version>

      <cmp-field>
      Location Id
      <field-name>locationId</field-name>
      </cmp-field>
      <cmp-field>
      Account Id
      <field-name>accountId</field-name>
      </cmp-field>
      <cmp-field>
      Location Code
      <field-name>locationCode</field-name>
      </cmp-field>
      <cmp-field>
      Location Description
      <field-name>description</field-name>
      </cmp-field>

      <primkey-field>locationId</primkey-field>


      <query-method>
      <method-name>findByAccountId</method-name>
      <method-params><method-param>int</method-param></method-params>
      </query-method>
      <result-type-mapping>Local</result-type-mapping>
      <ejb-ql>
      SELECT OBJECT(lb) FROM LocationBean lb WHERE lb.accountId=?1
      </ejb-ql>



      java.lang.NullPointerException
      at org.jboss.ejb.plugins.cmp.jdbc.ejbql.SQLTarget.(SQLTarget.java:75)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLFinderCommand.(JDBCEJBQLFinderCommand.java:50)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLFinderCommand(JDBCCommandFactory.java:99)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntitiesCommand.start(JDBCFindEntitiesCommand.java:123)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:139)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:186)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:404)
      at org.jboss.ejb.Application.start(Application.java:200)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:381)
      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:307)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:467)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:444)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:215)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:633)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:308)
      at java.lang.Thread.run(Thread.java:536)