users@glassfish.java.net

Creating a login module with JAAS and Glassfish for a rich client

From: <glassfish_at_javadesktop.org>
Date: Wed, 25 Jun 2008 09:56:21 PDT

Hi,

I am a newcomer to the Glassfish application server and EJB. I am interested in writing a rich client application (with Swing) which is accesing the exported beans located in the application server.

I want it to be a secured enviroment and, for that reason, I want to authenticate the users in the client application inside the application server using the JAAS support and then check the permissions in the beans.

With that porpuse I am trying to develope a custom login module in a completelly simple client in order to authenticate the users in the way I want and then to transfer the user and the credentials in a transparent way to the application server.

I have followed the steps described in the

http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/tutorials/GeneralAcnOnly.html

tutorial.

The problem is that on launching the client I get the following error:

[i]A[i]DVERTENCIA: JTS5015: Unexpected error occurred when creating portable object adaptors
java.lang.NullPointerException
        at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:364)
        at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:225)
        at com.sun.enterprise.iiop.PEORBConfigurator.initTransactionService(PEORBConfigurator.java:207)
        at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:200)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:364)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
25-jun-2008 17:59:17 com.sun.enterprise.appclient.MainWithModuleSupport <init>
ADVERTENCIA: ACC003: Application threw an exception.
org.omg.CORBA.INITIALIZE: JTS Exception: org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 265 completed: No vmcid: SUN minor code: 1001 completed: Maybe
        at com.sun.enterprise.iiop.PEORBConfigurator.initTransactionService(PEORBConfigurator.java:223)
        at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:200)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:364)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Exception in thread "main" java.lang.RuntimeException: org.omg.CORBA.INITIALIZE: JTS Exception: org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 265 completed: No vmcid: SUN minor code: 1001 completed: Maybe
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:487)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
        at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: org.omg.CORBA.INITIALIZE: JTS Exception: org.omg.CORBA.INTERNAL: vmcid: 0x0 minor code: 265 completed: No vmcid: SUN minor code: 1001 completed: Maybe
        at com.sun.enterprise.iiop.PEORBConfigurator.initTransactionService(PEORBConfigurator.java:223)
        at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:200)
        at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:364)
        ... 2 more
Java Result: 1[/i]


It seems an inner error or CORBA and I am a bit lost because I don't know how to debug and find the cause of the problem.[/i]

So, my questions are:

*) Has anyone any clue about what is happening to me ?
*) Has anyone developed a login module using the JAAS api and Glassfish and has accesed the secured beans sucessfully ?

Many thanks in advance.
[Message sent by forum member 'jmoran' (jmoran)]

http://forums.java.net/jive/thread.jspa?messageID=282569