[jboss-user] [EJB 3.0] - JBoss not binding @Local SLSB
andydale
do-not-reply at jboss.com
Tue Aug 15 08:14:31 EDT 2006
Hi,
I have a very simple set up with an .ear file which contains a .sar and .jar(EJB 3). The problem at the moment is that it will not bind the Local or Remote interfaces of a stateless session bean.
My project is currently set up as follows. I have a top level interface (IRelationTest), then the local and remote interfaces of the session bean inherit from this (IRelationTestLocal, IRelationTestRemote, these 2 files also have the @local and @remote annotations in them). My Stateless session bean implements both the local and remote interfaces, and specifies the jndi binding with the @LocalBinding and @RemoteBinding.
This app was only to test the relationships between entities so i was going to test it via the JMX console with the help of an MBean. The *MBean.java is just an empty interface and and then i have a class that implements the MBean, in the implementing class a lookup of the local interface of the session beanis made from the IntialContext, this is never never bound.
Structure of files:
| Top Level .ear
| META-INF/
| META-INF/MANIFEST.MF
| TestRelationships-ejb.jar
| TestRelationshipsMBean.sar
| META-INF/application.xml
| EJB .jar
| META-INF/
| META-INF/MANIFEST.MF
| test/
| test/Course.class
| test/RelationTest.class
| test/IRelationTestLocal.class
| test/IRelationTest.class
| test/IRelationTestRemote.class
| test/Student.class
| META-INF/persistence.xml
| MBean .sar
| META-INF/
| META-INF/MANIFEST.MF
| test/
| test/TestRelationships.class
| test/TestRelationshipsMBean.class
| META-INF/jboss-service.xml
|
And the exception i get is
anonymous wrote :
| 13:53:15,291 INFO [EARDeployer] Undeploying J2EE application, destroy step: file:/usr/local/jboss-4.0.4.GA/server/default/deploy/TestRelationships.ear
| 13:53:15,292 INFO [EARDeployer] Undeployed J2EE application: file:/usr/local/jboss-4.0.4.GA/server/default/deploy/TestRelationships.ear
| 13:53:15,294 INFO [EARDeployer] Init J2EE application: file:/usr/local/jboss-4.0.4.GA/server/default/deploy/TestRelationships.ear
| 13:53:15,314 INFO [STDOUT] IN HERE: TestRelationships
| 13:53:15,314 ERROR [STDERR] javax.naming.NameNotFoundException: TestLoc not bound
| 13:53:15,315 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
| 13:53:15,315 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
| 13:53:15,315 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
| 13:53:15,315 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
| 13:53:15,315 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
| 13:53:15,315 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
| 13:53:15,315 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
| 13:53:15,315 ERROR [STDERR] at test.TestRelationships.(TestRelationships.java:26)
| 13:53:15,316 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| 13:53:15,316 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| 13:53:15,316 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| 13:53:15,316 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| 13:53:15,316 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1233)
| 13:53:15,316 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
| 13:53:15,316 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
| 13:53:15,317 ERROR [STDERR] at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
| 13:53:15,317 ERROR [STDERR] at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
| 13:53:15,317 ERROR [STDERR] at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| 13:53:15,317 ERROR [STDERR] at org.jboss.system.ServiceController.install(ServiceController.java:226)
| 13:53:15,317 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
| 13:53:15,317 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 13:53:15,317 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 13:53:15,317 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 13:53:15,317 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 13:53:15,318 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| 13:53:15,318 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 13:53:15,318 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 13:53:15,318 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 13:53:15,318 ERROR [STDERR] at $Proxy4.install(Unknown Source)
| 13:53:15,318 ERROR [STDERR] at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| 13:53:15,318 ERROR [STDERR] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| 13:53:15,318 ERROR [STDERR] at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
| 13:53:15,318 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| 13:53:15,319 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| 13:53:15,319 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
| 13:53:15,319 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 13:53:15,319 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 13:53:15,319 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 13:53:15,320 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 13:53:15,320 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 13:53:15,320 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 13:53:15,320 ERROR [STDERR] at $Proxy6.deploy(Unknown Source)
| 13:53:15,320 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| 13:53:15,320 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| 13:53:15,320 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| 13:53:15,320 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| 13:53:15,320 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| 13:53:15,349 INFO [Ejb3Deployment] EJB3 deployment time took: 20
| 13:53:15,352 INFO [JmxKernelAbstraction] installing MBean: persistence.units:ear=TestRelationships.ear,jar=TestRelationships-ejb.jar,unitName=test with dependencies:
| 13:53:15,353 INFO [JmxKernelAbstraction] jboss.jca:name=Postgres_Test,service=ManagedConnectionFactory
| 13:53:15,362 INFO [Ejb3Configuration] found EJB3 Entity bean: test.Course
| 13:53:15,365 INFO [Ejb3Configuration] found EJB3 Entity bean: test.Student
| 13:53:15,365 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
| 13:53:15,368 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
| 13:53:15,368 INFO [Ejb3Configuration] [PersistenceUnit: test] no META-INF/orm.xml found
| 13:53:15,370 INFO [AnnotationBinder] Binding entity from annotated class: test.Course
| 13:53:15,370 INFO [EntityBinder] Bind entity test.Course on table course
| 13:53:15,371 WARN [AnnotationBinder] Hibernate does not support SequenceGenerator.initialValue()
| 13:53:15,376 INFO [AnnotationBinder] Binding entity from annotated class: test.Student
| 13:53:15,376 INFO [EntityBinder] Bind entity test.Student on table student
|
I cannot seem to figure out what i am doing wrong. Can anyone point me in the right direction.
Thanks,
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965240#3965240
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965240
More information about the jboss-user
mailing list