You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Karsten Ohme <ko...@mms-dresden.de> on 2008/04/11 14:29:36 UTC

@RemoteBinding and OpenEJB cannot start

Hi,

Class is anotated with:

@Stateless
@RemoteBinding(jndiBinding = "PenReceiverFacade")

But OpenEJB cannot start. What is happening?

The goal behind this is that the name of the ear of the application changes,
but an JNDI lookup should be done. In the JNDI the class is grouped under
the name of the ear. So, when the ear name changes the lookup fails.

Stacktrace:

FATAL - OpenEJB has encountered a fatal error and cannot be started: The
Assembler encountered an unexpected error while attempting to build the
container system.
java.lang.annotation.AnnotationFormatError: Invalid default: public abstract
java.lang.Class org.jboss.annotation.ejb.RemoteBinding.factory()
	at java.lang.reflect.Method.getDefaultValue(Method.java:709)
	at
sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:98)
	at
sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:66)
	at
sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.jav
a:202)
	at
sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.j
ava:69)
	at
sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.ja
va:52)
	at java.lang.Class.initAnnotationsIfNecessary(Class.java:3031)
	at java.lang.Class.getAnnotation(Class.java:2989)
	at java.lang.Class.isAnnotationPresent(Class.java:3001)
	at
org.apache.xbean.finder.ClassFinder.findAnnotatedClasses(ClassFinder.java:23
6)
	at
org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(A
nnotationDeployer.java:329)
	at
org.apache.openejb.config.AnnotationDeployer$DiscoverAnnotatedBeans.deploy(A
nnotationDeployer.java:220)
	at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:
164)
	at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFac
tory.java:148)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(Configur
ationFactory.java:440)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(Configur
ationFactory.java:391)
	at
org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(Confi
gurationFactory.java:309)
	at
org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:253)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:293)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:272)
	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.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContex
tFactory.java:62)
	at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContex
tFactory.java:51)
	at
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(Local
InitialContextFactory.java:40)
	at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
	at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at
de.mms_dresden.ppp.server.service.test.EncryptionServiceTest.setUpClass(Encr
yptionServiceTest.java:91)
	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.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterR
unner.java:74)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRun
ner.java:50)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterR
unner.java:33)
	at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
erence.java:38)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:196)


Re: @RemoteBinding and OpenEJB cannot start

Posted by David Blevins <da...@visi.com>.
Hi Karsten,

I googled around a bit and it seems like this type of VM error can be  
caused when one of the classes associated with the Annotation are not  
found.  It may be that the default value of the "factory" attribute of  
the RemoteBinding annotation isn't available in the classpath.

-David

On Apr 11, 2008, at 5:29 AM, Karsten Ohme wrote:

> Hi,
>
> Class is anotated with:
>
> @Stateless
> @RemoteBinding(jndiBinding = "PenReceiverFacade")
>
> But OpenEJB cannot start. What is happening?
>
> The goal behind this is that the name of the ear of the application  
> changes,
> but an JNDI lookup should be done. In the JNDI the class is grouped  
> under
> the name of the ear. So, when the ear name changes the lookup fails.
>
> Stacktrace:
>
> FATAL - OpenEJB has encountered a fatal error and cannot be started:  
> The
> Assembler encountered an unexpected error while attempting to build  
> the
> container system.
> java.lang.annotation.AnnotationFormatError: Invalid default: public  
> abstract
> java.lang.Class org.jboss.annotation.ejb.RemoteBinding.factory()
> 	at java.lang.reflect.Method.getDefaultValue(Method.java:709)
> 	at
> sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:98)
> 	at
> sun 
> .reflect.annotation.AnnotationType.getInstance(AnnotationType.java:66)
> 	at
> sun 
> .reflect 
> .annotation.AnnotationParser.parseAnnotation(AnnotationParser.jav
> a:202)
> 	at
> sun 
> .reflect 
> .annotation.AnnotationParser.parseAnnotations2(AnnotationParser.j
> ava:69)
> 	at
> sun 
> .reflect 
> .annotation.AnnotationParser.parseAnnotations(AnnotationParser.ja
> va:52)
> 	at java.lang.Class.initAnnotationsIfNecessary(Class.java:3031)
> 	at java.lang.Class.getAnnotation(Class.java:2989)
> 	at java.lang.Class.isAnnotationPresent(Class.java:3001)
> 	at
> org 
> .apache 
> .xbean.finder.ClassFinder.findAnnotatedClasses(ClassFinder.java:23
> 6)
> 	at
> org.apache.openejb.config.AnnotationDeployer 
> $DiscoverAnnotatedBeans.deploy(A
> nnotationDeployer.java:329)
> 	at
> org.apache.openejb.config.AnnotationDeployer 
> $DiscoverAnnotatedBeans.deploy(A
> nnotationDeployer.java:220)
> 	at
> org 
> .apache 
> .openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:
> 164)
> 	at
> org.apache.openejb.config.ConfigurationFactory 
> $Chain.deploy(ConfigurationFac
> tory.java:148)
> 	at
> org 
> .apache 
> .openejb.config.ConfigurationFactory.configureApplication(Configur
> ationFactory.java:440)
> 	at
> org 
> .apache 
> .openejb.config.ConfigurationFactory.configureApplication(Configur
> ationFactory.java:391)
> 	at
> org 
> .apache 
> .openejb.config.ConfigurationFactory.getOpenEjbConfiguration(Confi
> gurationFactory.java:309)
> 	at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java: 
> 253)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:149)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:293)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:272)
> 	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.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java: 
> 36)
> 	at
> org 
> .apache 
> .openejb.client.LocalInitialContextFactory.init(LocalInitialContex
> tFactory.java:62)
> 	at
> org 
> .apache 
> .openejb.client.LocalInitialContextFactory.init(LocalInitialContex
> tFactory.java:51)
> 	at
> org 
> .apache 
> .openejb.client.LocalInitialContextFactory.getInitialContext(Local
> InitialContextFactory.java:40)
> 	at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java: 
> 667)
> 	at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
> 	at javax.naming.InitialContext.init(InitialContext.java:223)
> 	at javax.naming.InitialContext.<init>(InitialContext.java:197)
> 	at
> de 
> .mms_dresden 
> .ppp.server.service.test.EncryptionServiceTest.setUpClass(Encr
> yptionServiceTest.java:91)
> 	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 
> .junit 
> .internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterR
> unner.java:74)
> 	at
> org 
> .junit 
> .internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRun
> ner.java:50)
> 	at
> org 
> .junit 
> .internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterR
> unner.java:33)
> 	at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> 52)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRef
> erence.java:38)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
> 8)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:460)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
> nner.java:673)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
> java:386)
> 	at
> org 
> .eclipse 
> .jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
> .java:196)
>
>