[jboss-user] [Beginner's Corner] - Re: EJB-JAR.XML AND JBOSS.XML SETUP

Bruce Sanders do-not-reply at jboss.com
Mon Apr 16 17:56:25 EDT 2012


Bruce Sanders [https://community.jboss.org/people/brucesanders63] created the discussion

"Re: EJB-JAR.XML AND JBOSS.XML SETUP"

To view the discussion, visit: https://community.jboss.org/message/730427#730427

--------------------------------------------------------------
Been a while since I posted but I still have the same problem and find very little on the internet to assist.  If I create my own enterprise java bean from source code using Xdoclet to assist the jar does deploy.  I match the jboss.xml from the successful deploy 
with one in the ejb I still get the deploy error below.  See  below:

jboss.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 2.4//EN" " http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd">
<jboss>
   <enterprise-beans>
      <session>
   
         <ejb-name>CalculationAppealsManagerBean</ejb-name>
         <jndi-name>ejb/CalculationAppealsManagerBean</jndi-name>
      </session>
   </enterprise-beans>
   <resource-managers>
   </resource-managers>
</jboss>

ejb-jar.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" " http://java.sun.com/dtd/ejb-jar_2_0.dtd http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>

 <enterprise-beans>
  <session>
   
      <description>Calculation Appeals Manager EJB</description>
      <display-name>CalculationAppealsPortalManagerBean</display-name>
      <ejb-name>CalculationAppealsManagerBean</ejb-name>
      <home>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManagerHome</home>
      <remote>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManager</remote>
      <ejb-class>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManagerBean</ejb-class>
   <session-type>Stateless</session-type>
   <transaction-type>Container</transaction-type>
   <env-entry>
    <env-entry-name>ejb.sessionTimeout</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>600</env-entry-value>
   </env-entry>
</session>
  
 
 </enterprise-beans>
   
   
 <assembly-descriptor>
  <security-role>
   <role-name>all</role-name>
  </security-role>
  <method-permission>
   <role-name>all</role-name>
   <method>
    <ejb-name>CalculationAppealsManagerBean</ejb-name>
    <method-name>*</method-name>
   </method>
  </method-permission>
  <container-transaction>
   <method>
    <ejb-name>CalculationAppealsManagerBean</ejb-name>
    <method-name>*</method-name>
   </method>
   <trans-attribute>Required</trans-attribute>
  </container-transaction>
   
 </assembly-descriptor>
</ejb-jar>

The deployment result is this:























































































org.jboss.deployment.DeploymentException


: Error in jboss.xml for Bean jmx/ejb/Adaptor: found in jboss.xml but not in ejb-jar.xmlat org.jboss.metadata.ApplicationMetaData.importJbossXml(

ApplicationMetaData.java:956)at org.jboss.metadata.XmlFileLoader.load(

XmlFileLoader.java:200)at org.jboss.ejb.EJBDeployer.create(

EJBDeployer.java:541)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.interceptor.ReflectedDispatcher.invoke(

ReflectedDispatcher.java:155)at org.jboss.mx.server.Invocation.dispatch(

Invocation.java:94)at org.jboss.mx.interceptor.AbstractInterceptor.invoke(

AbstractInterceptor.java:133)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(

ModelMBeanOperationInterceptor.java:142)at org.jboss.mx.interceptor.DynamicInterceptor.invoke(

DynamicInterceptor.java:97)at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(

InterceptorServiceMBeanSupport.java:238)at org.jboss.ws.integration.jboss.DeployerInterceptor.create(

DeployerInterceptor.java:74)at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(

DeployerInterceptorEJB.java:44)at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(

SubDeployerInterceptorSupport.java:180)at org.jboss.deployment.SubDeployerInterceptor.invoke(

SubDeployerInterceptor.java:91)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.server.AbstractMBeanInvoker.invoke(

AbstractMBeanInvoker.java:264)at org.jboss.mx.server.MBeanServerImpl.invoke(

MBeanServerImpl.java:659)at org.jboss.mx.util.MBeanProxyExt.invoke(

MBeanProxyExt.java:210)at $Proxy26.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(

MainDeployer.java:969)at org.jboss.deployment.MainDeployer.deploy(

MainDeployer.java:818)at org.jboss.deployment.MainDeployer.deploy(

MainDeployer.java:782)at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(

DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(

Method.java:324)at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(

ReflectedDispatcher.java:155)at org.jboss.mx.server.Invocation.dispatch(

Invocation.java:94)at org.jboss.mx.interceptor.AbstractInterceptor.invoke(

AbstractInterceptor.java:133)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(

ModelMBeanOperationInterceptor.java:142)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.server.AbstractMBeanInvoker.invoke(

AbstractMBeanInvoker.java:264)at org.jboss.mx.server.MBeanServerImpl.invoke(

MBeanServerImpl.java:659)at org.jboss.mx.util.MBeanProxyExt.invoke(

MBeanProxyExt.java:210)at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(

URLDeploymentScanner.java:421)at org.jboss.deployment.scanner.URLDeploymentScanner.scan(

URLDeploymentScanner.java:634)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(

AbstractDeploymentScanner.java:263)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(

AbstractDeploymentScanner.java:274)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(

AbstractDeploymentScanner.java:225)16:54:01,010 ERROR [MainDeployer] Could not create deployment: file:/C:/JBoss4.0/jboss-4.0.5.GA/server/default/deploy/CalculationAppeals_ejb.jar

org.jboss.deployment.DeploymentException


: Error in jboss.xml for Bean jmx/ejb/Adaptor: found in jboss.xml but not in ejb-jar.xmlat org.jboss.metadata.ApplicationMetaData.importJbossXml(

ApplicationMetaData.java:956)at org.jboss.metadata.XmlFileLoader.load(

XmlFileLoader.java:200)at org.jboss.ejb.EJBDeployer.create(

EJBDeployer.java:541)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.interceptor.ReflectedDispatcher.invoke(

ReflectedDispatcher.java:155)at org.jboss.mx.server.Invocation.dispatch(

Invocation.java:94)at org.jboss.mx.interceptor.AbstractInterceptor.invoke(

AbstractInterceptor.java:133)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(

ModelMBeanOperationInterceptor.java:142)at org.jboss.mx.interceptor.DynamicInterceptor.invoke(

DynamicInterceptor.java:97)at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(

InterceptorServiceMBeanSupport.java:238)at org.jboss.ws.integration.jboss.DeployerInterceptor.create(

DeployerInterceptor.java:74)at org.jboss.ws.integration.jboss.DeployerInterceptorEJB.create(

DeployerInterceptorEJB.java:44)at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(

SubDeployerInterceptorSupport.java:180)at org.jboss.deployment.SubDeployerInterceptor.invoke(

SubDeployerInterceptor.java:91)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.server.AbstractMBeanInvoker.invoke(

AbstractMBeanInvoker.java:264)at org.jboss.mx.server.MBeanServerImpl.invoke(

MBeanServerImpl.java:659)at org.jboss.mx.util.MBeanProxyExt.invoke(

MBeanProxyExt.java:210)at $Proxy26.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(

MainDeployer.java:969)at org.jboss.deployment.MainDeployer.deploy(

MainDeployer.java:818)at org.jboss.deployment.MainDeployer.deploy(

MainDeployer.java:782)at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(

DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(

Method.java:324)at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(

ReflectedDispatcher.java:155)at org.jboss.mx.server.Invocation.dispatch(

Invocation.java:94)at org.jboss.mx.interceptor.AbstractInterceptor.invoke(

AbstractInterceptor.java:133)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(

ModelMBeanOperationInterceptor.java:142)at org.jboss.mx.server.Invocation.invoke(

Invocation.java:88)at org.jboss.mx.server.AbstractMBeanInvoker.invoke(

AbstractMBeanInvoker.java:264)at org.jboss.mx.server.MBeanServerImpl.invoke(

MBeanServerImpl.java:659)at org.jboss.mx.util.MBeanProxyExt.invoke(

MBeanProxyExt.java:210)at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(

URLDeploymentScanner.java:421)at org.jboss.deployment.scanner.URLDeploymentScanner.scan(

URLDeploymentScanner.java:634)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(

AbstractDeploymentScanner.java:263)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(

AbstractDeploymentScanner.java:274)at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(

AbstractDeploymentScanner.java:225)

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/730427#730427]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120416/b2e2df32/attachment-0001.html 


More information about the jboss-user mailing list