当前位置: 首页 > 知识库问答 >
问题:

Weblogic 10.3.3与HtmlUnit Spring webservice冲突

葛兴发
2023-03-14

在weblogic 10.3.3应用服务器上启动并运行ScreenSrapper Web服务时遇到一些问题。我用Maven来管理我的构建,用HtmlUnit来管理我的抓取逻辑,所有的东西都是通过spring框架连接起来的。这是我第一次尝试开发Web服务!

我有HtmlUnit在我的pom.xml作为一个依赖:

    <dependency>
        <groupId>net.sourceforge.htmlunit</groupId>
        <artifactId>htmlunit</artifactId>
        <version>2.9</version>
        <scope>compile</scope>
    </dependency>

...这是我的spring-ws-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:p="http://www.springframework.org/schema/p" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:sws="http://www.springframework.org/schema/web-services"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">


    <sws:annotation-driven />
        <context:component-scan base-package="com.x.ws"/>

        <bean id="addressLookupConfiguration" class="com.x.ws.z.utils.AddressLookupConfiguration"/>

        <sws:interceptors>
            <bean id="interceptor"
                class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">
                <property name="schemas">
                    <list>
                        <value>/WEB-INF/AddressLookup.xsd</value>
                    </list>
                </property>
                <property name="validateRequest" value="true" />
                <property name="validateResponse" value="true" />
            </bean>

            <bean class="org.springframework.ws.soap.security.xwss.XwsSecurityInterceptor">
              <property name="policyConfiguration" value="/WEB-INF/securityPolicy.xml"/>
              <property name="callbackHandlers">
                  <list>
                      <ref bean="callbackHandler"/>
                  </list>
              </property>
          </bean>
        </sws:interceptors>

        <bean id="callbackHandler"
                class="com.x.ws.z.security.AddressLookupValidationCallbackHandler">
                <property name="users">
                    <props>
                        <prop key="x">x</prop>
                        <prop key="x">x</prop>
                        <prop key="x">x</prop>
                    </props>
                </property>
        </bean>
        <sws:dynamic-wsdl id="addressLookup" portTypeName="addressLookup"
            locationUri="http://bob/ws/z/x/addressLookup">
            <sws:xsd location="/WEB-INF/AddressLookup.xsd" />
        </sws:dynamic-wsdl>
</beans>

我可以查看生成的WSDL,一切看起来都很好,但是当我调用我的网络服务时,我会得到:

ERROR | 2012-04-12 18:20:01,026 | AddressLookupEndpoint.java:60 | java.lang.NoSuchMethodError: org/apache/commons/lang/StringUtils.startsWithIgnoreCase(Ljava/lang/String;Ljava/lang/String;)Z

当我叫它一秒钟,然后每次我得到:

ERROR | 2012-04-12 18:20:25,676 | AddressLookupEndpoint.java:60 | java.lang.NoClassDefFoundError: com/gargoylesoftware/htmlunit/WebClient

不知道为什么我第一次得到NoSuchmethod异常,但显然weblogic没有找到HtmlUnit jar(我已经在war文件的WEB-INF/lib中确认了它)。

我假设在weblogic端与某个jar有冲突,所以我在应用程序中添加了以下内容weblogic.xml

<wls:container-descriptor>
    <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
</wls:container-descriptor>

但是,当我部署应用程序时,WSDL没有被正确创建。引发以下异常:

ERROR | 2012-04-12 18:03:46,484 | FrameworkServlet.java:314 | Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0': Cannot create inner bean 'interceptor' of type [org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
<trunc>
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0': Cannot create inner bean 'interceptor' of type [org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
<trunc>
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
        ... 9 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
        ... 56 more
Caused by: org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.xml.validation.Jaxp13ValidatorFactory.createValidator(Jaxp13ValidatorFactory.java:45)
        at org.springframework.xml.validation.XmlValidatorFactory.createValidator(XmlValidatorFactory.java:92)
<trunc>
        ... 9 more
Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
        at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
        at org.springframework.xml.validation.SchemaLoaderUtils.loadSchema(SchemaLoaderUtils.java:70)
        at org.springframework.xml.validation.Jaxp13ValidatorFactory.createValidator(Jaxp13ValidatorFactory.java:41)
        ... 63 more
<Apr 12, 2012 6:03:46 PM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@135824637[app:nieAddressLookup module:nieAddressLookup.war path:/ws/nieaddresslookup/v1 spec-version:null]] Root cause of ServletException.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0': Cannot create inner bean 'interceptor' of type [org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        Truncated. see log file for complete stacktrace

Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0': Cannot create inner bean 'interceptor' of type [org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
        Truncated. see log file for complete stacktrace

Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'interceptor' defined in ServletContext resource [/WEB-INF/spring-ws-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
        Truncated. see log file for complete stacktrace

Caused By: org.springframework.xml.validation.XmlValidationException: Could not create Schema: SAX2 driver class weblogic.xml.jaxp.RegistryXMLReader does not implement XMLReader; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.springframework.xml.validation.Jaxp13ValidatorFactory.createValidator(Jaxp13ValidatorFactory.java:45)
        at org.springframework.xml.validation.XmlValidatorFactory.createValidator(XmlValidatorFactory.java:92)
        at org.springframework.ws.server.endpoint.interceptor.AbstractValidatingInterceptor.afterPropertiesSet(AbstractValidatingInterceptor.java:153)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
        Truncated. see log file for complete stacktrace

Caused By: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
        at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
        at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
        at org.springframework.xml.validation.SchemaLoaderUtils.loadSchema(SchemaLoaderUtils.java:70)
        at org.springframework.xml.validation.Jaxp13ValidatorFactory.createValidator(Jaxp13ValidatorFactory.java:41)
        at org.springframework.xml.validation.XmlValidatorFactory.createValidator(XmlValidatorFactory.java:92)
        Truncated. see log file for complete stacktrace
>

我的应用程序中的jar似乎与weblogic xml解析器冲突。我从构建中删除了xmlParserAPIs jar并重新部署。现在我得到了以下例外:

ERROR | 2012-04-13 11:10:51,316 | FrameworkServlet.java:314 | Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]; nested exception is java.lang.NoClassDefFoundError: javax/xml/namespace/QName
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:468)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
        at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:129)
        at javax.servlet.GenericServlet.init(GenericServlet.java:242)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.NoClassDefFoundError: javax/xml/namespace/QName
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:328)
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:285)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
        at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
        at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:42)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.reset(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.configurePipeline(Unknown Source)
        at org.apache.xerces.parsers.XIncludeAwareParserConfiguration.configurePipeline(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
        at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
        at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
        at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
        at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:243)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
        ... 9 more
<Apr 13, 2012 11:10:51 AM IST> <Error> <HTTP> <BEA-101017> <[ServletContext@135546353[app:nieAddressLookup module:nieAddressLookup.war path:/ws/nieaddresslookup/v1 spec-version:null]] Root cause of ServletException.
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-ws-servlet.xml]; nested exception is java.lang.NoClassDefFoundError: javax/xml/namespace/QName
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        Truncated. see log file for complete stacktrace

Caused By: java.lang.NoClassDefFoundError: javax/xml/namespace/QName
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:328)
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:285)
        Truncated. see log file for complete stacktrace

我看不出weblogic怎么会找不到QName。weblogic框是我们生产的镜像,我们有很多其他的网络服务在上面运行良好,所以应该正确配置。

我将感谢一些关于如何让weblogic看到HtmlUnit jar的建议,这些问题真的很累人。

共有1个答案

乐寒
2023-03-14

WL 10.3.3介绍了weblogic中首选应用程序包的使用。的xml文件。而不仅仅是在weblogic应用程序中。xml的一种。耳朵

以下内容应该有助于解决方法未找到的问题。

<container-descriptor>
  <prefer-application-packages>
    <package-name>org.apache.commons.lang.*</package-name>
  </prefer-application-packages>
</container-descriptor>
 类似资料:
  • 我使用pybind11让python调用现有的C模块(库)。但是,在C库中,调用::GetModuleFileName(Visual Studio)来确定加载的模块在C中运行时的物理路径。但是当我通过pybind11从python(Jupyter Notebook)调用库时,python.exe的物理路径会返回。如何配置或更改以确保获得C库的物理路径? C代码是这样的:Lib. h 我ib.cpp

  • 我使用的是Horizontal ViewPager2,它里面有4个片段。每个片段都有一个回收器视图上的SwipeReFresLayout。我面临的问题是,当回收器视图位于顶部时,然后onClick on任何项目列表都不起作用。如果我向下滚动一点回收器视图,那么onClick就可以正常工作。当回收器视图位于顶部时,如果SwipeReFresLayout处于刷新状态,那么onClick就可以正常工作。

  • 有了这个Jaxb Xml定义,我尝试通过添加来移除映射元素包装器,但在解压缩过程中会导致异常 EventAdapter是 我的输出是 我尝试通过添加来删除标记 产量不错 但撤退失败了 调试Jaxb使我熟悉了这一行

  • 我想使用Stetho调试了我的Andorid应用程序,但Stetho与Fastjson有冲突。

  • Postgres 10和11的插入说明: 关于冲突[冲突目标]冲突行动 我有一张桌子: 而我想做的 但是我得到一个错误: ON CONFLICT DO UPDATE需要推理规范或约束名称提示:例如,ON CONFLICT(column_name) 为什么我必须提供一个确定的目标?如何提供主键或其他列集?

  • 问题内容: 我有以下代码: 这正常工作。但是,我还需要在pom.xml中添加Xalan作为依赖项,当我这样做时,上面的代码现在会引发错误: 我认为这与Xalan的jar中有一个不同的Transformer实现有关。在不更改上述代码并将Xalan保留为依赖关系的情况下,如何解决此冲突? 问题答案: 从Xalan中排除Xerces可以解决此问题:

  • 问题内容: 我有一个带有客户ID的table_Project(链接到tbl_Customer)。在tbl_Customer中,我有Customer_ID(作为密钥)和其他一些信息,例如电话,电子邮件等。 要将其从Gridview中删除,请使用以下DeleteCommand: 但这给了我以下错误: 但是通过更新CustomerInfo我没有得到任何错误。我已经看到了C#的不同解决方案,但是我使用.n

  • 问题内容: 我试图在sphinx中为我的项目编写文档,并且只要sphinx在我的模块中遇到OptionParser,它就会给我: 我以为这是不可能的,所以我写了一个简单的模块检查一下: 它给了我同样的错误。我的第一个样子是这样的: 问题答案: 这是我认为发生的情况: 当Sphinx运行时,autodoc导入您的模块,并执行模块中的顶级代码。创建一个OptionParser实例,它处理传递给sphi