Minh Hoang TO created GTNPORTAL-2627:
----------------------------------------
Summary: Gadget import fails due to load of web-app_2_3.dtd
Key: GTNPORTAL-2627
URL:
https://issues.jboss.org/browse/GTNPORTAL-2627
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Minh Hoang TO
Platform cannot load IDE gadget due to error 502 on
http://java.sun.com/dtd/web-app_2_3.dtd.
Gadget registry service loads this file from Internel and if it is not available, it fails
silently due to badly created try-catch where Exception doesn't logged in any way, in
class {{GadgetRegistryServiceImpl$DeployTask.call}}:
{code:java}
public Boolean call() throws Exception
{
chromatticLifeCycle.openContext();
boolean done = true;
try
{
if (getRegistry().getGadget(importer.getGadgetName()) == null)
{
GadgetDefinition def = getRegistry().addGadget(importer.getGadgetName());
importer.doImport(def);
}
else
{
log.debug("Will not import existing gagdet " +
importer.getGadgetName());
}
}
catch (Exception e) <<<<< THIS Exception will not be reported, but
should be!
{
done = false;
}
finally
{
chromatticLifeCycle.closeContext(done);
}
return done;
}
}
{code}
Exception what happens:
{noformat}
java.io.IOException: Server returned HTTP response code: 502 for URL:
http://java.sun.com/dtd/web-app_2_3.dtd
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.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.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at
org.exoplatform.application.gadget.EncodingDetector.detect(EncodingDetector.java:43)
at
org.exoplatform.application.gadget.ServletLocalImporter.visit(ServletLocalImporter.java:119)
at
org.exoplatform.application.gadget.ServletLocalImporter.visitChildren(ServletLocalImporter.java:143)
at
org.exoplatform.application.gadget.ServletLocalImporter.visit(ServletLocalImporter.java:134)
at
org.exoplatform.application.gadget.ServletLocalImporter.visitChildren(ServletLocalImporter.java:143)
at
org.exoplatform.application.gadget.ServletLocalImporter.process(ServletLocalImporter.java:93)
at
org.exoplatform.application.gadget.GadgetImporter.doImport(GadgetImporter.java:97)
at
org.exoplatform.application.gadget.impl.GadgetRegistryServiceImpl$DeployTask.call(GadgetRegistryServiceImpl.java:350)
at
org.exoplatform.application.gadget.impl.GadgetRegistryServiceImpl.deploy(GadgetRegistryServiceImpl.java:139)
at
org.exoplatform.application.gadget.GadgetDeployer.handle(GadgetDeployer.java:159)
at
org.exoplatform.application.gadget.GadgetDeployer.access$000(GadgetDeployer.java:50)
at
org.exoplatform.application.gadget.GadgetDeployer$1.execute(GadgetDeployer.java:89)
at
org.exoplatform.container.RootContainer$PortalContainerPostInitTask.onAlreadyExists(RootContainer.java:796)
at org.exoplatform.container.RootContainer.addInitTask(RootContainer.java:649)
at
org.exoplatform.container.PortalContainer.addInitTask(PortalContainer.java:476)
at
org.exoplatform.application.gadget.GadgetDeployer.onEvent(GadgetDeployer.java:92)
at
org.gatein.wci.impl.DefaultServletContainer.safeFireEvent(DefaultServletContainer.java:200)
at
org.gatein.wci.impl.DefaultServletContainer.fireEvent(DefaultServletContainer.java:219)
at
org.gatein.wci.impl.DefaultServletContainer.access$400(DefaultServletContainer.java:60)
at
org.gatein.wci.impl.DefaultServletContainer$RegistrationImpl.registerWebApp(DefaultServletContainer.java:338)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.start(TC6ServletContainerContext.java:337)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.registerContext(TC6ServletContainerContext.java:302)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.registerHost(TC6ServletContainerContext.java:259)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.start(TC6ServletContainerContext.java:215)
at org.gatein.wci.tomcat.TC6ContainerServlet.start(TC6ContainerServlet.java:118)
at
org.gatein.wci.tomcat.TC6ContainerServlet.attemptStart(TC6ContainerServlet.java:95)
at org.gatein.wci.tomcat.TC6ContainerServlet.init(TC6ContainerServlet.java:80)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
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(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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
{noformat}
This DTD is for web.xml files and Gadget Registry it should not load these files, they
aren't related to gadget content.
Remove load of not related files and add clear logging (LOG.error()) for errors.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira