1 Reply Latest reply on Mar 10, 2003 11:52 AM by Nick Raponi

    FROM not found problem

    Nick Raponi Newbie

      Hi,
      After spending three days converting a WLS app to JBOSS I seem to have hit a problem that I can't spot, or find an answer to either on the web, this site, or through any of the docs (incl pay for ones). I'd be really gratefull if anyone can offer any suggestions.

      Basically I am getting the following exception when deploying the EAR jar file: -

      11:14:29,356 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=UsersEJB,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found) at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
      (contd)

      The ejb-jar.xml file contains
      -----------------------------


      <ejb-name>UsersEJB</ejb-name>
      com.synapsepartnership.log.db.UsersHome
      com.synapsepartnership.log.db.Users
      <local-home>com.synapsepartnership.log.db.UsersLocalHome</local-home>
      com.synapsepartnership.log.db.UsersLocal
      <ejb-class>com.synapsepartnership.log.db.UsersBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>UsersBean</abstract-schema-name>
      <cmp-field>
      <field-name>id</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>defaultLogSearchCriteriaId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>email</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>firstName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastName</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>username</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>version</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>isDeleted</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>modifiedUserId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>modifiedDate</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>createdUserId</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>createdDate</field-name>
      </cmp-field>
      <primkey-field>id</primkey-field>
      <security-role-ref>
      maps EJBContext.isCallerInRole(STRING) to a role-name specified here.
      <role-name>logAdministrators</role-name>
      <role-link>logAdministrators</role-link>
      </security-role-ref>
      <security-role-ref>
      maps EJBContext.isCallerInRole(STRING) to a role-name specified here.
      <role-name>logUsers</role-name>
      <role-link>logUsers</role-link>
      </security-role-ref>
      <resource-ref>
      <res-ref-name>jdbc/LogDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      <query-method>
      <method-name>findAll</method-name>
      <method-params></method-params>
      </query-method>
      <ejb-ql><![CDATA[select object(users) FROM UsersBean users WHERE users.id IS NOT NULL AND users.isDeleted = 'N']]></ejb-ql>



      <query-method>
      <method-name>findByProjectId</method-name>
      <method-params>
      <method-param>java.lang.Integer</method-param>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[select distinct object(users) FROM UsersBean users, in (users.projectLocals) as project where project.id = ?1 AND users.isDeleted = 'N']]></ejb-ql>




      The jbosscmp-jdbc.xml file contains
      -----------------------------------

      <ejb-name>UsersEJB</ejb-name>
      java:/MSSQLDSLogger
      <datasource-mapping>MS SQLSERVER</datasource-mapping>
      <table-name>USERS</table-name>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>defaultLogSearchCriteriaId</field-name>
      <column-name>DEFAULT_LOG_SEARCH_CRITERIA_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>email</field-name>
      <column-name>EMAIL</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>firstName</field-name>
      <column-name>FIRST_NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastName</field-name>
      <column-name>LAST_NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>username</field-name>
      <column-name>USERNAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>version</field-name>
      <column-name>VERSION</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>isDeleted</field-name>
      <column-name>IS_DELETED</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>modifiedUserId</field-name>
      <column-name>MODIFIED_USER_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>modifiedDate</field-name>
      <column-name>MODIFIED_DATE</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>createdUserId</field-name>
      <column-name>CREATED_USER_ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>createdDate</field-name>
      <column-name>CREATED_DATE</column-name>
      </cmp-field>


      Many thanks for any help
      regards
      Nick

        • 1. Re: FROM not found problem
          Nick Raponi Newbie

          Interesting. Don't know if its solved it yet as I've another host of (apparently) unrelated error messages, however by taking the brute force approach I seem to have got rid of these messages.

          basically I've updated every single <ebj-ql> entry to use the full select syntax i.e. "select object(xxxxx) from xxxxx where xxxxx.field = 'value'"

          This seems to have got me past this error message.

          Any ideas why this would work in WLS (6.1) and not here? Looking at the next lot of error messages these seem similar (in terms of XML differences) - but for the WAR file this time.

          Cheers
          Nick