jboss发布ejb报错求援助
小弟最近接触ejb,现在用ant打包后吧ejb部署到 jboss里面无法启动。求各位前辈帮忙看看下面的错误愿意ejb-jar.xml
<?xml version="1.0" encoding="Shift_JIS"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>NC-EJB-JARs</display-name>
<enterprise-beans>
<session >
<ejb-name>NCUserManagerSession</ejb-name>
<home>jp.or.kkr.nenkin.common.util.user.ejb.session.NCUserManagerSessionHome</home>
<remote>jp.or.kkr.nenkin.common.util.user.ejb.session.NCUserManagerSession</remote>
<ejb-class>jp.or.kkr.nenkin.common.util.user.ejb.session.NCUserManagerSessionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
<session >
<ejb-name>NCCodeManagerSession</ejb-name>
<home>jp.or.kkr.nenkin.common.util.code.ejb.session.NCCodeManagerSessionHome</home>
<remote>jp.or.kkr.nenkin.common.util.code.ejb.session.NCCodeManagerSession</remote>
<ejb-class>jp.or.kkr.nenkin.common.util.code.ejb.session.NCCodeManagerSessionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
<session >
<ejb-name>NCPrintManagerSession</ejb-name>
<home>jp.or.kkr.nenkin.common.util.print.ejb.session.NCPrintManagerSessionHome</home>
<remote>jp.or.kkr.nenkin.common.util.print.ejb.session.NCPrintManagerSession</remote>
<ejb-class>jp.or.kkr.nenkin.common.util.print.ejb.session.NCPrintManagerSessionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>NCUserManagerSession</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>NCCodeManagerSession</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>NCPrintManagerSession</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
jboss.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>NCUserManagerSession</ejb-name>
<jndi-name>NCUserManagerSession</jndi-name>
</session>
<session>
<ejb-name>NCCodeManagerSession</ejb-name>
<jndi-name>NCCodeManagerSession</jndi-name>
</session>
<session>
<ejb-name>NCPrintManagerSession</ejb-name>
<jndi-name>NCPrintManagerSession</jndi-name>
</session>
</enterprise-beans>
</jboss>
错误信息(部分主要信息):
java.lang.NoClassDefFoundError: jp/or/kkr/nenkin/common/framework/exception/NCJNDIServiceException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetPublicMethods(Unknown Source)
at java.lang.Class.getMethods(Unknown Source)
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: jp.or.kkr.nenkin.common.framework.exception.NCJNDIServiceException
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(Unknown Source)
14:44:01,406 ERROR [MainDeployer] Could not create deployment: file:/F:/jboss-4.2.3.GA/server/default/deploy/ejb.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
14:44:01,671 WARN [ServiceController] Problem starting service jboss.web.deployment:war=common.war,id=872465776
org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-ref: ejb/NCUserManagerSession, no ejb-link in web.xml and no jndi-name in jboss-web.xml) --------------------编程问答-------------------- 参考一下,希望能帮到你http://tomakemyself.iteye.com/blog/1575329
补充:Java , Java EE