2 Replies Latest reply on Jul 14, 2005 3:16 PM by Frank Langelage

    org.jboss.ejb.plugins.cmp.ejbql.ParseException

    Sameer Saptarishi Newbie

      I am facing the following problem when deploying an entity bean on JBoss 4.0.2.
      16:13:07,437 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "auser" at line 1, column 23.
      Was expecting one of: "IN" ... <ABSTRACT_SCHEMA> ...

      I am using EJB-QL in my ejb-jar.xml.
      Here is my 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>

      <ejb-name>UserManager</ejb-name>
      com.cygnet.medina.UserManager.UserManagerHome
      com.cygnet.medina.UserManager.UserManager
      <ejb-class>com.cygnet.medina.UserManager.UserManagerEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>


      <assembly-descriptor>
      <container-transaction>

      <ejb-name>UserManager</ejb-name>
      <method-name>*</method-name>

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


      <ejb-name>AUser</ejb-name>
      com.cygnet.medina.user.AUserHome
      com.cygnet.medina.user.AUser
      <ejb-class>com.cygnet.medina.user.AUserEJB</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Long</prim-key-class>
      False
      <abstract-schema-name>AUser</abstract-schema-name>
      <cmp-field>
      <field-name>userid</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>username</field-name>
      </cmp-field>
      <cmp-field>
      <field-name>password</field-name>
      </cmp-field>
      <primkey-field>userid</primkey-field>

      <query-method>
      <method-name>findByUsername</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql>SELECT OBJECT(u) FROM auser As u where u.username=?1</ejb-ql>



      <assembly-descriptor>
      <container-transaction>

      <ejb-name>AUser</ejb-name>
      <method-name>*</method-name>

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

      Can someone help me out with this problem.
      Thanks in Advance

      Regards
      P2