Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

NamingException

Avatar

Former Community Member
Hi All,

I am installed LiveCycleAssembler.I am trying to invoke Assembler programatically using EJB api.When I run the below sample code which is mentioned in the documentation I am getting javax.naming.NamingException.I am using Windows 2003 server and JBoss is the my Application Server.

Here I am writng the code below.



class Customs

{

public static void main(String[] args)

{

Assembler7 asm = null;

Hashtable propsJNDI = new Hashtable();

propsJNDI.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");

propsJNDI.put("java.naming.provider.url","jnp://localhost:1099");

propsJNDI.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");



try

{

Assembler7Home home = Assembler7Util.getHome(propsJNDI);

asm = home.create();



}

catch (javax.naming.NamingException e)

{

System.out.println("Assembler 7 NamingException -- " + e.getMessage());

}

catch (java.rmi.RemoteException e)

{

System.out.println("Assembler 7 RemoteException -- " + e.getMessage());

}

catch (javax.ejb.CreateException e)

{

System.out.println("Assembler 7 CreateException -- " + e.getMessage());

}

catch (Exception e)

{

System.out.println("General Exception -- " + e.getMessage());

}

}

}



When I am running this sample I am getting the following error:



Assembler 7 NamingException -- null



what may be the reason for this and how to resolve this???



Thanks in advance.
6 Replies

Avatar

Former Community Member
Try e.printStackTrace() and posting that result here. There isn't enough info here to guess what is wrong.

Don

Avatar

Former Community Member
Hi,



did you managed to overcome the error?

i got the same error using win 2003 server with websphere.



thanks for your help.



Hagai

Avatar

Former Community Member
Have you started the webclient?

If you installed it as a service, did the service start correctly?



I had the same error and I realized that I had forgotten to start the webclient.



Ashwini

Avatar

Former Community Member
Hi Ashwini, what is the jnp path your client is accessing?



I've tried 1099, 8080, 8093 on my JBoss deployment, but get this same NULL error.



thanks!

Avatar

Former Community Member
mrx3, if you add e.printstacktrace() under the naming exception, it would give you a more specific reason why it's null.