[ 
https://issues.apache.org/jira/browse/GERONIMO-4945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

liangkun updated GERONIMO-4945:
-------------------------------

    Attachment: G4945.patch

> Unable to deploy ejb with custom annotation
> -------------------------------------------
>
>                 Key: GERONIMO-4945
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4945
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: OpenEJB
>    Affects Versions: 2.2
>            Reporter: Alexey Kaigorodov
>            Priority: Critical
>             Fix For: 2.2.1
>
>         Attachments: G4945.patch, 
> test-custom-annotation-ejb-1.0.0-sources.jar, 
> test-custom-annotation-ejb-1.0.0.jar
>
>
> Simple tast case:
> @Stateless
> @Local(Test.class)
> @Custom(type = CustomType.A)
> public class TestBean implements Test {
>   @Override
>   public void foo() {
>   }
> }
> @Target(ElementType.TYPE) 
> @Retention(RetentionPolicy.RUNTIME)
> public @interface Custom {
>   CustomType[] type() default {}; // works fine for non-array CustomType 
> type();
> }
> public enum CustomType {
>   A, B
> }
> geronimo.log:
> 2009-11-03 14:05:17,138 ERROR [Deployer] Deployment failed due to 
> java.lang.ArrayStoreException: 
> sun.reflect.annotation.AnnotationTypeMismatchExceptionProxy
>       at 
> sun.reflect.annotation.AnnotationParser.parseEnumArray(AnnotationParser.java:673)
>       at 
> sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:462)
>       at 
> sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
>       at 
> sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
>       at 
> sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
>       at 
> sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
>       at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
>       at java.lang.Class.getAnnotation(Class.java:3029)
>       at java.lang.Class.isAnnotationPresent(Class.java:3042)
>       at 
> org.apache.xbean.finder.ClassFinder.findAnnotatedClasses(ClassFinder.java:241)
>       at 
> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:459)
>       at 
> org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(AnnotationDeployer.java:253)
>       at 
> org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:188)
>       at 
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:247)
>       at 
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:601)
>       at 
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:635)
>       at 
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:568)
>       at 
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:493)
>       at 
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:592)
>       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257)
>       at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:136)
>       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:597)
>       at 
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
>       at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>       at sun.reflect.GeneratedMethodAccessor159.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:851)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:237)
>       at 
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>       at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
>       at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
>       at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
>       at sun.rmi.transport.Transport$1.run(Transport.java:159)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>       at 
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:619)
> It seems to related with https://issues.apache.org/jira/browse/OPENEJB-951

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to