0 Replies Latest reply on May 6, 2004 9:22 AM by Yohan Fernando

    DeploymentException connection refused for external DTD refe

    Yohan Fernando Newbie

      I'm trying to deploy an .ear file which contains web and EJB components. I'm running JBoss3.2.4RC1 and JBoss 3.2.3. My app server sits behind a firewall and therefore does not have a direct route to the internet.

      My application fails to deploy with the following error

      org.jboss.deployment.DeploymentException: Connection refused; - nested throwable: (java.net.ConnectException: Connection refused)
       at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:316)
       at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
       at org.jboss.ejb.EJBDeployer.init(EJBDeployer.java:392)
       at org.jboss.deployment.MainDeployer.init(MainDeployer.java:697)
       at org.jboss.deployment.MainDeployer.init(MainDeployer.java:717)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:633)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:606)
       at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
       at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:825)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:360)
       at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
       at $Proxy4.start(Unknown Source)
       at org.jboss.deployment.SARDeployer.start(SARDeployer.java:250)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:833)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:643)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:606)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:590)
       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:324)
       at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:70)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174)
       at $Proxy5.deploy(Unknown Source)
       at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:404)
       at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
       at org.jboss.Main.boot(Main.java:144)
       at org.jboss.Main$1.run(Main.java:389)
       at java.lang.Thread.run(Thread.java:534)
      Caused by: java.net.ConnectException: Connection refused
       at java.net.PlainSocketImpl.socketConnect(Native Method)
       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
       at java.net.Socket.connect(Socket.java:452)
       at java.net.Socket.connect(Socket.java:402)
       at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
       at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
       at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
       at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
       at sun.net.www.http.HttpClient.New(HttpClient.java:339)
       at sun.net.www.http.HttpClient.New(HttpClient.java:320)
       at sun.net.www.http.HttpClient.New(HttpClient.java:315)
       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)
       at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)
       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:617)
       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.DOMParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
       at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:293)
       ... 63 more
      


      This is because (i believe) I have my ejb-jar.xml (and application .xml in fact) have a DTD similar to the one below....

      <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd\
      /ejb-jar_2_0.dtd'>
      


      This references java.sun.com . To I really have to make my app server have a connection to the internet for me to use JBoss? It seems to me that I would at least need to have a web server hosting the DTDs within my internal network or else I would not be able to deploy my application. I have looked on the forums and on google but could not find anyone who has had the same problem.

      Can anyone help?