Problem with initial.lookup

Hello,

I was wondering if someone could help me.

I have developed a GUI using AWT and Swing that allows the user to enter their name and address.

If the user clicks the submit button, the method in the EJB is invoked to print the name and address on the screen.

The program works ok but I am wondering why everytime I launch the application and click on the submit button of my GUI after entering the name and address, that the user/password login window appears and giving me the message below.

The user/password login window appears when the source code reaches the line :

Object objref = initial.lookup("java:comp/env/ejb/SimpleCreateAccount");

I would be most grateful for any advice.

Thanks in advance.

Tony

============= ERROR MESSAGE ==============

java.lang.NullPointerException

at com.sun.enterprise.iiop.security.GSSUPToken.<init>(GSSUPToken.java:83)

at com.sun.enterprise.iiop.security.SecClientRequestInterceptor.createAuthToken(SecClientReq

uestInterceptor.java:129)

at com.sun.enterprise.iiop.security.SecClientRequestInterceptor.send_request(SecClientReques

tInterceptor.java:255)

at com.sun.corba.ee.internal.Interceptors.InterceptorInvoker.invokeClientInterceptorStarting

Point(InterceptorInvoker.java:168)

at com.sun.corba.ee.internal.Interceptors.PIORB.invokeClientPIStartingPoint(PIORB.java:482)

at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:624)

at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:554)

at com.sun.corba.ee.internal.corba.ClientDelegate.is_a(ClientDelegate.java:806)

at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:114)

at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:52)

at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:370)

at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:417)

at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:395)

at javax.naming.InitialContext.lookup(InitialContext.java:350)

at com.sun.enterprise.naming.factory.IIOPObjectFactory.getObjectInstance(IIOPObjectFactory.j

ava:42)

at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:137)

at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:58)

at javax.naming.InitialContext.lookup(InitialContext.java:350)

at APIGUI.actionPerformed(APIGUI.java:178)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)

at java.awt.Component.processMouseEvent(Component.java:3715)

at java.awt.Component.processEvent(Component.java:3544)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

ERROR:Exception while constructing an authentication token

Caught an unexpected exception!

javax.naming.CommunicationException: java.lang.SecurityException: Error while constructing an authen

tication token.

at com.sun.enterprise.iiop.security.SecClientRequestInterceptor.send_request(SecClientReques

tInterceptor.java:259)

at com.sun.corba.ee.internal.Interceptors.InterceptorInvoker.invokeClientInterceptorStarting

Point(InterceptorInvoker.java:168)

at com.sun.corba.ee.internal.Interceptors.PIORB.invokeClientPIStartingPoint(PIORB.java:482)

at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:624)

at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:554)

at com.sun.corba.ee.internal.corba.ClientDelegate.is_a(ClientDelegate.java:806)

at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:114)

at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:52)

at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:370)

at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:417)

at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:395)

at javax.naming.InitialContext.lookup(InitialContext.java:350)

at com.sun.enterprise.naming.factory.IIOPObjectFactory.getObjectInstance(IIOPObjectFactory.j

ava:42)

at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)

at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:137)

at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:58)

at javax.naming.InitialContext.lookup(InitialContext.java:350)

at APIGUI.actionPerformed(APIGUI.java:178)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)

at java.awt.Component.processMouseEvent(Component.java:3715)

at java.awt.Component.processEvent(Component.java:3544)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:151)

at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:58)

at javax.naming.InitialContext.lookup(InitialContext.java:350)

at APIGUI.actionPerformed(APIGUI.java:178)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)

at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)

at java.awt.Component.processMouseEvent(Component.java:3715)

at java.awt.Component.processEvent(Component.java:3544)

at java.awt.Container.processEvent(Container.java:1164)

at java.awt.Component.dispatchEventImpl(Component.java:2593)

at java.awt.Container.dispatchEventImpl(Container.java:1213)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)

at java.awt.Container.dispatchEventImpl(Container.java:1200)

at java.awt.Window.dispatchEventImpl(Window.java:914)

at java.awt.Component.dispatchEvent(Component.java:2497)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

[9621 byte] By [tho88] at [2007-9-26 3:36:26]
# 1

I managed to avoid the problem I mentioned in my previous email.

Normally, I would use the runclient command to allow the login GUI to appear and enter guest/guest123 to log into the application.

However, this time, I used the "-textauth" parameter in the runclient command to enter the userid/password via MS-DOS command line and it worked without any authentication complaints.

Cheers

Tony

tho88 at 2007-6-29 12:07:54 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...