English 中文(简体)
Jbos的春季班装货员问题,同时使用泉水客户
原标题:Spring class loader issues in Jboss while using spring-ws client

我的申请在Jboss妥善执行。 撰写春天网络服务客户,即使用<代码>wsimport制作课程。 我是在组合之后写的。

 <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory">
<property name="messageFactory">
    <bean class="com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl"/>
</property>

in jboss?lib i have jboss-jaxws.jar,spring.jar...Now i copied

spring-ws-1.5.0.jar and  saaj-impl-1.3.jar

但是,正出现微小差错:

The Spring ContextLoaderListener we wrap threw on contextInitialized.
But for our having caught this error, the web application context would not have initialized.
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.IllegalArgumentException: Class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not implement the NamespaceHandler interface
Caused by: 
java.lang.IllegalArgumentException: Class [org.apache.xbean.spring.context.v2.XBeanNamespaceHandler] does not implement the NamespaceHandler interface
    at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:119)

请帮助我解决这一错误。 这些错误,即只是在保留这些jar。 但是,这些要求执行我的新法典。 请建议我如何避免?

最佳回答

You could create WEB-INF/jboss-web.xml file for your application with next content

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC
    "-//JBoss//DTD Web Application 4.2//EN"
    "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
<jboss-web>
    <class-loading java2ClassLoadingCompliance="false">
        <loader-repository>
                   myapp:loader=anyUniqueName
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
        </loader-repository>
    </class-loading>
</jboss-web>

这应防止班轮载人寻找JBoss的校准。 作为旁边,你必须提供WAR/lib的三党jar。

这为4.2位您提供了类似的材料,供您目前使用。

问题回答

这表明,在您的CLASSPATH中,有两种版本的JAR,其中一种可能是服务器本身,另一种是作为贵方一部分部署的,而它们是同一版本。 服务器级装载机将首先找到服务器版本,然后才能运行应用舱载荷。 如果它比你的要求更早,就会有问题。

解决办法是困难的,因为你可能无法在不损害其他部署装备的情况下取消服务器版本。 参看JBOSS配置中是否有旗帜供你使用,以显示JBOSS更喜欢由申请类别装载的JAR,并看看这是否有助于。

http://www.datadisk.co.uk/html_docs/java_app/jboss5/jboss5_deployment.htm http://community.jboss.org/wiki/ClassLoadingConfiguration http://community.jboss.org/wiki/JBossClassLoadingUseCases





相关问题
Implementing SSO with SAML and JBoss

I want to implement SSO with SAML tokens in JBossAS. The scenario is as follows. I have 2 applications app1 and app2 running on 2 JBoss instances. Login into app1 and enter username / password ...

How do you efficiently repeat an action every x minutes?

I have an application that runs in JBoss. I have an incoming web service request that will update an ArrayList. I want to poll this list from another class every 60 seconds. What would be the most ...

jsp:how to hide folder structure of website from users?

how to hide folder structure of website from users. i have developed a website on jave platform (jsp). website is deployed on jboss. suppose my website s home page url is dummy.com/dummyFolder/...

JBoss Web Services Behind IIS Through HTTPs

This is a tangled web that s woven, I suppose, but it really shouldn t be all that hard. Let me see if I can paint the picture: I have written a web service, starting with a WSDL, which is to run in ...

Flex: image scale stopped working after deploy to server

I have some code to scale an image s width according to its height after the image is being loaded. It works fine on my development PC if I point to the wrapper html using local file system path. ...

How in jboss write traces to separate trace file

How in JBoss to write traces to separate file? I would like to see traces about org.hibernate.SQL and org.hibernate.type in separate trace file. I added next appender and categories to jboss-log4j....

热门标签