I'm a complete newb so bear w/ me!
I'm unable to include hibernate w/ my web app(currently using struts). The error I get is :
HTTP Status 404 - Servlet action is not available
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not available.
Apache Tomcat/5.0.12
I get this error when I fire up the web app. When I remove the "plugin" from my struts-config.xml, the web app works fine. Here is my hibernate-cfg.xml:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory name="hibernate/sessionFactory">
<property name="connection.url">jdbc:mysql://172.16.0.5:3306/dlonline</property>
<property name="connection.username">testuser</property>
<property name="connection.password">password</property>
<property name="connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<!-- properties for this SessionFactory only -->
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<!-- mapping files -->
</session-factory>
</hibernate-configuration>
I added this to the plugin section of struts-config.xml
<plug-in className="edu.arbor.util.plugin.HibernatePlugIn">
<set-property property="configFilePath" value="/WEB-INF/hibernate.cfg.xml" />
<set-property property="storeInServletContext" value="true" />
</plug-in>
and I added the class HibernatePlugIn to my project and compiled per instructions at the website
http://www.hibernate.org/105.html
What am I missing? I just added a new empty class file in my WEB-INF/classes directory and called it HibernatePlugIn. Is this the wrong place. Should I have done something else. Does anyone have any examples I can look at the DON'T use JNDI. If anyone would post any code or e-mail me some at
meadmaker1977@yahoo.com.
TIA
Mike B