Bugs item #474134, was opened at 2001-10-23 09:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=474134&group_id=22866

Category: JBossServer
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hussey (mhussey)
Assigned to: Nobody/Anonymous (nobody)
Summary: Security context lost w/ getEJBObject()

Initial Comment:
Windows 2000
JDK 1.3.1

Security context on thread is lost or ignored when 
calling javax.ejb.Handle's getEJBObject() method.  
This incorrectly results in a SecurityException.  This 
simple code works fine with Weblogic, and fails in 
JBoss (note how the thread has the authorization to 
create and use the bean):

        Context ctx = new InitialContext();
        Object objref = ctx.lookup
("AttachmentBuilder");
        Object obj = PortableRemoteObject.narrow
(objref, AttachmentBuilderBeanHome.class);
        AttachmentBuilderBeanHome home = 
(AttachmentBuilderBeanHome)obj;

        AttachmentHeaderDetail headerDetail=new 
AttachmentHeaderDetail("desc","type",true);
        AttachmentBuilderBean statefulBean = 
home.create(domain,headerDetail);

        Handle handle = statefulBean.getHandle();

        //the following should succeed, but it fails
        statefulBean = (AttachmentBuilderBean) 
handle.getEJBObject();

The client and server stack traces follow in that 
order:

java.rmi.ServerException: Could not get EJBObject; 
nested exception is:
        java.rmi.ServerException: RemoteException 
occurred in server thread; nested exception is:
        
javax.transaction.TransactionRolledbackException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null; nested exception is:
        java.rmi.RemoteException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null
java.rmi.ServerException: RemoteException occurred in 
server thread; nested exception is:
        
javax.transaction.TransactionRolledbackException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null; nested exception is:
        java.rmi.RemoteException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null
javax.transaction.TransactionRolledbackException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null; nested exception is:
        java.rmi.RemoteException: 
checkSecurityAssociation; nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null
java.rmi.RemoteException: checkSecurityAssociation; 
nested exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null
java.lang.SecurityException: Authentication exception, 
principal=null
        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFro
mServer(Unknown Source)
        at 
sun.rmi.transport.StreamRemoteCall.executeCall(Unknown 
Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown 
Source)
        at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_
Stub.invokeHome(Unknown Source)
        at 
org.jboss.ejb.plugins.jrmp.interfaces.StatefulHandleImp
l.getEJBObject(StatefulHandleImpl.java:124)
        at 
com.saba.unittest.bframework.locator.TestDelegate.testC
aseForJBossBug(TestDelegate.java:183)
        at 
com.saba.unittest.bframework.locator.TestDelegate.testD
elegateHandle(TestDelegate.java:89)
        at 
com.saba.unittest.bframework.locator.TestDelegate.runTe
stCases(TestDelegate.java:73)
        at 
com.saba.unittest.bframework.locator.TestDelegate.run
(TestDelegate.java:68)



[AttachmentBuilder] Authentication exception, 
principal=null
[AttachmentBuilder] TRANSACTION ROLLBACK 
EXCEPTION:checkSecurityAssociation; nes
ted exception is:
        java.lang.SecurityException: Authentication 
exception, principal=null; n
ested exception is:
        java.rmi.RemoteException: 
checkSecurityAssociation; nested exception is:

        java.lang.SecurityException: Authentication 
exception, principal=null
[AttachmentBuilder] java.rmi.RemoteException: 
checkSecurityAssociation; nested e
xception is:
[AttachmentBuilder]     java.lang.SecurityException: 
Authentication exception, p
rincipal=null
[AttachmentBuilder] java.lang.SecurityException: 
Authentication exception, princ
ipal=null
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecuri
tyAssociation(SecurityInterceptor.java:168)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(
SecurityInterceptor.java:92)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.StatefulSessionInstanceIntercep
tor.invokeHome
(StatefulSessionInstanceInterceptor.java:123)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxI
nterceptorCMT.java:135)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransac
tions(TxInterceptorCMT.java:307)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxI
nterceptorCMT.java:86)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogIn
terceptor.java:106)
[AttachmentBuilder]     at 
org.jboss.ejb.StatefulSessionContainer.invokeHome(Sta
tefulSessionContainer.java:326)
[AttachmentBuilder]     at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoke
r.invokeHome(JRMPContainerInvoker.java:370)
[AttachmentBuilder]     at 
java.lang.reflect.Method.invoke(Native Method)
[AttachmentBuilder]     at 
sun.rmi.server.UnicastServerRef.dispatch(Unknown Sour
ce)
[AttachmentBuilder]     at 
sun.rmi.transport.Transport$1.run(Unknown Source)
[AttachmentBuilder]     at 
java.security.AccessController.doPrivileged(Native Me
thod)
[AttachmentBuilder]     at 
sun.rmi.transport.Transport.serviceCall(Unknown Sourc
e)
[AttachmentBuilder]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(Unk
nown Source)
[AttachmentBuilder]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.
run(Unknown Source)
[AttachmentBuilder]     at java.lang.Thread.run
(Unknown Source)







----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=474134&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to