相关疑难解决方法(0)

JBoss 7中的Spring模块

我正在尝试将Spring 3.0.6库设置为JBoss 7中的模块.

我有modules/org/springframework/main中的所有jar以及以下module.xml

<module xmlns:"urn:jboss:module:1.0" name="org.springframework">
    <resources>
          <resource-root path="org.springframework.beans-3.0.6.RELEASE.jar"/>
          ...
    </resources>

    <dependencies>
       <module name="javax.api"/>
       <module name="javax.servlet.api"/>
       <module name="org.apache.commons.logging"/>
    </dependencies>
</module>
Run Code Online (Sandbox Code Playgroud)

我org.springframework在MANIFEST.MF中添加了Dependencies行

当我部署应用程序时,在解析我的spring-servlet.xml文件时抛出以下异常(抱歉,这是来自未联网的系统)

SAXParseException: ... Cannot find the declaration of element 'beans'
Run Code Online (Sandbox Code Playgroud)

我的第一个想法是该模块没有被使用,但如果我org.springframework从我的Dependencies行中删除它无法找到org.springframework.web.context.ContextLoaderListener

如果我把罐子放在WEB-INF/lib而不是使用模块,一切正常.

spring-servlet.xml 包含以下架构参考

http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
Run Code Online (Sandbox Code Playgroud)

所以我把xml 放在spring-beans-3.0.xsd同一个目录中spring-servlet.xml并将其修改为

http://www.springframework.org/schema/beans spring-beans-3.0.xsd
Run Code Online (Sandbox Code Playgroud)

但仍然没有运气.

任何人都知道为什么找到类文件但是xsd文件不是?

jboss spring jboss7.x

8
推荐指数
1
解决办法
2万
查看次数

spring webservice无效的NamespaceHandler问题(jaxws)

我正在用 spring 构建一个 Web 服务。我可以构建项目并将其部署到 tomcat,但是当服务器启动时,我收到以下错误:

命名空间 [http://cxf.apache.org/jaxws] 的无效 NamespaceHandler 类 [org.apache.cxf.jaxws.spring.NamespaceHandler]:处理程序类文件或依赖类有问题;嵌套异常是 java.lang.NoClassDefFoundError: org/springframework/beans/factory/xml/NamespaceHandlerSupport

我已经在我的类路径中包含了 cxf-rt-frontend-jaxws.jar。

我的bean定义在这里:

 <jaxws:endpoint id="helloWebservice"
  implementor="#com.xxx.impl.HelloWebserviceImpl"
  address="/hellows">
 </jaxws:endpoint>
Run Code Online (Sandbox Code Playgroud)

我的 lib 文件夹包含(WEB-INF/lib):

antlr-2.7.6.jar
asinus-api.jar
asinus-ri.jar
aspectjrt.jar
aspectjweaver.jar
backport-util-concurrent-3.0.jar
cglib-nodep-2.1_3.jar
commons-beanutils-1.6.jar
commons-codec-1.4.jar
commons-collections-3.2.1.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-io-1.4.jar
commons-lang-2.4.jar
commons-logging-1.1.1.jar
com.springsource.javax.validation-1.0.0.GA.jar
com.springsource.org.aopalliance-1.0.0.jar
dom4j-1.6.1.jar
ehcache-core-1.7.2.jar
ezmorph-1.0.4.jar
freemarker-2.3.15.jar
hibernate3.jar
hibernate-validator-4.0.2.GA.jar
javassist.jar
jdom.jar
jpa-api-2.0-cr-1.jar
json-lib-2.2.jar
jta-spec1_0_1.jar
lib.txt
log4j-1.2.15.jar
memcached-2.4.2.jar
org.springframework.aop-3.0.2.RELEASE.jar
org.springframework.asm-3.0.2.RELEASE.jar
org.springframework.aspects-3.0.2.RELEASE.jar
org.springframework.beans-3.0.2.RELEASE.jar
org.springframework.context-3.0.2.RELEASE.jar
org.springframework.context.support-3.0.2.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.2.RELEASE.jar
org.springframework.jdbc-3.0.2.RELEASE.jar
org.springframework.orm-3.0.2.RELEASE.jar
org.springframework.test-3.0.2.RELEASE.jar
org.springframework.transaction-3.0.2.RELEASE.jar
org.springframework.web-3.0.2.RELEASE.jar
owasp.jar
quartz-1.7.3.jar
rome-1.0.jar
slf4j-api-1.5.6.jar
slf4j-log4j12-1.5.6.jar
spring-modules-cache.jar
Run Code Online (Sandbox Code Playgroud)

和我的外部罐子:

cxf-2.2.5.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-jaxws_2.1_spec-1.0.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar …
Run Code Online (Sandbox Code Playgroud)

java spring web-services jax-ws javabeans

6
推荐指数
1
解决办法
9971
查看次数

标签 统计

spring ×2

java ×1

javabeans ×1

jax-ws ×1

jboss ×1

jboss7.x ×1

web-services ×1