users@glassfish.java.net

Re: Problem with glassfish jdbc connection pool -apparently jndi related

From: <glassfish_at_javadesktop.org>
Date: Fri, 04 Dec 2009 07:03:17 PST

After I considered your great hints (thank you very much) on setting:
<property name="hibernate.jndi.class">com.sun.appserv.naming.S1ASCtxFactory</property>
<property name="hibernate.jndi.url">iiop://127.0.0.1:3700</property>
Glassfish seems to accept my JNDI setup in hibernate.cfg.xml (see below).

But there is still some trouble left and no connection is established:
There are 2 warnings in my server.log when deploying to Glassfish, which give me the impression that something is still missing:

Hibernate Validator not found: ignoring
InitialContext did not implement EventContext

==============================================================

<hibernate-configuration>
    <session-factory name="hibernateSessionFactory">
        <property name="hibernate.jndi.class">com.sun.appserv.naming.S1ASCtxFactory</property>
        <property name="hibernate.jndi.url">iiop://127.0.0.1:3700</property>
        <property name="hibernate.connection.datasource">jdbc/myDatasource</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
        <property name="hibernate.show_sql">true</property>
        <property name="hibernate.current_session_context_class">thread</property>
        <mapping resource="HTKSpojos/Tab1.hbm.xml"/>
        <mapping resource="HTKSpojos/Tabl2.hbm.xml"/>
    </session-factory>
</hibernate-configuration>

==============================================================
[Message sent by forum member 'khash' ]

http://forums.java.net/jive/thread.jspa?messageID=374752