Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Naming Exception in the WAS test environment of RAD 7.0

1 view
Skip to first unread message

Amit

unread,
Jan 10, 2007, 8:12:28 AM1/10/07
to
I have a local EJB and deployed in the WAS test environment of RAD 7.0.
I have created an application client project to test the EJB.

public class Main {
public static void main(String[] args) throws CreateException ,
NamingException, RemoteException, RemoveException {
// TODO Auto-generated method stub

Properties p = System.getProperties();
Context jndiContext = new InitialContext(p);

Object ref =
jndiContext.lookup("local:ejb/ejb/sample/PrivilageFacadeHome");
PrivilageFacadeRemote home = (PrivilageFacadeRemote)

PortableRemoteObject.narrow(ref,PrivilageFacadeRemote.class);

Privilage privilage = null;
privilage.setName("RAD ....");
privilage.setDescription("Come on ...");
home.createPrivilage(privilage);
home.remove();

}

/* (non-Java-doc)
* @see java.lang.Object#Object()
*/
public Main() {
super();
}

}

And then I have created a run configuration as a "websphere application
client" and I have run the above code ... and I got the following error
:

WSCL0100E: Exception received:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.
.
.
.
Caused by: javax.naming.ConfigurationException: Could not invoke method
getObjectInstance on object of type
com.ibm.ws.naming.urlns.genericURLContextFactory. [Root exception is
java.lang.reflect.InvocationTargetException]

at
com.ibm.websphere.naming.genericURLInitialContextFactory.getAndInvokeMethod(genericURLInitialContextFactory.java:396)
at
com.ibm.websphere.naming.genericURLContextFactory.getObjectInstance(genericURLContextFactory.java:156)
at
javax.naming.spi.NamingManager.getURLObject(NamingManager.java:592)
at
javax.naming.spi.NamingManager.getURLContext(NamingManager.java:541)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:289)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at Main.main(Main.java:23)
... 13 more

Thank you ....

0 new messages