0 Replies Latest reply on Dec 26, 2002 12:45 PM by Collin

    EJB-QL errors upon deployment

    Collin Novice

      Hi... I'm an EJB-QL newbie. I'm trying to write a finder method with EJB-QL using xdoclet. However, when I deploy, I always get a classnotfoundexception error when it tries to deploy my entity bean.

      Here's the xdoclet tags I'm using:

      * @ejb:bean name="ContentBlock"
      * type="CMP"
      * view-type="local"
      * local-jndi-name="ejb/ContentBlock"
      * reentrant="false" primkey-field="id"
      * schema="ContentBlocks"
      * @ejb:interface class="com.hannonhill.object.interfaces.ContentBlockLocal"
      * local-extends="com.hannonhill.object.interfaces.FolderContainedEntity,javax.ejb.EJBLocalObject"
      * @ejb:home class="com.hannonhill.object.interfaces.ContentBlockLocalHome"
      * local-extends="javax.ejb.EJBLocalHome"
      * @ejb:pk class="java.lang.String" extends="java.lang.Object"
      * @weblogic:table-name CXML_BLOCK
      * @jboss.table-name CXML_BLOCK
      * @orion:bean table="CXML_BLOCK"
      * @ejb:persistence table-name="CXML_BLOCK"
      * @jboss.create-table create="true"
      * @ejb:finder signature="Collection findAll()"
      * @ejb:finder signature="com.hannonhill.object.interfaces.ContentBlockLocal findByParentFolderIdAndName(java.lang.String ParentFolderId, java.lang.String Name)"
      * query="SELECT OBJECT(x) from ContentBlocks AS x WHERE x.parentFolderId=?1 AND x.Name=?2"
      * result-type-mapping="Local"
      * @ejb:transaction type="Required"
      * @ejb:transaction-type type="Container"

      And this is the error I'm getting:

      12:51:37,687 INFO [EJBDeployer]
      Bean : object/Content
      Section: 22.2
      Warning: The bean provider must specify the fully-qualified name of the enterprise bean's remote hom
      e interface, if any, in the element.
      Info : Class not found: SELECT OBJECT(x) from ContentBlocks AS x WHERE x.parentFolderId=?1 AND x.N

      12:51:37,781 INFO [EJBDeployer]
      Bean : object/Content
      Section: 7.10.1
      Warning: The session bean must implement either a remote home and remote, or a local home and a loca
      l interface.

      That is the deployment warning. Note that the bean it is referencing (object/Content) is NOT the bean for which I have defined the QL. Then I get

      12:51:39,156 WARN [ServiceController] Problem creating service jboss.j2ee:jndiName=ejb/object/Conte
      java.lang.ClassNotFoundException: SELECT OBJECT(x) from ContentBlocks AS x WHERE x.parentFolderId=?1
      AND x.Name=?2com.hannonhill.object.interfaces.ContentHome
      at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      at org.jboss.ejb.StatefulSessionContainer.create(StatefulSessionContainer.java:192)
      at org.jboss.ejb.Container.invoke(Container.java:752)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      at $Proxy5.create(Unknown Source)
      at org.jboss.system.ServiceController.create(ServiceController.java:315)
      at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      For most of my entity beans, though they do not even have any ejb-ql queries in them!

      I'd appreciate any help..