users@glassfish.java.net

GF 3.1.1 --- srping beans dtd resolving

From: Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
Date: Thu, 27 Oct 2011 20:15:59 +0200

Hi experts, sorry for the subject, but I'm not sure phrase it better.

I've got a Web-App provided by some manufacturer which seems to use
Spring beans.

Within WEB-INF they have a file 'beans.xml' with the following

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
   "http://www.springframework.org/dtd/spring-beans.dtd">

Deploying to target works fine, but when creating an application
reference for an instance the parser trys to parse 'beans.xml'.

Unfortunately the parser tries to fetch the dtd (verified using
netstat), but as the server does not have internet access it does not
succeed.

'create-application-ref' fails after 'tcp-connect timeout'

How can I workaround this?

I've tried placing 'spring-beans.dtd' in WEB-INF as well ... without
success.

Can I customize GF's dtd catalog somehow?

TIA,
Bernhard

Stacktrace from server.log:


org.jboss.weld.exceptions.IllegalStateException: WELD-001201 Error
loading beans.xml
file:/var/opt/sun/glassfish3/nodes/gf-node1/gf-inst1/applications/WebClient/WEB-INF/beans.xml
         at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:106)
         at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:138)
         at
org.jboss.weld.bootstrap.WeldBootstrap.parse(WeldBootstrap.java:519)
         at
org.glassfish.weld.BeanDeploymentArchiveImpl.getBeansXml(BeanDeploymentArchiveImpl.java:249)
         at
org.jboss.weld.bootstrap.BeanDeployment.<init>(BeanDeployment.java:104)
         at
org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:185)
         at
org.jboss.weld.bootstrap.WeldBootstrap$DeploymentVisitor.visit(WeldBootstrap.java:156)
         at
org.jboss.weld.bootstrap.WeldBootstrap.startContainer(WeldBootstrap.java:293)
         at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
         at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
         at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:270)
         at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at
org.glassfish.deployment.admin.InstanceDeployCommand.execute(InstanceDeployCommand.java:186)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
         at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
         at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
         at
com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
         at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
         at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
         at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
         at
com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
         at
com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
         at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
         at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
Caused by: java.net.ConnectException: Connection timed out
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
         at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
         at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
         at java.net.Socket.connect(Socket.java:579)
         at java.net.Socket.connect(Socket.java:528)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
         at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
         at sun.net.www.http.HttpClient.New(HttpClient.java:300)
         at sun.net.www.http.HttpClient.New(HttpClient.java:316)
         at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
         at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
         at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
         at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1296)
         at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:653)
         at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1291)
         at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1258)
         at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:260)
         at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1151)
         at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1047)
         at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:960)
         at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
         at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
         at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
         at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
         at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
         at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
         at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
         at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
         at org.jboss.weld.xml.BeansXmlParser.parse(BeansXmlParser.java:100)
         ... 38 more