求救:jboss4中部署ejb,classpath怎么设置?紧急

04-12-06 lijmmail
在jBoss4中,怎样配置classpath?

系统调用层次如下:

soap->handler->manager->ejb->transaction->dao

在ejb中还调用了一些共通的class,比如log等。

现在我的方法是将ejb所用的class都打倒jar包里了,ejb发布,运行都正常。

而如果像以前在weblogic中,在一个ejb jar包里,只有ejb,ejbbean,ejbhome三个class时,却怎么也发布不成功。

请问,该怎么配置呢?

lijmmail
2004-12-06 19:08
错误信息如下,

2004-12-06 19:04:39,108 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:

Bean : SendBatchEJBBean

Section: 22.2

Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.

Info : Class not found on cn.com.test.business.sendbatch.ejb.SendBatchEJBBean': Unexpected error during load of: jp.co.nttdata.amazongw.business.sendbatch.ejb.SendBatchEJBBean, msg=javax/ejb/SessionBean

2004-12-06 19:04:39,108 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:

Bean : GetBatchEJBBean

Section: 22.2

Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's business methods in the <ejb-class> element.

Info : Class not found on cn.com.test.business.getbatch.ejb.GetBatchEJBBean': Unexpected error during load of: jp.co.nttdata.amazongw.business.getbatch.ejb.GetBatchEJBBean, msg=javax/ejb/SessionBean

2004-12-06 19:04:39,108 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true

2004-12-06 19:04:39,108 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false

2004-12-06 19:04:39,108 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true

2004-12-06 19:04:39,108 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/jboss-4.0.0/server/default/deploy/AmazonGW-ejb.jar

org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.

at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)

at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)

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

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

at sun.reflect.GeneratedMethodAccessor15.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:141)

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

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

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

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

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

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

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

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

at $Proxy8.deploy(Unknown Source)

newold
2004-12-06 21:00
jboss里面的ejb,war,ear的classpath是相同的

lijmmail
2004-12-07 08:51
多谢newold 。

能说的明白些吗?

我是这么理解的

在Jboss启动时,先发布ejb,检查ejb中引用的class。比如DAO等

但是相关DAO.class并没有封装在ejb.jar里面。

问题就怎样才能让jboss发布ejb时,找到相关的class呢?

newold
2004-12-07 12:00
一般来说,需要的dto和dao肯定是需要和ejb打在一起的,特别是weblogic一定需要的。jboss如果打在ear里面,一般只打bean本身的文件,因为,ejb和web application的classpath是相同的,jboss的发布速度很快

猜你喜欢
2Go 1 2 下一页