facebook

EJBs on Jboss [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #197031 Reply

    alanda
    Member

    Hi, I’m evaluating myeclipse and I think it may be a big help to enhance JBoss developers productivity.

    I deployed a stateless EJB following the directives on j2ee.pdf but when I try to access it from the client I get this message:

    log4j:WARN No appenders could be found for logger (org.jnp.interfaces.NamingContext).
    log4j:WARN Please initialize the log4j system properly.
    javax.naming.CommunicationException: Receive timed out. Root exception is java.net.SocketTimeoutException: Receive timed out
    at java.net.PlainDatagramSocketImpl.receive(Native Method)
    at java.net.DatagramSocket.receive(DatagramSocket.java:670)
    at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1038)
    at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1127)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at HelloClient.main(HelloClient.java:24)

    Here’s the code of the client:
    ///////////////////////////////////////////////////////
    import java.util.Properties;
    import javax.naming.InitialContext;

    public class HelloClient
    {
    public static void main(String[] args)
    {
    Properties props = new Properties();

    props.put(“java.naming.factory.initial”, “org.jnp.interfaces.NamingContextFactory”);
    props.put(“java.naming.factory.url.pkgs”, “org.jboss.naming:org.jnp.interfaces”);
    props.put(“java.naming.provider.url”, “jnp://localhost:1099”);

    try
    {
    InitialContext ctx = new InitialContext(props);
    HelloServerHome theHelloHome = (HelloServerHome) ctx.lookup(“ejb/HelloServer”);

    HelloServer theHelloServer = (HelloServer) theHelloHome.create();
    System.out.println(theHelloServer.sayHello());
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }
    }
    /////////////////////////////////////

    Any help is welcome!

    #197034 Reply

    do you run the cllient on the same machine as jboss?

    #197035 Reply

    alanda
    Member

    yes

    #197039 Reply

    What version of JBoss are you running. I have 3.2.2RC1 and want to try to simulate your problem, but when running xdoclet I get the following exception:

    [ejbdoclet] BUILD FAILED: file:/home/rku/workspace/j2eetestEJB/xdoclet-build.xml:25: is not a legal value for this attribute.

    #197041 Reply

    Scott Anderson
    Participant

    [ejbdoclet] BUILD FAILED: file:/home/rku/workspace/j2eetestEJB/xdoclet-build.xml:25: is not a legal value for this attribute.

    This error is caused by changing one of the configuration values in the ejbdoclet to a value that isn’t supported. Probably specifying a string where a number is expected or something along those lines.

    The XDoclet reference guide is included in the MyEclipse User Guide and it has a full writeup on what is expected for each attribute.

    –Scott
    MyEclipse Support

    #197042 Reply

    Scott Anderson
    Participant

    I deployed a stateless EJB following the directives on j2ee.pdf

    I assume you mean the Bert Torfs authored tutorial? One thing I notice is that he didn’t specify that the protocol in the url he specified. Rather than jnp://localhost:1099 he just used localhost:1099. Either should be fine, but it won’t hurt to try.

    From the timeout exception it looks like JBoss isn’t running because nothing appears to be at port 1099. If you’re positive that JBoss is running (can see it in the Debug View) when you launch your client, check the jboss-service.xml file and be sure that the mbean called org.jboss.naming.NamingService is running on port 1099. Remember that JBoss must spin up completely before you can run your client.

    I’m sure our users will try to help, but you might also try searching the JBoss forums at jboss.org since this issue is really a pure JBoss question.

    –Scott
    MyEclipse Support

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: EJBs on Jboss [Closed]

You must be logged in to post in the forum log in