Error: Bean not bound?
bairaulinter Nov 7, 2006 4:08 AMUserDAO is the interface, and UserDAOBean implement the methods in UserDAO.
In test.jsp:
InitialContext ctx;
ctx = new InitialContext(props);
UserDAO userdao = (UserDAO)ctx.lookup("UserDAOBean/local");
........
When I deploy the eshopEJB.jar, there are some problems. When I run the test.jsp in IE.
It says:
"javax.naming.NameNotFoundException: UserDAO not bound"
The errors and warnings in the console when I deploy are:
16:04:42,046 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.mq:service=DestinationManager
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@1a5e68a on mbean jboss.mq:service=DestinationManager; - nested throwable: (javax.management.AttributeNotFoundException: not found: ThreadPool)
I Depend On:
jboss.mq:service=MessageCache
jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
jboss.mq:service=ThreadPool
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ
ObjectName: jboss.mq:service=PersistenceManager
State: FAILED
Reason: org.jboss.deployment.DeploymentException: No Attribute found with name: RecoverMessagesChunk
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Topic,name=testTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Queue,name=testQueue
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq.destination:service=Queue,name=A
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=B
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=C
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=D
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq.destination:service=Queue,name=ex
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
ObjectName: jboss.mq:service=Invoker
State: CONFIGURED
I Depend On:
jboss.mq:service=TracingInterceptor
jboss:service=Naming
Depends On Me:
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=UIL2
ObjectName: jboss.mq:service=TracingInterceptor
State: CONFIGURED
I Depend On:
jboss.mq:service=SecurityManager
Depends On Me:
jboss.mq:service=Invoker
ObjectName: jboss.mq:service=SecurityManager
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ
ObjectName: jboss.mq.destination:service=Queue,name=DLQ
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager
ObjectName: jboss.mq:service=InvocationLayer,type=JVM
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
ObjectName: persistence.units:jar=eshopEJB.jar,unitName=eshopdb
State: FAILED
Reason: java.lang.RuntimeException: java.lang.AbstractMethodError: org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(Ljavax/persistence/spi/PersistenceUnitInfo;Ljava/util/Map;)Ljavax/persistence/EntityManagerFactory;
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
Depends On Me:
jboss.j2ee:jar=eshopEJB.jar,name=ItemDAOBean,service=EJB3
jboss.j2ee:jar=eshopEJB.jar,name=UserDAOBean,service=EJB3
ObjectName: jboss.j2ee:jar=eshopEJB.jar,name=ItemDAOBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=eshopEJB.jar,unitName=eshopdb
ObjectName: jboss.j2ee:jar=eshopEJB.jar,name=UserDAOBean,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:jar=eshopEJB.jar,unitName=eshopdb
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.mq:service=PersistenceManager
State: FAILED
Reason: org.jboss.deployment.DeploymentException: No Attribute found with name: RecoverMessagesChunk
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.mq:service=DestinationManager
ObjectName: persistence.units:jar=eshopEJB.jar,unitName=eshopdb
State: FAILED
Reason: java.lang.RuntimeException: java.lang.AbstractMethodError: org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(Ljavax/persistence/spi/PersistenceUnitInfo;Ljava/util/Map;)Ljavax/persistence/EntityManagerFactory;
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=MySqlDS
Depends On Me:
jboss.j2ee:jar=eshopEJB.jar,name=ItemDAOBean,service=EJB3
jboss.j2ee:jar=eshopEJB.jar,name=UserDAOBean,service=EJB3
I have cost much time on this error!
Please let me know what's the problem is?
Thank you!