[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

NameNotFoundException although bean is deployed succesful

Asked by Crazy_Bytes in Application Servers, Java Programming Language

Tags: JBoss NameNotFoundException Deployment

Hi,

I have a problem where I can't the cause for it. I have a JBoss 4.2.3 application server running
in a clustered configuration. Ihave about 160 session and entity beans and also 2 ears running with no problem. Due to some open projects I needed to create 2 new entity beans.

98% of the beans stil use thel EJB 2.0 spec, a few use EJB 3.0 spec. The new beans also use the EJB 2.0 spec. Both beans are deployed succesful. But the moment I try to create a home instance I receive a NameNotFoundException.

This is what I get during server start:
...
17:34:16,480 INFO  [EjbModule] Deploying CoReductionDetail
17:34:16,511 INFO  [ProxyFactory] Bound EJB Home 'CoReductionDetail' to jndi 'CoReductionDetail'
17:34:16,511 INFO  [EJBDeployer] Deployed: file:/C:/jboss-4.2.3.GA/server/dev/deploy/CoReductionDetailEnterpriseBean.jar
17:34:16,652 INFO  [EjbModule] Deploying CoReductionHead
17:34:16,668 INFO  [ProxyFactory] Bound EJB Home 'CoReductionHead' to jndi 'CoReductionHead'
17:34:16,668 INFO  [EJBDeployer] Deployed: file:/C:/jboss-4.2.3.GA/server/dev/deploy/CoReductionHeadEnterpriseBean.jar
...

This is the message I recieve when I try to instanciate the bean:
java.rmi.ServerException: EJBException:; nested exception is:
      javax.ejb.EJBException: Could not instantiate bean; nested exception is: javax.ejb.EJBException: javax.ejb.EJBException: javax.naming.NameNotFoundException: CoReductionHead not bound; nested exception is: javax.ejb.EJBException: javax.naming.NameNotFoundException: CoReductionHead not bound; nested exception is: javax.naming.NameNotFoundException: CoReductionHead not bound
      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:365)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:136)
      at org.jboss.ejb.plugins.CleanShutdownInterceptor.invokeHome(CleanShutdownInterceptor.java:212)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
      at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:637)
      at org.jboss.ejb.Container.invoke(Container.java:981)
      at sun.reflect.GeneratedMethodAccessor122.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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.unified.server.UnifiedInvokerHA.invoke(UnifiedInvokerHA.java:148)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:420)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)

I checked the ejb-jar.xml and jboss.xml deployment descriptors over and over. I even wrote complete new, with no changes.

When I shut the server I get the folowing messages:
...
17:40:53,839 INFO  [EJBDeployer] Undeploying: file:/C:/jboss-4.2.3.GA/server/dev/deploy/CoReductionHead EnterpriseBean.jar
17:40:53,839 INFO  [ProxyFactory] Bound EJB Home 'CoReductionHead' to jndi 'CoReductionHead'
17:40:53,855 INFO  [ProxyFactory] Unbind EJB Home 'CoReductionHead' from jndi 'CoReductionHead'
17:40:53,855 INFO  [EjbModule] Undeployed CoReductionHead
17:40:53,855 INFO  [EJBDeployer] Undeploying: file:/C:/jboss-4.2.3.GA/server/dev/deploy/CoReductionDetailEnterpriseBean.jar
17:40:53,855 INFO  [ProxyFactory] Bound EJB Home 'CoReductionDetail' to jndi 'CoReductionDetail'
17:40:53,871 INFO  [ProxyFactory] Unbind EJB Home 'CoReductionDetail' from jndi 'CoReductionDetail'
17:40:53,871 INFO  [EjbModule] Undeployed CoReductionDetail
...

When the sever is running I can see the bean in the JMX console.

To me this exception makes no sense, since the console tells that the beans are deployed succesful.

I also checked the lookup of the beans, the are identical with the lookup of the other EJB 2.0 beans, ecept that the name is different. I also checked severel times the Name of the bean inside the source code of the lookup.

Has anybody the slightest idea why this exception occurs?

Thanks,
CB
[+][-]06/22/09 09:30 AM, ID: 24684043Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/23/09 01:20 AM, ID: 24689903Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/23/09 01:24 AM, ID: 24689926Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/09 06:21 AM, ID: 24711083Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Application Servers, Java Programming Language
Tags: JBoss NameNotFoundException Deployment
Sign Up Now!
Solution Provided By: Crazy_Bytes
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_4_20070622