Marco Mistroni wrote:

*
* @ejb.bean
*       name="Blog"
*      type="CMP"
*       cmp-version="2.x"
*      primkey-field="id"
*       view-type="local"
*       local-jndi-name="blog/BlogLocalHome"
*

*
* @ejb.bean
*       name="BlogFacade"
*       type="Stateless"
*       view-type="remote"
*      jndi-name="blog/BlogFacadeHome"
*
* @ejb.ejb-ref * ejb-name="Blog"
*              view-type="local"
*
* @jboss.ejb-ref-jndi * jndi-name="blog/BlogLocalHome"
*                 ref-name="Blog"
* */

                        blogLocalHome = (BlogLocalHome)context.lookup("Blog");

whenever i deploy my ejb on jboss 3.2.5 i got followng error

22:05:45,703 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
2.5/server/default/deploy/jboss-ejb-examples-1.0.jar
org.jboss.deployment.DeploymentException: Error in jboss.xml for Bean BlogFacade
: ejb-ref ejb/Blog found in jboss.xml but not in ejb-jar.xml
       at org.jboss.metadata.ApplicationMetaData.importJbossXml(ApplicationMeta

anyone can explain me what i am doing wrong?

Read the error message carefully:

Error in jboss.xml for Bean BlogFacade: ejb-ref ejb/Blog found in jboss.xml but 
not in ejb-jar.xml

So the reference is named "ejb/Blog" in jboss.xml. References are always prefixed with "ejb/". The second part is the name given for attribute ejb-name.

You should add the ref-name also to ejb.ejb-ref.


If you define a reference, use BlogLocalHome.COMP_NAME (="java:comp/env/ejb/Blog") for lookup to use the reference.




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to