3 Replies Latest reply on Sep 19, 2002 3:32 PM by Dain Sundstrom

    findAll problem

    Amy Newbie

      I am using jboss-3.0.0_tomcat-4.0.3, JBuilder 7 and Oracle 8.1.7.

      I met poblems when I deploy cmp entity bean with findAll methods. The log shows that the server catch a org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "function" at line 1,column 26.Was expecting one of: "IN" ...

      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>
      <enterprise-beans>

      <display-name>Function</display-name>
      <ejb-name>Function</ejb-name>
      testproject.FunctionRemoteHome
      testproject.FunctionRemote
      <ejb-class>testproject.FunctionBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.String</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Function</abstract-schema-name>
      <cmp-field>
      <field-name>functionid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>functionname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>functionspecification</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>moduleid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>assignee</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>assigner</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>projectname</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>planningstartdate</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>planningfinishdate</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>problem</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>notes</field-name>
      </cmp-field>
      <primkey-field>functionid</primkey-field>

      <query-method>
      <method-name>findAll</method-name>
      <method-params />
      </query-method>
      <ejb-ql>select object(o) from function o</ejb-ql>


      </enterprise-beans>
      </ejb-jar>

      jbosscmp-jdbc.xml:
      <?xml version="1.0" encoding="UTF-8"?>

      <jbosscmp-jdbc>
      <enterprise-beans>

      <ejb-name>Function</ejb-name>
      <table-name>FUNCTION</table-name>
      <ejb-designer-id>Function</ejb-designer-id>
      java:/OracleDS
      <datasource-mapping>Oracle8</datasource-mapping>
      <create-table>false</create-table>
      <cmp-field>
      <field-name>functionid</field-name>
      <column-name>FUNCTIONID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>functionname</field-name>
      <column-name>FUNCTIONNAME</column-name>
      <cmp-field>
      <field-name>moduleid</field-name>
      <column-name>MODULEID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>status</field-name>
      <column-name>STATUS</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>assignee</field-name>
      <column-name>ASSIGNEE</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>assigner</field-name>
      <column-name>ASSIGNER</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>projectname</field-name>
      <column-name>PROJECTNAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>problem</field-name>
      <column-name>PROBLEM</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>notes</field-name>
      <column-name>NOTES</column-name>
      </cmp-field>

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

      detail log information:
      org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "module" at line 1,
      column 26.Was expecting one of:
      "IN" ...
      <ABSTRACT_SCHEMA> ...
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.generateParseException(EJBQLParser.java:3745)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.jj_consume_token(EJBQLParser.java:3626)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.IdentificationVariableDeclaration(EJBQLParser.java:212)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.FromClause(EJBQLParser.java:163)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ParseFromClause(EJBQLParser.java:150)
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:56)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:147)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:40)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:44)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:214)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:389)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:793)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      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 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.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy339.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:440)
      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 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.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy5.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:398)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      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.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)