views:

51

answers:

1

Hi. I'm going crazy trying to fix this exception: javax.naming.NameNotFoundException: lawless not bound

This is a Stripes web app built in Intellij and being deployed on Jboss 4.2.3 (Using 4.2.3 because Stripes has issues with later versions. I have successfully used 4.2.3 in the past so I know that's not the problem). I have one session bean called "ListingManagerBean". I checked the jboss jndi tree, and its nowhere to be found. So it seems the problem is that the jar isn't being deployed. I looked in my ear file, and it has both the war and jar. The ear structure looks like this:

lawless.ear
|- lawless.jar
|- lawless.war
|- [a bunch of other jars]
|- META-INF
   |- application.xml
   |- MANIFEST.MF

application.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  http://java.sun.com/xml/ns/javaee/application_5.xsd"
             version="5">
    <display-name>Lawless</display-name>
    <module id="Lawless-EJB">
        <ejb>lawless.jar</ejb>
    </module>
    <module id="Lawless-Web">
        <web>
            <web-uri>lawless.war</web-uri>
            <context-root>/</context-root>
        </web>
    </module>
</application>

Am I missing something? Help please.

A: 

You can check the server logfile and follow the deployment of your ear file. If the jar file cannot be deployed you'll find it there and a more or less meaningful error message pointing to where to look for the error.

Peter Tillemans
Hi. Thanks for the reply. I don't have any errors is the log. I saw some lines indicating that lawless.jar had been deployed, and more specifically, it created a service for ListingManagerBean. Also, my entities in the jar are connecting to the db and generating tables when the app starts. So I'm totally confused why the beans would not be in the jndi tree. I even tried using an annotation to set the jndi name, and that didn't work either.
Brian
Also noticed a very interesting line:Bound factory to JNDI name: persistence.units:ear=lawless.ear,jar=lawless.jar,unitName=lawless
Brian