[JBoss Remoting] - Jboss 4.2.3.GA Configuration for client to call ejb
by David Chokhonelidze
David Chokhonelidze [http://community.jboss.org/people/dato.java] created the discussion
"Jboss 4.2.3.GA Configuration for client to call ejb"
To view the discussion, visit: http://community.jboss.org/message/569919#569919
--------------------------------------------------------------
Hello,
I am using following environment in my project:
* JBoss AS 4.2.3.GA
* JBoss ejb 2.x (but on 3 is the same problem i have)
* Swing for client
Server and client are running on different machines in local network. The main problem is that server needs specific configuration to connect from client to that machine and call ejbs remotelly. I have some workarounds that works:
1. In run.bat file i added following string:*set JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=IP Where jboss runs -Djava.rmi.server.useLocalHostname=false*
2. In jboss-service.xml i configured this : *<!––<attribute name="clientConnectAddress">IP Where jboss runs</attribute>––>*
*
*
After this configuration everything works. I also start jboss with parameter -b 0.0.0.0,but this does not help. From Swing client *without configuration* when i try to lookup ejb with this properties :
InitialContext jndi=fina2.Main.getJndiContext();
Object ref = jndi.lookup("fina2/i18n/LanguageSession");
*Properties p=new Properties();*
*
*
* * *p.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");*
** *p.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");*
** *p.setProperty(Context.PROVIDER_URL, "jnp://***IP Where jboss runs***:1099");*
*
*
* InitialContext jndi=new InitialContext(props);
*
**
**
** *Object ref = jndi.lookup("....");*
*
*
The following exception is thrown:
javax.naming.CommunicationException: Could not obtain connection to any of these urls: *IP Where jboss runs* and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server *IP Where jboss runs*:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server *IP Where jboss runs*:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at fina2.login.LoginFrame.loadLanguageList(LoginFrame.java:127)
at fina2.login.LoginFrame.languagesPopupMenuWillBecomeVisible(LoginFrame.java:426)
at fina2.login.LoginFrame$5.popupMenuWillBecomeVisible(LoginFrame.java:233)
at javax.swing.JComboBox.firePopupMenuWillBecomeVisible(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup.firePopupMenuWillBecomeVisible(Unknown Source)
at javax.swing.JPopupMenu.setVisible(Unknown Source)
at javax.swing.JPopupMenu.show(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup.show(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup.togglePopup(Unknown Source)
at javax.swing.plaf.basic.BasicComboPopup$Handler.mousePressed(Unknown Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: javax.naming.CommunicationException: Failed to connect to server *IP Where jboss runs*:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server *IP Where jboss runs*:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 34 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server *IP Where jboss runs*:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 35 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 35 more
*It worked fine on Jboss 4.0.5 without configuration.*
*
*
Can anyone tell me some kind of workaround so that to not to configure ip address ? ,because its not good that for every machine i manually change ips.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569919#569919]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[JBoss Web Services] - IOException: Could not transmit message
by aneesh nair
arnie2k [http://community.jboss.org/people/arnie2k] created the discussion
"IOException: Could not transmit message"
To view the discussion, visit: http://community.jboss.org/message/576002#576002
--------------------------------------------------------------
Hi,
Being new to the forum, not sure whether i am posting my question in the right place. If not, please do guide me accordingly.
I am having trouble accessing a service that is deployed locally.
The service was created using wsconsume (so I guess its JAX-WS). It was deployed and tested as a stand alone successfully.
When inegrated with spring, I get the above exception.
Attached *spring-servlet.xml* has a snippet of the context file.
A snippet of the wsdl is as shown below
<service name="PayoffQuoteInterfaceImplService">
<port binding="tns:PayoffQuoteInterfaceBinding" name="PayoffQuoteInterfacePort">
<soap:address location=" http://127.0.0.1:8080/lps_ws/PayoffQuote http://127.0.0.1:8080/lps_ws/PayoffQuote"/>
</port>
</service>
The exception stack trace can be retrieved from the attached *exception.txt* file
Though I do have made an entry in the pom.xml for XMLServiceException class, I see a no class def found execption.
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>1.0</version>
</dependency>
Initially, I also tried by creating the client stubs using wsimport. But with stubs generated or not, I ended up with the same exception.
Is this cos of some marshalling failure?
Also attaching the service interface class generated using wsimport.
The JBossAS version is *4.2.3.GA*
The JBossWS (native) version is *jbossws-native-3.1.1.GA*
Any help in resolving this would be greatly appreciated.
Thanks,
Aneesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/576002#576002]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months
[JBoss Remoting] - JBoss Remoting and JBoss AS 6
by Ian Mitchell
Ian Mitchell [http://community.jboss.org/people/imitchell] created the discussion
"JBoss Remoting and JBoss AS 6"
To view the discussion, visit: http://community.jboss.org/message/566107#566107
--------------------------------------------------------------
Hi folks,
I'd like to investigate the use of Remoting on JBoss for a large project with many different technologies.
We are currently using JBoss AS 6 but it looks like there is no Remoting available for JBoss AS 6.
I have found the following information JBoss Remoting site:
For Remoting 2:
2.5.3.SP1: Versions 2.5.x are targeted to JBoss Application Server 5.0/5.1 and EAP 5.0/5.1
2.2.3.SP2: Versions 2.2.x are targeted to JBoss Application Server 4.2 and EAP 4.2/4.3
For Remoting 3:
Remoting 3 is the next generation of Remoting.
It will support a variety of modules in JBoss Application Server 6.
But... I also find this:
3.1.0.Beta2 Beta - NOT for production systems
Does Remoting 2.5.x work with JBoss AS 6?
As anyone tried this before?
Any hints on making it work?
Thanks,
Ian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566107#566107]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 6 months