Bugs item #1020788, was opened at 2004-09-02 08:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1020788&group_id=22866
Category: JBossServer
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Ed Hillmann (ehillman)
Assigned to: Nobody/Anonymous (nobody)
Summary: ServerException calling gtEJBObject on javax.ejb.Handle
Initial Comment:
I'm using JBoss 3.2.5, and I have some Stateful Session
Beans which are returned to calling clients as a
javax.ejb.Handle instance. So, the server creates the
instance of the stateful instance of the Remote bean,
gets and returns its handle...
Defined on the UserRemote Interface....
public Handle createDataClient() throws
CreateException, RemoteException {
DataRemoteHome dataHome = null;
try {
dataHome = lookup.getDataRemoteHome();
} catch (NamingException ex) {
throw new EJBException("Unable to get
DataRemoteHome reference", ex);
}
DataRemote data = dataHome.create(userSettings);
return data.getHandle();
}
In my particular client, it calls this method and
immediately retrieves the EJBObject to pass into a
client object which handles it in the client space....
public DataClient createDataClient() throws
ServerAccessException {
validateState();
try {
Handle dataHandle =
userRemote.createDataClient();
EJBObject ejbObject =
dataHandle.getEJBObject();
return new
DataClientImplementation((DataRemote) ejbObject);
} catch (CreateException ce) {
throw new ServerAccessException(ce);
} catch (RemoteException re) {
throw new ServerAccessException(re);
}
}
When this client executes, an exception is thrown
during the call to dataHandle.getEJBObject()....
java.rmi.ServerException: Could not get EJBObject;
nested exception is:
java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested
exception is:
javax.ejb.EJBException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: No
method permissions assigned to method=getEJBObject,
interface=HOME"
type="com.bh.bplan.client.ServerAccessException">com.bh.bplan.client.ServerAccessException:
java.rmi.ServerException: Could not get EJBObject;
nested exception is:
java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested
exception is:
javax.ejb.EJBException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: No
method permissions assigned to method=getEJBObject,
interface=HOME
at
com.bh.bplan.client.UserContextImplementation.createDataClient(UserContextImplementation.java:107)
at
com.bh.bplan.client.UserContextTest.testCreateClients(UserContextTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.rmi.ServerException: Could not get
EJBObject; nested exception is:
java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested
exception is:
javax.ejb.EJBException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: No
method permissions assigned to method=getEJBObject,
interface=HOME
at
org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:158)
at
com.bh.bplan.client.UserContextImplementation.createDataClient(UserContextImplementation.java:102)
... 16 more
Caused by: java.rmi.ServerException: RemoteException
occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested
exception is:
javax.ejb.EJBException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: No
method permissions assigned to method=getEJBObject,
interface=HOME
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native
Method)
at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at
org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
Source)
at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135)
at
org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:154)
... 17 more
Caused by: java.rmi.ServerException: EJBException:;
nested exception is:
javax.ejb.EJBException: checkSecurityAssociation;
nested exception is: java.lang.SecurityException: No
method permissions assigned to method=getEJBObject,
interface=HOME
at
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:347)
at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:124)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
at
org.jboss.ejb.StatefulSessionContainer.internalInvokeHome(StatefulSessionContainer.java:404)
at org.jboss.ejb.Container.invoke(Container.java:743)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
at
org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
at
org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
at
sun.reflect.GeneratedMethodAccessor76.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native
Method)
at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: javax.ejb.EJBException:
checkSecurityAssociation; nested exception is:
java.lang.SecurityException: No method permissions
assigned to method=getEJBObject, interface=HOME
at
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:186)
at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:83)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:102)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:341)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
... 24 more
The exception is the same exception I was receiving on
other EJB methods that didn't have any method
permissions on them. That was fine. I found the
methods and defined roles or unchecked values to the
methods.
However, I don't see where I can assign a method
permission to getEJBObject, and this is a method on the
Handle interface and not on my Home interface at all.
Is this an actual bug? Or is there some way for me to
configure the server so it can ignore certain methods.
On first glance, I would've thought that the
getEJBObject method would not have declarative security
on it, but I can't say I know enough to stand by that
argument. ;)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1020788&group_id=22866
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development