gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

dtd URL with trailing spaces in struts-plugin.xml causes webapp startup failure. #800

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the struts-plugin.xml file that is shipped with version 3.3.0, there is a 
dtd URL that is invalid.

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd  ">

The 2 trailing spaces cause an error that prevents the startup of my webapp.

The startup includes attempts to fetch the dtd file and do validation.  The 
entire startup fails when it is unable to find the dtd file, due to the 
trailing spaces.
Mar 27, 2012 3:11:45 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/exadm] startup failed due to previous errors

Version 3.2.1 does not have these trailing spaces after the URL, and I can 
start my webapp without issue when using that version instead of the latest 
(3.3.0).

I am using struts2 (2.2.1.1), springframework (3.0.5.RELEASE), and apache tiles 
(2.2.2).  My webserver is tomcat.

The stack trace is below:

Mar 27, 2012 3:11:42 PM org.apache.catalina.core.ApplicationContext log
Mar 27, 2012 3:11:45 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - Class: 
sun.net.www.protocol.http.HttpURLConnection
File: HttpURLConnection.java
Method: getInputStream
Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
    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:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: Unable to load configuration. - Class: 
sun.net.www.protocol.http.HttpURLConnection
File: HttpURLConnection.java
Method: getInputStream
Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
    ... 29 more
Caused by: Unable to load 
jar:file:/home/tonya/src/experiment-admin/trunk/target/experiment-admin/WEB-INF/
lib/struts2-jquery-grid-plugin-3.3.0.jar!/struts-plugin.xml - Class: 
sun.net.www.protocol.http.HttpURLConnection
File: HttpURLConnection.java
Method: getInputStream
Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:909)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:154)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:121)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:179)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
    ... 31 more
Caused by: http://struts.apache.org/dtds/struts-2.3.dtd%20%20 - Class: 
sun.net.www.protocol.http.HttpURLConnection
File: HttpURLConnection.java
Method: getInputStream
Line: 1311 - sun/net/www/protocol/http/HttpURLConnection.java:1311:-1
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:904)
    ... 35 more
Caused by: java.io.FileNotFoundException: 
http://struts.apache.org/dtds/struts-2.3.dtd%20%20
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1315)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
    at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1090)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1003)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
    ... 36 more
Mar 27, 2012 3:11:45 PM org.apache.catalina.core.ApplicationContext log
Mar 27, 2012 3:11:47 PM org.apache.catalina.core.ApplicationContext log
Mar 27, 2012 3:12:13 PM org.apache.catalina.core.ApplicationContext log
Mar 27, 2012 3:12:13 PM org.apache.catalina.core.ApplicationContext log
Mar 27, 2012 3:12:13 PM org.apache.catalina.core.ApplicationContext log

Original issue reported on code.google.com by tonya.oh...@gmail.com on 27 Mar 2012 at 10:21

GoogleCodeExporter commented 9 years ago

Original comment by johgep on 28 Mar 2012 at 1:05

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/struts2-jquery/source/detail?r=1632

Original comment by johgep on 29 Mar 2012 at 4:48

GoogleCodeExporter commented 9 years ago

Original comment by johgep on 8 May 2012 at 6:41

GoogleCodeExporter commented 9 years ago
SEVERE: Exception starting filter struts2
Unable to load configuration. - [unknown location]
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: Unable to load 
jar:file:/D:/PTUNE_WORKSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
/wtpwebapps/ptuneUserInterfaceSaurabh/WEB-INF/lib/struts2-jquery-plugin-3.5.1.ja
r!/struts-plugin.xml - [unknown location]
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:890)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:144)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:111)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:164)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
    ... 21 more
Caused by: http://struts.apache.org/dtds/struts-2.3.dtd - [unknown location]
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:115)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:885)
    ... 25 more
Caused by: java.io.FileNotFoundException: 
http://struts.apache.org/dtds/struts-2.3.dtd
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:113)
    ... 26 more
Feb 13, 2013 11:39:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Feb 13, 2013 11:39:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ptuneUserInterfaceSaurabh] startup failed due to previous 
errors
Feb 13, 2013 11:39:24 AM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Feb 13, 2013 11:39:24 AM 
org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing 
org.springframework.web.context.support.XmlWebApplicationContext@96212a: 
display name [Root WebApplicationContext]; startup date [Wed Feb 13 11:39:23 
IST 2013]; root of context hierarchy
Feb 13, 2013 11:39:24 AM 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry 
destroySingletons
INFO: Destroying singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@15d601f: 
defining beans 
[propertyConfigurer,loginInterceptor,DataSource,dataSourceforUpdate,jdbcTemplate
Update,jdbcTemplate,userDAOImpl,featuresDAOImpl,sMServicesImpl,OperatorDAOImpl,o
peratorImpl,checkLoginSession,loginAction,doMultipleOperator,logoutAction,showCi
rclesAction,MixingTemplateFormatAction,DownLoadCsvData,showBulkforSelFrameAction
,displayTemplateDataAction,searchTemplateDataAcion,GroupInfoDataAcion,listCrbtAc
tion,editCrbtAction,saveOrUpdateCrbtAction,listCmsOfflineAction,editCmsOfflineAc
tion,saveOrUpdateCmsOfflineAction,displayMisReportDataAcion,searchMisReportDataA
cion,displaySubscriptionReportDataAcion,searchSubscriptionReportDataAcion,doUplo
adToneModeration,doUploadCrbtModeration,doUploadBulkActAction,displayDirectProvi
sioningVcode,listBulkFileStatusAction,listBulkToneModerationAction,listBulkCrbtM
oderationAction,listBcmsSearchAction,BcmsAdvanceSearchAction,BcmsSearchLiveVcode
,showMobileNumberSearchAction,showDetailMobileNumberSearchAcion,showMisSummaryAc
ion,showDetailMisSummaryAcion,showSubDetailMisSummaryAcion,createPtuneActivation
ReqAction,corporateTuneActivationReq,templatePtuneActivationReqAction,doUploadBu
lkVcodeAction,displayOperatorOfflineDataAction,SearchOperatorOfflineDataAcion,ar
tistAbsentAction,cmsHandler,cmsHandlerServiceImpl,cmsHandlerDAOImpl]; root of 
factory hierarchy
Feb 13, 2013 11:39:24 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Feb 13, 2013 11:39:24 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Feb 13, 2013 11:39:24 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16  config=null
Feb 13, 2013 11:39:24 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2316 ms

Original comment by saurabhv...@gmail.com on 13 Feb 2013 at 6:12

GoogleCodeExporter commented 9 years ago
Please Fix This Issue Soon I Am not able to start up the application

Original comment by saurabhv...@gmail.com on 13 Feb 2013 at 6:17

GoogleCodeExporter commented 9 years ago
I facing the same problem my project was working yesterday but from morning 
showing 
Unable to load configuration ... some jar files

I tried some solution to overcome like ,

<!DOCTYPE struts SYSTEM "../dtdsstruts-2.0.dtd">

or

<!DOCTYPE struts SYSTEM "struts-2.0.dtd">

or

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

but none of above work for me

any reply will be very helpful...

Original comment by patil.tu...@gmail.com on 13 Feb 2013 at 12:46

GoogleCodeExporter commented 9 years ago
I am facing same issue ?

Original comment by santoshk...@gmail.com on 13 Feb 2013 at 2:35

GoogleCodeExporter commented 9 years ago
Solved issue by creating new project and copy pasted all content

This has been resolved and was due to a change in Apache project publishing 
mechanisms.

For details :

https://issues.apache.org/jira/browse/WW-3979

Original comment by patil.tu...@gmail.com on 13 Feb 2013 at 2:36

GoogleCodeExporter commented 9 years ago
by using updated struts2-core.jar my problem solved

Original comment by patil.tu...@gmail.com on 14 Feb 2013 at 7:02