users@glassfish.java.net

How to disable fetch of remote DTD's during deployment

From: <forums_at_java.net>
Date: Tue, 29 Mar 2011 03:35:26 -0500 (CDT)

 Hi,

We have a setup with GlassFish 3.0.1 running on Linux with JDK 1.6. When we
deploy we just drop an EAR file in the autodeploy folder. The EAR file
contains both WAR modules and EJB-JAR modules.

The deployment descriptors sun-web.xml and sun-ejb-jar.xml contains the
following DOCTYPE declarations and I have verified that these are identical
to the ones defined in the corresponding locally available dtd files in
$GLASSFISH_HOME/lib/dtds.

<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish
Application Server 3.0 EJB 3.1//EN"
"http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd"> <!DOCTYPE
sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application
Server 3.0 Servlet 3.0//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
We are experiencing that deployment or the nightly restart fails because the
deployment procedure tries to fetch the resource. For example, the following.
We have also seen it with EJB's which are deployed earlier in the deployment
procedure. For this particular deployment the EJB's deployed fine.

[#|2011-03-29T03:36:02.149+0200|SEVERE|glassfish3.0.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=23;_ThreadName=Thread-1;|Exception
while deploying the app java.io.IOException: Unable to locate the DTD to
validate your deployment descriptor file [META-INF/sun-ejb-jar.xml] in
archive [myapp-1.0-SNAPSHOT-myjar]. Please make sure the DOCTYPE is correct
(no typo in public ID or system ID) and you have proper access to the
Internet. at
com.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:335)
at
com.sun.enterprise.deployment.archivist.Archivist.readRuntimeDeploymentDescriptor(Archivist.java:662)
at
com.sun.enterprise.deployment.archivist.ApplicationArchivist.readRuntimeDeploymentDescriptor(ApplicationArchivist.java:703)
at
com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:249)
at
com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
at
org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:152)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:79)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at
org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at
org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at
org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at
org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at
org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at
org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512) at
java.util.TimerThread.run(Timer.java:462) Caused by:
java.net.ConnectException: Opkoblingen overskred tidsgr346nsen at
java.net.PlainSocketImpl.socketConnect(Native Method) at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at
java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at
java.net.Socket.connect(Socket.java:529) at
java.net.Socket.connect(Socket.java:478) at
sun.net.NetworkClient.doConnect(NetworkClient.java:163) at
sun.net.www.http.HttpClient.openServer(HttpClient.java:394) at
sun.net.www.http.HttpClient.openServer(HttpClient.java:529) at
sun.net.www.http.HttpClient.<init>(HttpClient.java:233) at
sun.net.www.http.HttpClient.New(HttpClient.java:306) at
sun.net.www.http.HttpClient.New(HttpClient.java:323) at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at
sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:1989)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
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:1194)
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:511)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
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:119)
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.sun.enterprise.deployment.io.DeploymentDescriptorFile.read(DeploymentDescriptorFile.java:298)
... 24 more |#]
On my installation I have told GlassFish not to fail on parsing errors (at
least that was what I thought I had done) with setting

configs.config.server-config.admin-service.das-config.deploy-xml-validation=parsing
However, it still fails while trying to connect. I assume it tries to fetch
the resource from the Internet instead of using the local one.

Any input to how I am able to disable Internet access let GlassFish use the
locally available DTD's is appreciated. Thank you.

 

 


--
[Message sent by forum member 'mphaua']
View Post: http://forums.java.net/node/786172