Hi folks,

I asked a similar question last week and I'm still scratching my head here.

In order to track down what I'm missing I created a very simple
application using Hibernate (if such exists) against a local database
defining only one table.

I've created my geronimo-web.xml file that looks like:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2";>
    <environment>
        <moduleId>
            <groupId>net.berghold.testgeronimo.website</groupId>
            <artifactId>Geronimo_Test_Hibernate_App</artifactId>
            <version>2.0</version>
            <type>war</type>
        </moduleId>
    </environment>
    <context-root>/testgapp</context-root>

</web-app>

Simple... simple...

The only JSP page does this:

<%
        Mytest mt = new Mytest(new Date().toString(),"A Field");
        MytestDAO dao = new MytestDAO();
        
        dao.save(mt);

 %>

Simple... simple...

What I'm seeing happen is the data never gets saved.  Looking at the
logs I see a variety of errors that pique my interest.

%%%% Error Creating SessionFactory %%%%
java.lang.ClassCastException: java.util.HashSet
        at
org.hibernate.util.PropertiesHelper.resolvePlaceHolders(PropertiesHelper.java:88)

being one and

%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource:
net/berghold/tg/persistance/Mytest.hbm.xml

being another and even more interesting is

Caused by: org.hibernate.DuplicateMappingException: Duplicate
class/entity mapping net.berghold.tg.persistance.Mytest

What the...?


What is special about deploying Hibernate based apps under Geronimo that
web searches haven't revealed, or will Hibernate even work under Geronimo?

The HibernateSessionFactory that I'm using is pretty stock stuff that
you find on the Hibernate.org website.  Looking at the book
"Professional Apache Geronimo" yields no mention of Hibernate at all
which is really making me begin to wonder.

Anybody got any ideas out there?

----

Peter L. Berghold                   Unix Professional
[EMAIL PROTECTED]             AIM: redcowdawg YIM: blue_cowdawg
"Those who fail to learn from history are condemned to repeat it."

Reply via email to