0

我正在运行 JBoss 4.2.3.GA(无法更改此版本)和 Java 6。我正在尝试部署 JAR 文件。在其中,我尝试连接到 Web 服务,但收到错误消息“无法加载 java 类型:org.mainco.bsorg.BusinessServiceFaultException”,即使有问题的类在我正在部署的 JAR 文件中到服务器。我在想有某种类加载器问题,但不知道从哪里开始寻找。我用来连接的Java代码是

final OrganizationService service = new OrganizationService(wsdl, qname);           
service.getOrganizationServicePort()

我正在使用下面的 Maven 插件生成我的 Web 服务客户端代码...

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>wsimport</goal>
                    </goals>
                    <configuration>
                        <wsdlUrls>
                            <wsdlUrl>${wsdl.url}</wsdlUrl>
                        </wsdlUrls>
                        <sourceDestDir>${basedir}/src/main/java</sourceDestDir>
                        <packageName>org.mainco.bsorg</packageName>
                    </configuration>
                </execution>
            </executions>
        </plugin>

我有这些依赖项......

    <dependency>
        <groupId>org.apache.axis</groupId>
        <artifactId>axis</artifactId>
        <version>1.4</version>
    </dependency>
    <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>jaxrpc-api</artifactId>
        <version>1.1</version>
    </dependency>

下面是例外。我需要从哪里开始挖掘的任何想法?

2012-08-13 12:45:02,522 ERROR [org.quartz.core.ErrorLogger] Job (default.job.0.1344875788431 threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: javax.ejb.EJBTransactionRolledbackException: Cannot load java type: org.mainco.bsorg.BusinessServiceFaultException]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
* Nested Exception (Underlying Cause) ---------------
javax.ejb.EJBTransactionRolledbackException: Cannot load java type: org.mainco.bsorg.BusinessServiceFaultException
        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
        at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:249)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
        at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
        at $Proxy80.execute(Unknown Source)
        at org.jboss.resource.adapter.quartz.inflow.QuartzJob.execute(QuartzJob.java:57)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: org.jboss.ws.WSException: Cannot load java type: org.mainco.bsorg.BusinessServiceFaultException
        at org.jboss.ws.metadata.umdm.FaultMetaData.getJavaType(FaultMetaData.java:151)
        at org.jboss.ws.core.jaxws.DynamicWrapperGenerator.generate(DynamicWrapperGenerator.java:139)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.addFault(JAXWSMetaDataBuilder.java:324)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.processWebMethod(JAXWSMetaDataBuilder.java:797)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilder.processWebMethods(JAXWSMetaDataBuilder.java:891)
        at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.rebuildEndpointMetaData(JAXWSClientMetaDataBuilder.java:300)
        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPortInternal(ServiceDelegateImpl.java:271)
        at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.getPort(ServiceDelegateImpl.java:202)
        at javax.xml.ws.Service.getPort(Service.java:143)
        at org.mainco.bsorg.OrganizationService.getOrganizationServicePort(OrganizationService.java:56)
        at org.mainco.subco.orgsclient.quartz.UpdateOrgsJob.execute(UpdateOrgsJob.java:49)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
        at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
        at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
        at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
        ... 11 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.mainco.bsorg.BusinessServiceFaultException
        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(ClassLoader.java:247)
        at org.jboss.wsf.common.JavaUtils.loadJavaType(JavaUtils.java:143)
        at org.jboss.ws.metadata.umdm.FaultMetaData.getJavaType(FaultMetaData.java:138)

编辑:我将 JAR 文件部署到 $JBOSS_HOME/server/default/deploy 。JAR 文件包含我要运行的 Quartz 作业,这就是我将其保存到此目录的原因。

4

1 回答 1

0

检查您拥有的 jar 是否是正确的版本,以及 jboss lib 文件夹中是否有该 jar 文件(此处为 C:\jboss-4.2.3.GA\server\seam\lib) *seam = 的名称您正在使用的个人资料

于 2012-08-13T17:49:55.523 回答