0 Replies Latest reply on Apr 6, 2004 9:23 AM by Juarez Barbosa Jr

    Problems using InputStream in JBoss

    Juarez Barbosa Jr Newbie

      Hello there,
      I am trying to read the struts-config.xml file, located in the WEB-INF folder. I am using JBoss 3.2.1-tomcat-4.1.24.

      I used the method ServletContext.getResourceAsStream("/WEB-INF/struts-config.xml");
      This is ok but when I try to do something with the returned InputStream the exception below occurs. May someone help ?

      java.net.ConnectException: Connection refused: connect
      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.(HttpClient.java:306)
      at sun.net.www.http.HttpClient.(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:510)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:487)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:615)
      at java.net.URL.openStream(URL.java:913)
      at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:740)
      at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:700)
      at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:258)
      at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScann
      at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.jav
      at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.jav
      at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1148)
      at org.apache.commons.digester.Digester.parse(Digester.java:1562)
      at com.unisys.framework.monitor.struts.UGOStrutsConfigDigester.parse(UGOStrutsConfigDigester.j
      at com.unisys.framework.monitor.struts.UGOStrutsConfigDigester.(UGOStrutsConfigDigester.
      at com.unisys.framework.presentation.listener.UGOHibernateServletContextListener.ugoAfterConte
      own Source)
      at com.unisys.framework.presentation.listener.UGOHibernateServletContextListener.contextInitia
      ce)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3269)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3598)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.ja
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      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(AbstractDeploym
      0)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScann
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:534)