2 Replies Latest reply on Aug 26, 2004 3:06 PM by vishp

    DeploymentException: Error compiling EJB-QL for Roster appli

    vishp Newbie

      Hello,

      I am using Oracle 8.1.7, jboss 3.2.5 with Sun JDK 1.4.2 . I built and deployed the sample roster application and expected it to create the tables like PlayerEJB, etc. But jboss window shows the following error:

      Starting failed jboss.j2ee:jndiName=local/LeagueEJB,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'select distinct object(p) from Player p
      where p.salary between ?1 and ?2'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "where" at line 2, column 1. Was expecting one of:

      "," ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:52)


      I have
      - copied the oracle classes12.zip to the lib folder

      - changed the oracle-ds.xml file to contain
      <local-tx-datasource>
      <jndi-name>OracleDS</jndi-name>
      <connection-url>jdbc:oracle:thin:@myhost:1521:cwintl</connection-url>
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <user-name>user</user-name>...

      - changed standardjbosscmp-jdbc.xml as follows:

      java:/OracleDS
      <datasource-mapping>Oracle8</datasource-mapping>
      <create-table>true</create-table>...

      The tables teamejb, playerejb get created. But the error is probably preventing schema creation for leagueejb.

      What could be the problem. Please help.

        • 1. Re: DeploymentException: Error compiling EJB-QL for Roster a
          Daniel Sarbe Newbie

          Hi,
          I had the same problem with JBoss 3.2.5, and I will try to explain you how to fix it.
          Your problem is that the EJB-QL command contains Enter in the select command:
          select distinct object(p) from Player p
          where p.salary between ?1 and ?2

          Try to change the select command to look like this (write the select command in only one line) :
          select distinct object(p) from Player p where p.salary between ?1 and ?2

          Daniel S.

          • 2. Re: DeploymentException: Error compiling EJB-QL for Roster a
            vishp Newbie

            That worked. Thanks for your help Daniels.

            But now I am getting the following error :

            WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=local/LeagueEJB,service=EJBRuntimeErrorException: java.lang.NoSuchMethodError Cause: java.lang.NoSuchMethodError at org.jboss.mx.server.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:99)

            Possibly this is some simple problem and I may need to look into the code - but please let me know if you know offhand the cause and/or solution.

            Again, appreciate the help.