JBoss+remote client connection refused issues
by Allan Kamau
Hi,
Am running JBoss-4.2.0.GA and it appears I am unable
to establish a connection from a client running
remotely.
A quite port scan (between port 1000 and 10000) using
'localhost' or '127.0.0.1' indicates an open port
1099. But a similar scan using 192.168.0.2 (the
computer's ip) reports the port 1099 closed.
How can I enable JBoss to listen on all the server's
IPs?
When I run the client locally and connect using
'localhost:1099' or '172.0.0.1:1099' the connection
succeeds, but when I provide the computer's ip
'192.168.0.2:1099' I get the printStackTrace() output
below
<error>
[java] javax.naming.CommunicationException: Could
not obtain connection to any of these urls:
jnp://192.168.0.2:1099 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 192.168.0.2:1099 [Root exception is
javax.naming.ServiceUnavailableException: Failed to
connect to server 192.168.0.2:1099 [Root exception is
java.net.ConnectException: Connection refused]]]
[java] at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
[java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
[java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
[java] at
javax.naming.InitialContext.lookup(InitialContext.java:351)
</error>
Below is my client code
public static Context getInitialContext()
throws javax.naming.NamingException
{
InitialContext ctx=null;
try{
ctx = new InitialContext();
ctx.addToEnvironment("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
ctx.addToEnvironment("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
ctx.addToEnvironment(Context.PROVIDER_URL,
"jnp://192.168.0.2:1099");
/*
SimpleSession simpleSession =
(SimpleSession)ctx.lookup(SimpleSession.class.getName());
System.out.println(simpleSession.sayHello("EJB3"));
*/
}catch (NamingException e){
e.printStackTrace();
}
return ctx;
//return new javax.naming.InitialContext();
}
Allan.
____________________________________________________________________________________
The fish are biting.
Get more visitors on your site using Yahoo! Search
Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
____________________________________________________________________________________Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
18 years, 11 months
[Beginners Corner] - NoClassDefFoundError in webconsole
by ulliobst
Hi,
I downloaded JBoss 5.0 beta 2 and started it without any change. Everything seems to ork fine except the webconsole. When I start the webconsole the left panel remains empty and I get an error:
java.lang.NoClassDefFoundError: org/jboss/logging/Logger
at org.jboss.console.remote.Util.(Util.java:33)
at org.jboss.console.remote.AppletRemoteMBeanInvoker.invoke(AppletRemoteMBeanInvoker.java:64)
at org.jboss.console.navtree.ConsoleTreeModel.loadTree(ConsoleTreeModel.java:118)
at org.jboss.console.navtree.ConsoleTreeModel.(ConsoleTreeModel.java:73)
at org.jboss.console.navtree.AdminTreeBrowser.(AdminTreeBrowser.java:77)
at org.jboss.console.navtree.AppletBrowser.start(AppletBrowser.java:65)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
What's wrong?
best regards
ulli
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048649#4048649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048649
18 years, 11 months
[JBoss Seam] - EntityHome.persist transaction problem?
by Phantom
Good day,
I have the problem with EntityHome.persist in simplest .xhtml page.
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE html
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:t="http://myfaces.apache.org/tomahawk" xml:lang="en" lang="en">
| <head>
| <title></title>
| <ui:debug hotkey="q"/>
| </head>
| <body>
| <h:form>
| <h:inputText title="Title" value="#{messageHome.instance.title}"/><br/>
| <h:inputText title="Content" value="#{messageHome.instance.content}"/><br/>
| <h:commandButton action="#{messageHome.persist}" />
| <h:dataTable var="mes" value="#{allmessages.resultList}">
| <h:column>
| <table>
| <tr>
| <td><h:outputText value="#{mes.title}"/></td>
| <td><h:outputText value="#{mes.content}"/></td>
| </tr>
| </table>
| </h:column>
| </h:dataTable>
| </h:form>
| </body>
| </html>
|
I use two components which defined in components.xml:
| <framework:entity-home name="messageHome" entity-class="org.interlogy.ejb.test.Message"/>
|
| <framework:entity-query name="allmessages" ejbql="select object(m) from Message m"/>
|
Page is a simple guest book. User fill 2 fields and send to the server. Then data pulled to the message entity and persisted to the DB.
But(!) I can see new data not after sending the form but after the second send of the form. I mean:
1) Title=1. Sending. The list of messages is empty.
2) Title=2. Sending. The list of messages has only one message with title =1.
3) Title=3. Sending. The list of messages has only 2 messages with title=1 and 2
It may be soo in 2 ways:
1) Firstly query executed and then data persisted.
2) We have some transaction problem. Query do not see already persisted data.
Please, Help Me!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4048647#4048647
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4048647
18 years, 11 months