我在下面得到这个例外,因为我使用的xsd不正确,请告知如何克服这个
下面的是我在xml文件中使用的xsd声明
-(long)longValue{
return (long)[self longLongValue];
}
以下是我在类路径中使用的罐子
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:jms="http://www.springframework.org/schema/integration/jms"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd
http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms-2.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
我接下来的例外是
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/crimson.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jaxp.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jcert.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jms.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jndi.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jnet.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jsse.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/jta-spec1_0_1.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibcrypt.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibjms.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibjmsadmin.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibjmsapps.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibrvj.jar"/>
<classpathentry kind="lib" path="C:/Release12/lib/thirdparty/tibco-ems/4.2.0/tibrvjms.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring-jms.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/commons-lang-2.6.jar/commons-lang-2.6.jar"/>
<classpathentry kind="lib" path="C:/tibco/log4j-1.2.9.jar"/>
<classpathentry kind="lib" path="C:/tibco/spring.jar"/>
<classpathentry kind="lib" path="C:/tibco/spring-beans-2.0.4.jar"/>
<classpathentry kind="lib" path="C:/tibco/spring-context-2.0.4.jar"/>
<classpathentry kind="lib" path="C:/tibco/spring-core-2.0.4.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/org-apache-commons-logging.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-core-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-event-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-feed-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-file-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-ftp-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-groovy-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-http-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-httpinvoker-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-ip-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-jdbc-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-jms-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-jmx-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-mail-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-rmi-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-security-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-sftp-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-stream-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-test-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-twitter-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-ws-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-xml-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/abcsaral/sprintintegrationn/spring integration/spring integration/spring-integration-xmpp-2.0.5.RELEASE.jar"/>
<classpathentry kind="lib" path="C:/org.springframework.jms-3.1.0.M1.jar/org.springframework.jms-3.1.0.M1.jar"/>
<classpathentry kind="lib" path="C:/xerces.jar/xerces.jar"/>
<classpathentry kind="lib" path="C:/xercesImpl.jar/xercesImpl.jar"/>
答案 0 :(得分:0)
您使用的是spring beans 2.0.4.jar,但引用了spring 3 xsd。那不起作用。
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:jms="http://www.springframework.org/schema/integration/jms"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
从xsd位置删除该版本,它应该可以正常工作。
此外,您应该升级到更新的弹簧版本。