请教:在eclipse中通过JBossIDE将1.1的SessionBean改为2.0时出错.

03-09-29 caigao

出错点是.war文件布署,具体位置应该是ComputeServlet.java的XDoclet描述符错.下面是XDoclet描述串:

/**
 * 
 * @web.servlet name = "ComputeServlet"
 *              display-name = "Compute Servlet"
 *              description = "Compute Servlet Suite"
 * @web.servlet-mapping url-pattern = "/Compute"
 * 
 * @web.env-entry name = "Title"
 *                type = "java.lang.String"
 *                value = "This is a Test Entry Can not using Chinese!"
 *                description = "Fibonacci Example"
 * 
 * @web.ejb-local-ref name = "ejb/Fibo"
 * 				type = "Session"
 * 				home = "tutorial.interfaces.FiboLocalHome"
 * 				local = "tutorial.interfaces.FiboLocal"
 * 				description = "Refrence to Fibo EJB"
 * 
 * @jboss.ejb-ref-jndi ref-name = "ejb/Fibo"
 * 					   jndi-name = "ejb/tutorial/Fibo"
 * 
 */
<p>

出错信息:

12:13:43,168 WARN  [EmbeddedTomcatService] Failed to parse descriptors for war(file:/D:/jboss/server/default/tmp/deploy/tmp53868FiboApp.ear-contents/FiboWeb.war/)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/Fibo found in jboss-web.xml but not in web.xml)
	at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:993)
	at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:425)
<p>

源程序及教程[url=upload/caigaonjo7P4D4a5.zip]修改后的代码[/url]

caigao
2003-09-29 12:12

出错点是.war文件布署,具体位置应该是ComputeServlet.java的XDoclet描述符错.下面是XDoclet描述串:

/**
 * 
 * @web.servlet name = "ComputeServlet"
 *              display-name = "Compute Servlet"
 *              description = "Compute Servlet Suite"
 * @web.servlet-mapping url-pattern = "/Compute"
 * 
 * @web.env-entry name = "Title"
 *                type = "java.lang.String"
 *                value = "This is a Test Entry Can not using Chinese!"
 *                description = "Fibonacci Example"
 * 
 * @web.ejb-local-ref name = "ejb/Fibo"
 * 				type = "Session"
 * 				home = "tutorial.interfaces.FiboLocalHome"
 * 				local = "tutorial.interfaces.FiboLocal"
 * 				description = "Refrence to Fibo EJB"
 * 
 * @jboss.ejb-ref-jndi ref-name = "ejb/Fibo"
 * 					   jndi-name = "ejb/tutorial/Fibo"
 * 
 */
<p>

出错信息:

12:13:43,168 WARN  [EmbeddedTomcatService] Failed to parse descriptors for war(file:/D:/jboss/server/default/tmp/deploy/tmp53868FiboApp.ear-contents/FiboWeb.war/)
org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/jboss-web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: ejb-ref ejb/Fibo found in jboss-web.xml but not in web.xml)
	at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:993)
	at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:425)
<p>

<br>

<font color=red size=26>源程序及教程</font><br><br><font color=red size=26>修改后的代码</font>