Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Deploying EJB in JBOSS Server, Got Error (Could not create deployment file, Connection refused)  RSS feed

 
harbeer kadian
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am writing a Stateless Session bean.
I created a JAR file having following contents.

ejb.ejbHello.Hello.class
ejb.ejbHello.HelloHome.class
ejb.ejbHello.HelloBean.class
META-INF.ejb-jar.xml
META-INF.jboss.xml

Content of xml files are as follows

ejb-jar.xml


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

<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>Hello</ejb-name>
<home>ejb.ejbHello.HelloHome</home>
<remote>ejb.ejbHello.Hello</remote>
<ejb-class>ejb.ejbHello.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>




jboss.xml

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN"
"http://www.jboss.org/j2ee/dtd/jboss.dtd">
<jboss>
<enterprise-beans>
<session>
<ejb-name>Hello</ejb-name>
<jndi-name>HelloHome</jndi-name>
</session>
</enterprise-beans>
</jboss>


I kept the above mentioned jar in following location
C:\jboss-3.2.8.SP1\server\default\deploy

After this i started the JBoss Server.
The JBoss Server is not able to deploy the above mentioned jar and is displaying following error in JBoss console




12:37:08,828 INFO [JmsXA] Bound connection factory for resource adapter for Con
nectionManager 'jboss.jca:service=TxCM,name=JmsXA to JNDI name 'java:/JmsXA'
12:37:10,171 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
2.8.SP1/server/default/deploy/HelloWorld.jar
org.jboss.deployment.DeploymentException: Connection refused: connect; - nested
throwable: (java.net.ConnectException: Connection refused: connect)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:331)
at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:262)
at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.jav
a:234)
at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:152)
at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:476)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:795)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:652)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:184)
at $Proxy7.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
tScanner.java:316)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
canner.java:490)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
doScan(AbstractDeploymentScanner.java:213)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
bstractDeploymentScanner.java:286)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
ler.java:968)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:404)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:184)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:263)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:841)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:653)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:600)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.
java:74)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:76)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:68)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:96)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:213)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:484)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:184)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:462)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:353)
at org.jboss.Main.boot(Main.java:201)
at org.jboss.Main$1.run(Main.java:459)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.ConnectException: Connection refused: connect
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.Socket.connect(Socket.java:516)
at java.net.Socket.connect(Socket.java:466)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
at sun.net.www.http.HttpClient.New(HttpClient.java:287)
at sun.net.www.http.HttpClient.New(HttpClient.java:299)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
onnection.java:796)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:748)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:673)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:917)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
urce)
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 Sourc
e)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known 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:308)
... 69 more



Please help me if any one knows about this problem


With Regards
Harbeer Kadian


 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!