jboss中调用其他服务的webservice
我最近在写项目的服务端,要求服务方法写消息去访问.net的webservice.服务端是部署到jboss下的,当客户端调用时总是报错:
10:05:00,828 INFO [STDOUT] [WARN ] DiscoverResources - -getNextResources: Ignoring Exception <java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:>
10:05:00,828 ERROR [STDERR] java.io.IOException: Invalid use of destroyed classloader, UCL destroyed at:
10:05:00,828 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.findResources(RepositoryClassLoader.java:595)
10:05:00,828 ERROR [STDERR] at java.lang.ClassLoader.getResources(ClassLoader.java:1015)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.jdk.JDK12Hooks.getResources(JDK12Hooks.java:150)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResources(DiscoverResources.java:153)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.getNextResource(DiscoverResources.java:129)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.DiscoverResources$1.hasNext(DiscoverResources.java:116)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassNames(DiscoverNamesInFile.java:186)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.getNextClassName(DiscoverNamesInFile.java:170)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.names.DiscoverNamesInFile$1.hasNext(DiscoverNamesInFile.java:157)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.names.NameDiscoverers$1.getNextIterator(NameDiscoverers.java:143)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.names.NameDiscoverers$1.hasNext(NameDiscoverers.java:126)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.getNextResource(ResourceClassDiscoverImpl.java:159)
10:05:00,828 ERROR [STDERR] at org.apache.commons.discovery.resource.classes.ResourceClassDiscoverImpl$1.hasNext(ResourceClassDiscoverImpl.java:147)
10:05:00,828 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder$1.run(EngineConfigurationFactoryFinder.java:120)
10:05:00,828 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
10:05:00,828 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:113)
10:05:00,828 ERROR [STDERR] at org.apache.axis.configuration.EngineConfigurationFactoryFinder.newFactory(EngineConfigurationFactoryFinder.java:160)
10:05:00,828 ERROR [STDERR] at org.apache.axis.client.Service.getEngineConfiguration(Service.java:813)
10:05:00,828 ERROR [STDERR] at org.apache.axis.client.Service.getAxisClient(Service.java:104)
10:05:00,828 ERROR [STDERR] at org.apache.axis.client.Service.<init>(Service.java:113)
10:05:00,828 ERROR [STDERR] at one.TestService.test(TestService.java:20)
10:05:00,828 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:05:00,828 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:05:00,828 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:05:00,828 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
10:05:00,828 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
10:05:00,828 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)
10:05:00,828 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
10:05:00,828 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
10:05:00,828 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
10:05:00,828 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
10:05:00,828 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)
10:05:00,828 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
10:05:00,828 ERROR [STDERR] Caused by: java.lang.Exception
10:05:00,828 ERROR [STDERR] at org.jboss.mx.loading.RepositoryClassLoader.unregister(RepositoryClassLoader.java:272)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader.unregister(UnifiedClassLoader.java:196)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.DeploymentInfo.cleanup(DeploymentInfo.java:402)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.MainDeployer.destroy(MainDeployer.java:731)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:639)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
10:05:00,828 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:05:00,828 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:05:00,828 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:05:00,828 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
10:05:00,828 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
10:05:00,828 ERROR [STDERR] at $Proxy9.undeploy(Unknown Source)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
10:05:00,828 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
我的访问代码是利用axis:
String endpoint = "http://localhost:8080/hosWeb/address.asmx?wsdl";
Service service= new Service();
Call call;
call = (Call) service.createCall();
Message msg=new Messsage();
call.invoke(msg);
[解决办法]
呵呵,终于找到答案了,原来是jboss里axis的包少了一个。前些日子遇到jboss底层的web包与axis的包冲突。都是用包不慎惹得祸呀。
------解决方案--------------------
我也碰到了一摸一样的问题啊楼主,请问是少了哪个axis的包?