紧急求救!!为什么在JBoss下无法部署EJB模块

mordecai
04-08-08 3 720

紧急求救!!为什么在JBoss下无法部署EJB模块?
在jboss下部署WEB模块和EJB模块时只需拷贝到JBOSS_HOME下的:\server\default\deploy目录下即可,JBOSS回自动部署。我用的是jboss-3.2.2,部署WEB模块没有问题,可是部署最简单的hello world EJB模块(名字为:firstEjb.jar)时却总是出现下面的错误:
13:36:06,139 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss
-3.2.2/server/default/deploy/firstEjb.jar
13:36:06,326 WARN [EJBDeployer] Verify failed; continuing
java.lang.NoClassDefFoundError: javax/ejb/SessionBean
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClass
Loader.java:278)
at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoade
r(UnifiedLoaderRepository3.java:244)
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:139)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLo
ader3.java:169)
at org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader
3.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at org.jboss.verifier.strategy.EJBVerifier20.verifyBean(EJBVerifier20.ja
va:233)
at org.jboss.verifier.strategy.EJBVerifier20.checkSession(EJBVerifier20.
java:89)
at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:159)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:475)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
92)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:395)
at java.lang.Thread.run(Thread.java:534)
13:36:06,342 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-3.
2.2/server/default/deploy/firstEjb.jar
org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
d, see above for error messages.
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:302)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:476)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:201)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:274)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
92)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
nDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:395)
at java.lang.Thread.run(Thread.java:534)
13:36:06,342 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss
-3.2.2/server/default/deploy/jmx-console.war/
13:36:06,389 INFO [EmbeddedTomcatService] deploy, ctxPath=/jmx-console, warUrl=
file:/D:/jboss-3.2.2/server/default/deploy/jmx-console.war/
13:36:06,529 INFO [Engine] ContextConfig[/jmx-console]: Added certificates -> r
equest attribute Valve
13:36:06,561 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@bbbd0e
13:36:06,561 INFO [Engine] StandardManager[/jmx-console]: Seeding random number
generator class java.security.SecureRandom
13:36:06,561 INFO [Engine] StandardManager[/jmx-console]: Seeding of random num
ber generator has been completed
13:36:06,561 INFO [Engine] StandardWrapper[/jmx-console:default]: Loading conta
iner servlet default
13:36:06,561 INFO [Engine] StandardWrapper[/jmx-console:invoker]: Loading conta
iner servlet invoker
13:36:06,748 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.2/server/
default/deploy/jmx-console.war/
13:36:06,748 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss
-3.2.2/server/default/deploy/management/web-console.war
13:36:07,123 INFO [EmbeddedTomcatService] deploy, ctxPath=/web-console, warUrl=
file:/D:/jboss-3.2.2/server/default/tmp/deploy/tmp12765web-console.war/
13:36:07,201 INFO [Engine] ContextConfig[/web-console]: Added certificates -> r
equest attribute Valve
13:36:07,217 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@166aab6
13:36:07,217 INFO [Engine] StandardManager[/web-console]: Seeding random number
generator class java.security.SecureRandom
13:36:07,217 INFO [Engine] StandardManager[/web-console]: Seeding of random num
ber generator has been completed
13:36:07,467 INFO [Engine] StandardWrapper[/web-console:default]: Loading conta
iner servlet default
13:36:07,498 INFO [Engine] StandardWrapper[/web-console:invoker]: Loading conta
iner servlet invoker
13:36:07,732 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.2/server/
default/deploy/management/web-console.war
13:36:07,732 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
ration 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
<none>
Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo@e86a4237 { url=file:/D:/jboss-3.2.2/server/
default/deploy/firstEjb.jar }
deployer: org.jboss.ejb.EJBDeployer@11c2b67
status: Deployment FAILED reason: Verification of Enterprise Beans failed, see
above for error messages.
state: FAILED
watch: file:/D:/jboss-3.2.2/server/default/deploy/firstEjb.jar
lastDeployed: 1091943366170
lastModified: 1091943366154
mbeans:
]MBeans waiting for classes:
<none>
MBeans waiting for other MBeans:
<none>

为此我已经苦恼了几天了,总是得不到解决的办法,可是在其他机器上部署时却一切正常,请问这是我的机器上某些配置出了问题吗?

banq
2004-08-10 13:06

jar必须是一个EJB的jar,而不是普通jar,普通Jar中不能使用EJB

mordecai
2004-08-11 19:03

很显然我部署的是EJB模块,这个问题的根本不在这里。但在哪里,我至今没找到答案。每次使用都必须通过另外一台机器上的JBoss,我在其它机器上使用完好,在自己的机器上也曾使用完好,可是现在却不知哪根筋出了问题,总是部署错误。请各位高手不吝赐教!!!!

huzhigang
2004-08-12 08:27

13:36:06,326 WARN [EJBDeployer] Verify failed; continuing
java.lang.NoClassDefFoundError: javax/ejb/SessionBean