当前位置: 首页 > 工具软件 > java-saml > 使用案例 >

java放weblogic上面403_Java-Weblogic 12c上的Spring SAML

刘焱
2023-12-01

我目前正在开发一个使用Spring SAML(http://projects.spring.io/spring-security-saml/)项目作为身份验证一部分的应用程序.我知道它仍在RC中,但我们正在开发的应用程序也是如此.部署到Tomcat7时,我们的库已集成并且可以正常运行,但是部署到Weblogic 12c(12.0.1.2)时遇到问题.在Weblogic上,不会抛出任何错误,则断言值将被解密为空且无错误.

问题似乎出在Xerces库中.据我所知,Spring SAML(由于OpenSAML)需要2.10.0,但是Weblogic提供了2.8.0的Xerces库.项目WEB-INF / lib文件夹.这解决了Spring SAML的解密问题,但破坏了Weblogics解析JSP页面的能力.我已经在下面包含了未升级和升级的Xerces异常的部分堆栈跟踪.如果有人对如何正确解决此问题有任何想法,以便Spring SAML可以在不破坏默认功能的情况下正常运行Weblogic,我将不胜感激.

这是更新Xerces之前的堆栈跟踪

2014-07-31 10:43:37,675 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.apache.xml.security.algorithms.JCEMapper - Request for U

RI http://www.w3.org/2001/04/xmlenc#aes256-cbc

2014-07-31 10:43:37,675 [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] DEBUG org.apache.xml.security.encryption.XMLCipher - JCE Algorithm

= AES/CBC/ISO10126Padding

Exception

java.lang.NumberFormatException: For input string: ""

at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

at java.lang.Integer.parseInt(Integer.java:504)

at java.lang.Integer.valueOf(Integer.java:582)

at org.opensaml.common.SAMLVersion.valueOf(SAMLVersion.java:89)

at org.opensaml.saml2.core.impl.AssertionUnmarshaller.processAttribute(AssertionUnmarshaller.java:71)

at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshallAttribute(AbstractXMLObjectUnmarshaller.java:254)

at org.opensaml.xml.io.AbstractXMLObjectUnmarshaller.unmarshall(AbstractXMLObjectUnmarshaller.java:113)

at org.opensaml.xml.encryption.Decrypter.decryptDataToList(Decrypter.java:479)

at org.opensaml.xml.encryption.Decrypter.decryptData(Decrypter.java:403)

at org.opensaml.saml2.encryption.Decrypter.decryptData(Decrypter.java:141)

at org.opensaml.saml2.encryption.Decrypter.decrypt(Decrypter.java:69)

at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:190)

at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:82)

at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)

at org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:84)

这是将Xerces更新为2.10.0之后的堆栈跟踪.

weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB- INF/jsp/errors/500.jsp

500.jsp:1:1: The validator class: "org.apache.taglibs.standard.tlv.JstlCoreTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.Re

gistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".

^-------------------------------------------------------------^

500.jsp:2:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.

^----^

500.jsp:2:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.

^----^

500.jsp:6:3: This tag can only appear as a subelement of a standard or custom action. Exceptions are: jsp:body, jsp:attribute, jsp:expression, jsp:scriptlet, and jsp:declaration.

^-----------^

500.jsp:8:3: This tag can only appear as a subelement of a standard or custom action. Exceptions are: jsp:body, jsp:attribute, jsp:expression, jsp:scriptlet, and jsp:declaration.

^-----------^

500.jsp:11:3: This tag can only appear as a subelement of a standard or custom action. Exceptions are: jsp:body, jsp:attribute, jsp:expression, jsp:scriptlet, and jsp:declaration.

^------^

at weblogic.servlet.jsp.JavelinxJSPStub.reportCompilationErrorIfNeccessary(JavelinxJSPStub.java:243)

at weblogic.servlet.jsp.JavelinxJSPStub.compilePage0(JavelinxJSPStub.java:179)

at weblogic.servlet.jsp.JavelinxJSPStub.access$000(JavelinxJSPStub.java:50)

at weblogic.servlet.jsp.JavelinxJSPStub$1.run(JavelinxJSPStub.java:108)

at java.security.AccessController.doPrivileged(Native Method)

at weblogic.servlet.jsp.JavelinxJSPStub.compilePage(JavelinxJSPStub.java:105)

at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:247)

at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:200)

at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:403)

at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:295)

at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:478)

at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:367)

at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

...

 类似资料: