11 Replies Latest reply on Apr 21, 2004 5:16 PM by mafew

    FROM not found

    Martin Waardenburg Newbie

      When deploying my application under JBoss 3.0.1 I get the following problem:

      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)
      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.startStoreManager(JDBCStoreManager.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
      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:755)
      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:967)
      at $Proxy6.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      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 $Proxy19.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      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 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:967)
      at $Proxy6.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      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:394)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:796)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:788)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      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:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:608)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:499)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:238)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:164)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      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:967)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      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 $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:796)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564)
      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 org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:536)
      Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found
      at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:38)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:143)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:40)
      ... 85 more

      The error message suggest that there a FROM clause can't be found, but I can't see anything wrong in my queries. I am using jboss-ql, not ejb-ql. All the ejb-ql elements are empty in the ejb-jar.xml and the jboss-ql elements in the jbosscmp-jdbc.xml contain the queries.

      Thanks for any help,
      Martin

        • 1. Re: FROM not found
          Martin Waardenburg Newbie

          Problem resolved. The problem was that the jbosscmp-jdbc.xml file could not be found.

          • 2. Re: FROM not found
            Sandeep Dixit Newbie

            I am having the same problem. I verified that the jbosscmp-jdbc.xml file is in the ejb.jar, under meta-inf directory. Is there any way to know exactly which line the error is coming from? With the error message, it is practically impossible to know the location of the error.

            Sandeep Dixit

            • 3. Re: FROM not found
              Sandeep Dixit Newbie

              I am having the same problem However, I have jbosscmp-jdbc.xml in my ejb.jar under meta-inf directory. Is there any way, I can find out which line of jbosscmp-jdbc.xml does the error come from?

              Sandeep Dixit

              • 4. Re: FROM not found
                Ben Newbie

                I just had that problem with 3.03, check your custom query names, I had accidently had the same query name for two different query statements. Damn cut and paste.

                • 5. Re: FROM not found
                  Sandeep Dixit Newbie

                  Thanks, Sandeep

                  • 6. Re: FROM not found
                    Alex Bereshny Newbie

                    I have this same error saying from not found. Did any one figure out what it was or what is causing this error....

                    My finder's are named different and I'm also using jboss-ql

                    Thanks for any help

                    Alex

                    • 7. Re: FROM not found
                      Sandeep Dixit Newbie

                      In my case, it was incorrect deployment descriptors. Make sure that you have corresponding ejb-ql in ejb-jar.xml with <ejb-ql /> (empty) tag.

                      - Sandeep

                      • 8. Re: FROM not found
                        Alex Bereshny Newbie

                        Thanks for the suggestion but I already have the <ejb-ql/> tag in the ejb-jar.xml

                        Any other ideas would be great thanks again.....

                        Alex

                        • 9. Re: FROM not found
                          Stratos Nikolaidis Newbie

                          Did anybody found anything about this "FROM not found" error?

                          I have to say that the error occurs, even if I do not create any finder (except of the findByPrimaryKey default finder).

                          Here is an example of the EntityBean header (using XDoclet):

                          /**
                          * The Entity bean represents a CurrExchange
                          *
                          * @author Stratos Nikolaidis
                          * @version $Revision: 1.0 $
                          *
                          * @ejb.bean name="protasys/CurrExchange"
                          * display-name="Currency exchange"
                          * type="CMP"
                          * cmp-version="2.x"
                          * jndi-name="ejb/protasys/CurrExchange"
                          * view-type="both"
                          *
                          * @ejb.ejb-ref ejb-name="protasys/SequenceGenerator"
                          *
                          * @ejb.transaction type="Required"
                          *
                          * @ejb.data-object extends="protasys.ejb.interfaces.AbstractData"
                          * setdata="false"
                          *
                          * @ejb.finder
                          * signature="java.util.Collection findAll()"
                          * query=""
                          * @jboss.declared-sql
                          * signature="java.util.Collection findAll()"
                          * where="1=1"
                          *
                          * @ejb.finder
                          * signature="java.util.Collection findByCurrency(java.lang.String curr_id)"
                          * query=""
                          * @jboss.declared-sql
                          * signature="java.util.Collection findByCurrency(java.lang.String curr_id)"
                          * where="curr_id = {0}"
                          *
                          * @ejb.persistence table-name="curr_exchange"
                          * @jboss.create-table create="false"
                          * @jboss.remove-table remove="false"
                          **/

                          • 10. Re: FROM not found
                            Stratos Nikolaidis Newbie

                            Ok, forget what I wrote. In 27 different ejbz and 4-5 queries in each ejb, I had one and only one spelling mistake:

                            In one single query, instead of writing @jboss.declared-sql, I wrote @jboss.delcared-sql. It took me three (3) days to find it! At the end, I had to write an extra proram, just to find this mistake.

                            What can you say..:)

                            • 11. Re: FROM not found
                              mafew Newbie

                              I seem to have the same problem...

                              I've got through all of your suggestion but to no avail. I am using EJB-QLs in the ejb-jar.xml as opposed to JBOSS-QLs in the jbosscmp-jdbc.xml.

                              Could any one else suggest a solution?