2010-11-10 96 views
2

我想從spring 2.5.6更新到Spring 3.0.5。我們正在使用josso進行單點登錄。 JOSSO(1.8.2)在jboss(4.2.2)服務器lib文件夾中安裝spring 2.5 libs。我們在lib庫文件夾中有彈簧庫,因此我們在jboss服務器庫和耳庫之間有衝突。我嘗試用spring 3.0.5替換jboss服務器庫,但是我收到以下錯誤:從Spring 2.5升級到Spring 3.0.5 a Josso應用服務器

2010-11-10 10:29:57,687 WARN [org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader] Ignored XML validation warning 
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.josso.org/schema/josso-jboss42-agent.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. 
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) 
    at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source) 
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) 
    at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source) 
    at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source) 
    at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) 
    at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) 
    at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source) 
    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) 
    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) 
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) 
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) 
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(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.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212) 
    at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126) 
    at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:180) 
    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.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161) 
    at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51) 
    at org.josso.agent.config.SpringComponentKeeperImpl.<init>(SpringComponentKeeperImpl.java:51) 
    at org.josso.agent.config.SpringComponentKeeperFactoryImpl.newComponentKeeper(SpringComponentKeeperFactoryImpl.java:33) 
    at org.josso.agent.Lookup.getComponentKeeper(Lookup.java:125) 
    at org.josso.agent.Lookup.lookupSSOAgent(Lookup.java:102) 
    at org.josso.tc55.agent.SSOAgentValve.start(SSOAgentValve.java:192) 
    at org.apache.catalina.core.StandardPipeline.start(StandardPipeline.java:232) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1049) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:747) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1044) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:515) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:576) 
    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:585) 
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296) 
    at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.web.tomcat.service.JBossWeb.startService(JBossWeb.java:440) 
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) 
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) 
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 
    at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97) 
    at org.jboss.deployment.SubDeployerInterceptor.invokeNext(SubDeployerInterceptor.java:124) 
    at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:109) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) 
    at $Proxy0.start(Unknown Source) 
    at org.jboss.system.ServiceController.start(ServiceController.java:417) 
    at org.jboss.system.ServiceController.start(ServiceController.java:435) 
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 
    at $Proxy4.start(Unknown Source) 
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) 
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) 
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) 
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) 
    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:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 
    at $Proxy9.deploy(Unknown Source) 
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421) 
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634) 
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263) 
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336) 
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) 
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) 
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978) 
    at $Proxy0.start(Unknown Source) 
    at org.jboss.system.ServiceController.start(ServiceController.java:417) 
    at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 
    at $Proxy4.start(Unknown Source) 
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302) 
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025) 
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819) 
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782) 
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766) 
    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:585) 
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) 
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) 
    at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142) 
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) 
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) 
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) 
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210) 
    at $Proxy5.deploy(Unknown Source) 
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482) 
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362) 
    at org.jboss.Main.boot(Main.java:200) 
    at org.jboss.Main$1.run(Main.java:508) 
    at java.lang.Thread.run(Thread.java:595) 

任何指針,出了什麼問題?

回答

1

JOSSO XML Schema XSD存在問題。 Spring 3.0引入了嚴格的XML驗證,因此JOSSO給出了錯誤。我們通過配置應用程序上下文來禁用Spring XML驗證。請參閱link

1

的錯誤信息是:

schema_reference.4:無法讀取模式文檔 'http://www.josso.org/schema/josso-jboss42-agent.xsd',因爲:1)找不到該文件; 2)文件無法閱讀; 3)文檔的根元素不是。

如果您使用額外的spring命名空間,並且在啓動spring時未找到xsd,則會得到此類消息。

你可以做兩件事情:

1)修正網址,或

2)創建自己的jar文件,把XSD中,並添加一個spring.schemas文件到它的META-INF目錄。 的spring.schemas文件是一種屬性文件:關鍵是XSD URL(你要逃離「:」)和值是罐子 內的XSD文件的位置,例如:

http\://www.josso.org/schema/josso-jboss42-agent.xsd=org/josso.sechma/josso-jboss42-agent.xsd 
0

我想知道JOSSO安裝到JBoss中的Spring JAR是否以某種方式被修改,例如添加JOSSO的Spring配置樣式所需的自定義模式文件。這與棧跟蹤是一致的,這表明Spring試圖加載應用程序上下文並失敗,因爲它找不到模式。 Spring約定是將給定XML配置文件的模式文件放入JAR文件中。

查看META-INF目錄中的原始Spring JAR文件,看看是否可以在其中看到任何與JOSSO相關的模式文件。如果你這樣做,那麼你將不得不嘗試和Spring 3 JAR一起重構相同的信息,這是一個不平凡的練習。

+0

我們在jboss服務器庫中有Spring 2.5.5庫,我用Spring 2.5.6替換了它,現在JOSSO工作正常。令我驚訝的是我沒有得到類加載器的問題,因爲我的EAR中有Spring 3.0.5庫。應用程序現在工作正常,但我想知道應用程序正在使用2.5.6庫或3.0.5庫。也許我將不得不嘗試使用spring 3.0.5功能,然後才能知道。我在類加載器的概念上不是很好。 – 2010-11-10 09:16:57

相關問題