关于News应用无法发布的问题

05-09-28 kyoleelqh
Banq老师:

我在JBOSS发布News应用,但是无法运行,抛出异常EJBException in method: public abstract news.ejb.NewsManagerLocal news.ejb.NewsManagerLocalHome.create() throws javax.ejb.CreateException:

javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract news.ejb.NewsManagerLocal news.ejb.NewsManagerLocalHome.create() throws javax.ejb.CreateException

我还有一个问题,就是在一个应用中ear文件(运行于JBOSS),在web方面无法调用本地ejb接口,但是把这些接口改为远程接口,就可以调用.我上过很多论坛问过此问题,好像说是JVM

进程的问题,请老师帮我指导,如果无法调用本地ejb接口,那么WebAppUtil.getService()所获得的接口就应该是远程接口.但是在Jdon框架使用开发指南里面,WebAppUtil.getService所获得的是本地接口,请老师给我一个详细的指导,谢谢

banq
2005-09-29 09:21
创建NewsManagerLocal实例时出错,有很多原因,"check your deployment packaging"估计你的ejb-jar.xml中有问题。

NewsManager为本地或远程接口都可以,不同接口在jdonframework.xml中配置不一样。

你可将应用程序发到我信箱,帮你看一下。

kyoleelqh
2005-09-29 22:10
就是在本网站下载的那个JdonNews个,配置都有和说明的一模一样

banq
2005-09-30 10:04
估计是你部署包有问题,你使用winrar打开ear包,再逐个打开其中jar或war包,你将ear包邮给我看看

kyoleelqh
2005-09-30 22:01
老师我已把那个ear包发给你了

fyol
2005-12-26 13:08
13:01:43,436 INFO [TomcatDeployer] deploy, ctxPath=/MyWeb, warUrl=file:/E:/jdon

/jboss-4.0.2/server/default/tmp/deploy/tmp51862ApplicationModule1.ear-contents/M

yWeb-exp.war/

13:01:43,536 INFO [[/MyWeb]] Marking servlet action as unavailable

13:01:43,536 ERROR [[/MyWeb]] Servlet /MyWeb threw load() exception

java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter

at java.lang.Class.getDeclaredConstructors0(Native Method)

at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)

at java.lang.Class.getConstructor0(Class.java:2640)

at java.lang.Class.newInstance0(Class.java:321)

at java.lang.Class.newInstance(Class.java:303)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.

java:1048)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:92

5)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex

t.java:3857)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4

118)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase

.java:759)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:73

9)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)

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:585)

at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:

503)

at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1

50)

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

at org.apache.catalina.core.StandardContext.init(StandardContext.java:50

05)

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:585)

at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:

503)

at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:1

50)

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

at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatD

eployer.java:274)

at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.

java:91)

at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357)

at org.jboss.web.WebModule.startModule(WebModule.java:68)

at org.jboss.web.WebModule.startService(WebModule.java:46)

at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS

upport.java:272)

at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB

eanSupport.java:222)

at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl

ler.java:897)

at $Proxy0.start(Unknown Source)

at org.jboss.system.ServiceController.start(ServiceController.java:418)

at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

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

at $Proxy28.start(Unknown Source)

at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:39

4)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)

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

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

at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept

or.java:121)

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

at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM

BeanOperationInterceptor.java:127)

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

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

at $Proxy8.deploy(Unknown Source)

at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen

tScanner.java:325)

at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS

canner.java:501)

at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.

doScan(AbstractDeploymentScanner.java:204)

at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A

bstractDeploymentScanner.java:277)

at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS

upport.java:272)

at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB

eanSupport.java:222)

at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl

ler.java:897)

at $Proxy0.start(Unknown Source)

at org.jboss.system.ServiceController.start(ServiceController.java:418)

at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

sorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

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

at $Proxy4.start(Unknown Source)

at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273)

at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)

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

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

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

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:585)

at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch

er.java:141)

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

at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept

or.java:121)

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

at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM

BeanOperationInterceptor.java:127)

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

at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.

java:249)

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

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

at $Proxy5.deploy(Unknown Source)

at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434)

at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315)

at org.jboss.Main.boot(Main.java:195)

at org.jboss.Main$1.run(Main.java:463)

at java.lang.Thread.run(Thread.java:595)

13:01:43,586 INFO [EARDeployer] Started J2EE application: file:/E:/jdon/jboss-4

.0.2/server/default/deploy/ApplicationModule1.ear

13:01:43,746 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-808

0

13:01:44,257 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009

13:01:44,267 INFO [JkMain] Jk running ID=0 time=0/451 config=null

13:01:44,277 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4

_0_2 date=200505022023)] Started in 18s:236ms

fyol
2005-12-26 13:10
我下载了NEWS的演示系统,但无法启动jboss-3.2.3,下载了一个4.0.2,启动成功,把ApplicationModule1.ear复制到deploy时,jboos控制台出现了上面的错误,但显示加载成功,但不能访问

banq
2005-12-26 14:12
>java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter

没有为JBoss配置struts包,下面几个包都需要:

1. struts 1.2

2. 数据块驱动包mysql.jar

3. jdon框架包。

fyol
2005-12-27 12:04
OK,Thk you

fyol
2005-12-27 12:14
我把缺少的jar复制到jboss4的对应目录下,启动成功,但访问:

http://localhost:8080/MyWeb/

时,出现下面的错误

12:08:29,164 INFO [ContainerDirector] <======== Jdon Framework started succes

sfully! =========>

12:08:29,244 ERROR [ProxyMethodInvocation] handleInvoker error: null

12:08:29,244 ERROR [root] news.web.NewsTypeListAction

java.lang.reflect.UndeclaredThrowableException

at $Proxy79.getNewsTypePage(Unknown Source)

at news.web.NewsTypeListAction.getPageIterator(NewsTypeListAction.java:2

2)

at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:72)

at org.apache.struts.action.RequestProcessor.processActionPerform(Reques

tProcessor.java:421)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja

va:226)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116

4)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodin

gFilter.java:92)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi

lter.java:81)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

alve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV

alve.java:178)

at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc

ipalValve.java:39)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit

yAssociationValve.java:153)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica

torBase.java:407)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv

e.java:59)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j

ava:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j

ava:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal

ve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav

a:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

:856)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce

ssConnection(Http11Protocol.java:744)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo

int.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor

kerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

Caused by: java.lang.Throwable: java.lang.Throwable: java.lang.Throwable

at com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving.invoke(DynamicP

roxyWeaving.java:66)

... 32 more

Caused by: java.lang.Throwable: java.lang.Throwable

at com.jdon.aop.AopClient.invoke(AopClient.java:101)

at com.jdon.bussinessproxy.dyncproxy.DynamicProxyWeaving.invoke(DynamicP

roxyWeaving.java:61)

... 32 more

Caused by: java.lang.Throwable

at com.jdon.aop.reflection.ProxyMethodInvocation.methodInvoke(ProxyMetho

dInvocation.java:112)

at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvo

cation.java:76)

at com.jdon.aop.interceptor.CacheInterceptor.invoke(CacheInterceptor.jav

a:60)

at com.jdon.aop.reflection.ProxyMethodInvocation.proceed(ProxyMethodInvo

cation.java:84)

at com.jdon.aop.AopClient.invoke(AopClient.java:96)

... 33 more

Caused by: null

at com.jdon.aop.reflection.MethodInvokerUtil.execute(MethodInvokerUtil.j

ava:59)

at com.jdon.aop.reflection.ProxyMethodInvocation.methodInvoke(ProxyMetho

dInvocation.java:105)

... 37 more

Caused by: java.lang.IllegalArgumentException: object is not an instance of decl

aring class

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:585)

at com.jdon.aop.reflection.MethodInvokerUtil.execute(MethodInvokerUtil.j

ava:55)

... 38 more

12:08:29,254 WARN [RequestProcessor] Unhandled Exception thrown: class java.lan

g.Exception

12:08:29,254 ERROR [[action]] Servlet.service() for servlet action threw excepti

on

java.lang.Exception: getPageIterator's result is null, check your ModelListActio

n subclass

at com.jdon.strutsutil.ModelListAction.execute(ModelListAction.java:74)

at org.apache.struts.action.RequestProcessor.processActionPerform(Reques

tProcessor.java:421)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja

va:226)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116

4)

at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at com.jdon.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodin

gFilter.java:92)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi

lter.java:81)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl

icationFilterChain.java:202)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF

ilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV

alve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV

alve.java:178)

at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc

ipalValve.java:39)

at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit

yAssociationValve.java:153)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica

torBase.java:407)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv

e.java:59)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j

ava:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j

ava:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal

ve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav

a:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

:856)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce

ssConnection(Http11Protocol.java:744)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo

int.java:527)

at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor

kerThread.java:112)

at java.lang.Thread.run(Thread.java:595)

banq
2005-12-27 12:37
>Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class

可能在你的jdonframework.xml中定义的CRUD方法的名称在这个Service里面不存在,有空格或错写。检查createMehtod = 等这样的值,验证一下对应的接口服务中是否有。

猜你喜欢