dcsimg
Query method not found when using xdoclet 1.2
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, November 26, 2002 11:54 PM

using: - xdoclet 1.2. - ant 1.5. - jboss 3.0.4 I create entity bean by xdoclet tag: * @ejb.bean type="CMP" * cmp-version="2.x" * name="Activity" * jndi-name="ejb/ActivityHome" * local-jndi-name="ejb/ActivityLocalHome" * view-type="local" * @ejb.finder signature="java.util.Collection findAll()" * query="SELECT OBJECT(o) FROM Activity AS o" * result-type-mapping="Local" * method-intf="LocalHome" and getting errors like this: 2002-11-27    More>>

using:
- xdoclet 1.2.
- ant 1.5.
- jboss 3.0.4
I create entity bean by xdoclet tag:

			
* @ejb.bean type="CMP"
* cmp-version="2.x"
* name="Activity"
* jndi-name="ejb/ActivityHome"
* local-jndi-name="ejb/ActivityLocalHome"
* view-type="local"
* @ejb.finder signature="java.util.Collection findAll()"
* query="SELECT OBJECT(o) FROM Activity AS o"
* result-type-mapping="Local"
* method-intf="LocalHome"

and getting errors like this:

2002-11-27 11:56:55,437 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/ActivityLocalHome,service=EJB
org.jboss.deployment.DeploymentException: Query method not found: findAll
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.getQueryMethods(JDBCQueryMetaDataFactory.java:270)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.getQueryMethods(JDBCQueryMetaDataFactory.java:228)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.createJDBCQueryMetaData(JDBCQueryMetaDataFactory.java:42)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData. (JDBCEntityMetaData.java:310)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData. (JDBCApplicationMetaData.java:117)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:677)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:389)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:339)
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:756)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy5.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:398)
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:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy20.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
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:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy5.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:398)
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:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy9.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
at sun.reflect.GeneratedMethodAccessor9.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:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy4.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:656)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:261)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
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:517)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:398)
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:517)
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:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:569)
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:517)
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:148)
at org.jboss.Main$1.run(Main.java:381)
at java.lang.Thread.run(Thread.java:536)

please help me to solve this problem.
Thanks in advance.    <<Less

Re: Query method not found when using xdoclet 1.2

Posted By:   Michael_Hopf  
Posted On:   Tuesday, December 3, 2002 11:17 PM

Hi,



for the findAll() method you just need to specify



* @ejb:finder

* signature="java.util.Collection findAll()"



There is no need to specify a eqbql statement for this.



See my sample at http://www.software-friends.com/know_how/index.htm




Regards, Michael
About | Sitemap | Contact