[JBoss JIRA] Created: (JBAS-5036) Local home create() implementation returns wrong type
by Arto Huusko (JIRA)
Local home create() implementation returns wrong type
-----------------------------------------------------
Key: JBAS-5036
URL: http://jira.jboss.com/jira/browse/JBAS-5036
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: JBossAS-4.2.1.GA
Reporter: Arto Huusko
Assigned To: Carlo de Wolf
Local home (and presumably remote, too) implementation for EJB 3 sessions creates an object that is an instance of the local *business* interface of the EJB 3 session, and returns that. This is contrary to EJB 3 specification, which says that local home create methods must return an instance of the local interface of the EJB 3 session (as in: not local business interface).
The type of the local interface is apparently deduced from the return type of the create method in the local home interface (there is no annotation for it).
For beans that follow the specification, this causes a class cast exception when create() is called: the local home interface is specified to return an instance of local interface, but the implementation JBoss supplies creates a instance of local business interface (I presume so, because changing local home to return that works), and then we end up with class cast exception.
There is no workaround other than going against specification in code: define local home interface to return instance of local business interface.
This simple session, which as far as I can see is exactly according to EJB 3 spec, illustrates the problem, and does not work on JBoss 4.2.1.GA:
--
@javax.ejb.Stateless(name="Stateless")
@javax.ejb.LocalHome(StatelessHome.class)
@javax.ejb.Local({StatelessLocal.class})
public class StatelessBean implements StatelessLocal { public void ejbCreate() {} }
--
public interface StatelessLocal {}
--
public interface StatelessHome extends javax.ejb.EJBLocalHome
{ public StatelessLocal21 create() throws javax.ejb.CreateException;}
--
public interface StatelessLocal21 extends javax.ejb.EJBLocalObject, StatelessLocal {}
--
When home is looked up, and create is called, the result is:
java.lang.ClassCastException: $Proxy271 cannot be cast to StatelessLocal21
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 5 months
[JBoss JIRA] Created: (JBAS-3463) Loading of persisted XMBean attributes does not work for custom types
by Dimitris Andreadis (JIRA)
Loading of persisted XMBean attributes does not work for custom types
---------------------------------------------------------------------
Key: JBAS-3463
URL: http://jira.jboss.com/jira/browse/JBAS-3463
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JMX
Affects Versions: JBossAS-4.0.4.GA
Reporter: Dimitris Andreadis
Fix For: JBossAS-4.0.5.GA
When using XMBean persistence for a complex attribute (my own type), all seems to go well when changes are persisted/serialized, but when the XMBean is redeployed (and its persisted state is read), there are problems unserializing the serialized data
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar -> C:\Java\jboss-4.0.4\server\test\tmp\deploy\tmp7332examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.SARDeployer@153c375
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.SARDeployer] about to copy 0 local directories
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.SARDeployer] looking for nested deployments in : file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
2006-08-01 14:33:59,314 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@12a3722, cl=org.jboss.mx.loading.UnifiedClassLoader3@46fef3{ url=file:/C:/Java/jboss-4.0.4/server/test/tmp/deploy/tmp7332examplexmbean.sar ,addedOrder=0}
2006-08-01 14:33:59,314 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@12a3722, cl=org.jboss.mx.loading.UnifiedClassLoader3@46fef3{ url=file:/C:/Java/jboss-4.0.4/server/test/tmp/deploy/tmp7332examplexmbean.sar ,addedOrder=0}
2006-08-01 14:33:59,314 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@46fef3{ url=file:/C:/Java/jboss-4.0.4/server/test/tmp/deploy/tmp7332examplexmbean.sar ,addedOrder=0}
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/Documents and Settings/jiwils/Desktop/examplexmbean/dist/examplexmbean.sar
2006-08-01 14:33:59,314 DEBUG [org.jboss.deployment.SARDeployer] Registering service UCL=jmx.loading:UCL=46fef3
2006-08-01 14:33:59,329 DEBUG [org.jboss.system.ServiceCreator] About to create xmbean object: example:service=ExampleService with code: example.ExampleService with embedded descriptor
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.modelmbean.ModelMBeanInvoker] Loaded persistence mgr: org.jboss.mx.persistence.DelegatingPersistenceManager
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.persistence.DelegatingPersistenceManager] init() --- ModelMBeanInfo Descriptor ---
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.persistence.DelegatingPersistenceManager] descriptorType=mbean, displayName=org.jboss.mx.modelmbean.XMBean, log=F, name=org.jboss.mx.modelmbean.XMBean, objectname=(example:service=ExampleService), persistence-manager=org.jboss.mx.persistence.DelegatingPersistenceManager, persistPolicy=OnUpdate, resourceClass=example.ExampleService, visibility=1
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.persistence.DelegatingPersistenceManager] chosen persistent id: 'example:service=ExampleService'
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.persistence.DelegatingPersistenceManager] using AttributePersistenceManager: org.jboss.system.pm.XMLAttributePersistenceManager
2006-08-01 14:33:59,329 DEBUG [org.jboss.mx.persistence.DelegatingPersistenceManager] load() called for: 'example:service=ExampleService'
2006-08-01 14:33:59,329 DEBUG [org.jboss.system.pm.XMLAttributePersistenceManager] load(example:service=ExampleService)
2006-08-01 14:33:59,329 WARN [org.jboss.system.pm.XMLAttributePersistenceManager] Cannot deserialize object
java.lang.ClassNotFoundException: example.ComplexAttribute
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:584)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1543)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1465)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
at org.jboss.system.pm.XMLAttributePersistenceManager.decodeFromHexString(XMLAttributePersistenceManager.java:738)
at org.jboss.system.pm.XMLAttributePersistenceManager.load(XMLAttributePersistenceManager.java:440)
at org.jboss.mx.persistence.DelegatingPersistenceManager.load(DelegatingPersistenceManager.java:98)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.load(ModelMBeanInvoker.java:411)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.init(ModelMBeanInvoker.java:523)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.invokePreRegister(ModelMBeanInvoker.java:486)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:654)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1422)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1417)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1350)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:345)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:181)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
2006-08-01 14:33:59,329 WARN [org.jboss.mx.persistence.DelegatingPersistenceManager] Caught exception while loading
java.lang.Exception: Failed to deserialize attribute 'SomeAttribute'
at org.jboss.system.pm.XMLAttributePersistenceManager.load(XMLAttributePersistenceManager.java:443)
at org.jboss.mx.persistence.DelegatingPersistenceManager.load(DelegatingPersistenceManager.java:98)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.load(ModelMBeanInvoker.java:411)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.init(ModelMBeanInvoker.java:523)
at org.jboss.mx.modelmbean.ModelMBeanInvoker.invokePreRegister(ModelMBeanInvoker.java:486)
at org.jboss.mx.server.AbstractMBeanInvoker.preRegister(AbstractMBeanInvoker.java:654)
at org.jboss.mx.server.registry.BasicMBeanRegistry.invokePreRegister(BasicMBeanRegistry.java:697)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1422)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1417)
at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1350)
at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:345)
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:181)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.install(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPProxyFactory.invoke(JRMPProxyFactory.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:819)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
2006-08-01 14:33:59,329 WARN [org.jboss.mx.server.registry.BasicMBeanRegistry] javax.management.MBeanRegistrationException: preRegister() failed: [ObjectName='example:service=ExampleService', Class=example.ExampleService (example.ExampleService@ae8af4)]
2006-08-01 14:33:59,329 INFO [example.ExampleService] Registration is not done -> stop
.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 5 months
[JBoss JIRA] Created: (JBAS-5014) EJBMethodPermission implies should check for null methodname and methodSig==""
by Anil Saldhana (JIRA)
EJBMethodPermission implies should check for null methodname and methodSig==""
------------------------------------------------------------------------------
Key: JBAS-5014
URL: http://jira.jboss.com/jira/browse/JBAS-5014
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Security
Affects Versions: JBossAS-4.2.2.GA, JBossAS-5.0.0.Beta2
Reporter: Anil Saldhana
Assigned To: Scott M Stark
Fix For: JBossAS-5.0.0.Beta3, JBossAS-4.2.3.GA
Consider the following test:
==============
/**
* Test a Method Permission for all methods of an EJB
*/
public void testAllStarEJBMethodPermission()
{
EJBMethodPermission policyPerm = new EJBMethodPermission("ejbName",
null, null, new String[0]);
EJBMethodPermission userPerm = new EJBMethodPermission("ejbName",
"create", dummyInterface.class.getMethods()[0]);
EJBMethodPermission userPerm2 = new EJBMethodPermission("ejbName", "a", "LocalHome", new String[]{"java.lang.String"});
assertTrue(policyPerm.implies(userPerm));
assertTrue(policyPerm.implies(userPerm2));
}
========================================
The check for userPerm2 fails.
The permission in the Policy should check for "null" methodName (which implies "*") and also for the methodSignature to be "" (or String[0])
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 5 months