2011-02-10 36 views
8

部署環境:Windows Server 2008,Tomcat 7.0.5,Oracle JRE 1.6。開發環境與Eclipse Helios相同。OpenSAML引導程序()需要我「InputStream不能爲空」

當我嘗試部署使用OpenSAML 2.3.1的Java應用程序並測試它時,它不想運行。查看源代碼和堆棧跟蹤,看起來DefaultBootstrap.bootstrap()最終導致java.lang.IllegalArgumentException: InputStream cannot be null。我在下面包括完整的堆棧跟蹤。

目標部署系統上的軟件版本或者至少應該與我的開發盒上的軟件版本完全相同,在那裏一切運行良好,但我當然不會使用.war部署。我感到我在部署檔案中缺少一些XML或DTD文件,但這種感覺本身並不能幫助我修復它。谷歌搜索的部分堆棧跟蹤也沒有真正幫助我很多。

我在哪裏開始追蹤這個錯誤的實際根本原因,所以我可以修復它?

2011-feb-10 10:56:08 org.apache.catalina.core.StandardWrapperValve invoke 
ALLVARLIG: Servlet.service() for servlet [se.novasoftware.gabriel.SAMLParser] in context with path [/ServiceTier] threw exception [java.lang.IllegalArgumentException: InputStream cannot be null] with root cause 
java.lang.IllegalArgumentException: InputStream cannot be null 
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:120) 
at org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(BasicParserPool.java:643) 
at org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:216) 
at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141) 
at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:148) 
at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:88) 
at _mynamespace_.saml.ParsedResponse.<init>(ParsedResponse.java:56) 
at _mynamespace_.saml.ParsedResponse.<init>(ParsedResponse.java:104) 
at _mynamespace_.SAMLParser.doPost(SAMLParser.java:29) // servlet entry point 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240) 
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) 
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) 
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259) 
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:662) 

ParsedResponse.java線56是在其構造自舉()調用:

private PersedResponse() throws ConfigurationException { 
    DefaultBootstrap.bootstrap(); // line 56 
    ... 

而在同一文件中的行104是被從外面調用這個私人默認調用構造函數構造函數:

public ParsedResponse(final String samlXML) 
     throws UnmarshallingException, ConfigurationException { 
    this(); // line 104 
    ... 

回答

19

添加openws-1.3.0.jar以展開組件的伎倆。

相關問題