JBoss Community

Re: Where can i find the javaee.jar?

created by hsch hsch in Beginner's Corner - View the full discussion

Thank you for your answer.

 

i still have the problem, that i cannot find the right jar. there are so many jars and i cannot find any xxx-client-xxx.jar.

 

My Client looks like that:

 

 

public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        TestClient client = new TestClient();
        try {
            client.runTest();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
 
    }
    
    
    public  void runTest() throws Exception{
        
        Properties props = new Properties();    
        
        
        props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
        props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
//        props.setProperty("java.naming.provider.url", "127.0.0.1:1099");
        props.setProperty("java.naming.provider.url", "localhost:1099");
        
        InitialContext ctx = new InitialContext(props);
        SimpleBean bean = (SimpleBean) ctx.lookup("ejb/SimpleBeanJNDI");
        String result = bean.sayHello("blabla");
        System.out.println(result);
        
    }

 

I think, this piece of code is correct and i missing only the right jar-file in my build path. Can you say me what is name of the jar in JBoss AS 7? There are many jars in modules, but i do not know which to take. I tried a lot, but i get an error at every try.

 

My EJB, which i deployed in JBoss, shows no error. Only the Client.

 

Please help me.

 

Best regards

hsch

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community