Hi Folks, im getting the following error message when running chapter 5 a exercise from JbossAtWork book. I have been using
JBoss 5.1 and
Java 6 with Oracle XE thus far and have had no problems running the previous exercises up until this point.
the error message:
[STDOUT] com.jbossatwork.util.ServiceLocatorException: com.jbossatwork.util.ServiceLocatorException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: hibernate not bound]
here is a short hand version of what my ear, war and common jars look like:
jaw.ear (contains)
- META-INF
- application.xml
- jboss-app.xml
- common.jar
- jaw.har
- webapp.war
common.jar (contains)
- classes (including HibernateCarDAO.class, CarDTO.class, ServiceLocator.class)
jaw.har (contains)
- CarDTO.hbm.xml
- META-INF
- hibernate-service.xml
webapp.war (contains)
- META-INF
- WEB-INF
- classes (including ControllerServlet.class)
- lib folder
- jboss-web.xml
- web.xml
- jsps and other files
hibernate-service.xml looks as follows:
build.xml for hibernatedoclet looks as follows:
ControllerServlet.java generates the following tags:
HibernateCarDAO.java sends the following to ServiceLocator.java to perform a ServiceLocator.getHibernateSession(HIBERNATE_SESSION_FACTORY) which inturn does the
ctx.lookup(jndiSessionFactoryName)
what am I doing wrong É and is their an alternative way to binding the mbean É
I have used the hibernate jars contained in the C:\jboss-5.1.0.GA\common\lib for my compile and xdoclet classpaths
and also tried to alternatively use this version of hibernate instead for compile and xdoclet classpaths
C:\hibernate-distribution-3.5.1-Final and C:\hibernate-distribution-3.5.1-Final\lib\required
where am i going wrong. let me know if you need any additional snippets of this program.
Thanks in advance