aspose file tools*
The moose likes JBoss/WildFly and the fly likes Running JBoss localy from Eclipse - can't establish connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Running JBoss localy from Eclipse - can Watch "Running JBoss localy from Eclipse - can New topic
Author

Running JBoss localy from Eclipse - can't establish connection

Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
I keep getting the following error message saying that no connection could be established:
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://localhost:5400/?serializationtype=jboss]

The server is running - and the code seems to have been deployed successfully (since I can find it in the servers deploy folder).

Servercode:


Client code:


Many thanks in advanced.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

5400 is not one of the ports which JBoss AS uses by default. Looking at that URL, it appears that you are trying to get access to the JBossRemoting InvokerLocator. Have you deployed that JBossRemoting Connector which binds to port 5400, on the server?

[My Blog] [JavaRanch Journal]
Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
So far I have simply put the code into Eclipse linked it to an JBoss AS Server and hit deploy.

No - I proably havn't done that since I am don't know how to do that. Can you help me out with that? As I said I am a total newbie to setting up Jboss AS Servers and all the configurations are still dark magic to me.

Thank you in advanced
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Stephan Knitelius wrote:So far I have simply put the code into Eclipse linked it to an JBoss AS Server and hit deploy.



Where did you get that example from? And any specific reason why you are trying out that example?
Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
Jaikiran Pai wrote:
Stephan Knitelius wrote:So far I have simply put the code into Eclipse linked it to an JBoss AS Server and hit deploy.



Where did you get that example from? And any specific reason why you are trying out that example?


It comes with Jboss Remoting - http://www.jboss.org/jbossremoting/downloads.html (version 2.5.2)

I thought it would be a good approch to getting started with jboss as server to make calls via JBoss Remoting - or do you have a better suggestion?

I really just want to be able to preform Remote Method calls - with a good framework.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

There are many ways to do remote calls to a server. JBoss Remoting is certainly one of doing it. Then there is EJB (which is a portable and standard for remote calls). JBoss Remoting comes with a chapter about the tutorials, it's here. The one you are trying, I guess is this one. You'll have to follow the instructions there to build it and run it.


Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
Thank you for your help - comes down to RTFM. Thanks for pointing me the right direction.
Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
hi,
I tried to work my way through the guide, and I have managed to get the above code working but only as standalone. What do I have to do to get it to run in the jboss as server?

I know I have to configure some xml files but I am really not sure where to place them or what exactly I have to write in them to get this to work.

Thanks in advanced.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10210
    
166

Stephan King wrote:

I know I have to configure some xml files but I am really not sure where to place them or what exactly I have to write in them to get this to work.



What do your current xml files look like? Do they contain any mbean elements? If yes, then you can place them in JBOSS_HOME/server/< servername>/deploy folder and name them *-service.xml (i.e. their name should end with -service.xml).
Stephan King
Greenhorn

Joined: Apr 11, 2010
Posts: 13
Currently I do not have any xml - I assume you mean an *-server.xml similar to this one:


My current Server class looks like this what would the -server.xml have to look like?


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running JBoss localy from Eclipse - can't establish connection