title: How to resolve a NamingException that's only thrown when running application
body: <p>i got error: </p>
  
  <blockquote>
    <p>javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException:BranchProcessorLocal not bound]</p>
  </blockquote>
  
  <p>in my EJB-Hibernet project </p>
  
  <p>I am using jboss-4.0.2, NetBeans-6.8, JavaEE 5</p>
  
  <p>Project is build successfully in NetBeans but when i try to deploy it and run application i got above error.</p>
  
  <p>I had put <code>.ear</code> files into lib directory also.</p>
  
  <p>How do I resolve this exception?</p>