You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent Johnson <bl...@gmail.com> on 2005/05/25 19:14:23 UTC
Hibernate: No Suitable Driver
I've got an application running under Cocoon 2.1.7 and Hibernate3.
It's working fine right now on my development server at home. In the
past, when travelling to the home office, I just copy down the whole
webapp and it works fine.
I recently made changes that involved adding functionality for closing
Hibernate sessions based on the CocoonAndHibernateTutorial in the
Wiki. It worked great on my development server. I copied over files
to my laptop as I always do and flew down to the home office.
I fired up Tomcat and I get an exception when attempting to use
Hibernate! It's not a hibernate issue from what I can tell though.
If I use Hibernate in a standalone test case it works fine. But if I
try it under Cocoon (where it uses the cocoon's own internal database
pool) it dumps out with the following in my logfile:
WARN (2005-05-25) 13:02.16:805 [core.datasources.personnel]
(/processLogin.html)
http-80-Processor3/ResourceLimitingJdbcDataSource: Could not return
Connection
java.sql.SQLException: No suitable driver
My web.xml is the same on the laptop as it was on the server, as is my
cocoon.xconf. I'm just not sure why I'm getting this "No suitable
driver" error? The whole stacktract is pretty large, but it looks
like its happening in my call to getSession() in the HibernateFilter.
Any ideas?
Thanks,
- Brent
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Hibernate: No Suitable Driver
Posted by Brent Johnson <bl...@gmail.com>.
> When you were using Hibernate standalone, how did you access the
> Database ? How are you managing the Hibernate Session ? Did you specify
> your connection pool in cocoon.xconf ?
Yep, I was able to use it standalone with my test classes just fine.
I did specify the connection pool in cocoon.xconf.
> The "no suitable driver" exception could be a hint, though, that you
> forgot to copy the JDBC SQL Driver (e.g. mysql-connector-j for MySQL)
> to WEB-INF/lib at the server in your office.
It was there, but I think I fixed it. Now if someone would like to
explain why this works on my server at home and not on the laptop feel
free to let me know.
I forgot to include the MySQL driver in the web.xml file! I was
pouring through the config files for a production project we have with
Cocoon and I ran across the MySQL entry in web.xml and realized I
hadn't added it to this new webapp. Here it is:
<init-param>
<param-name>load-class</param-name>
<param-value>
com.mysql.jdbc.Driver
</param-value>
</init-param>
But what I don't get is why it would work on the server without this
entry, because I'm using the same web.xml file on both machines. But
adding this to web.xml on the laptop seems to have cleared up the
problem.
This will most likely clear up the problem I was having with Jetty in
the past too! (see previous email to the mailing list a few weeks
ago)
Thanks,
- Brent
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Hibernate: No Suitable Driver
Posted by Johannes Textor <jc...@gmx.de>.
Hi Brent !
When you were using Hibernate standalone, how did you access the
Database ? How are you managing the Hibernate Session ? Did you specify
your connection pool in cocoon.xconf ?
The "no suitable driver" exception could be a hint, though, that you
forgot to copy the JDBC SQL Driver (e.g. mysql-connector-j for MySQL)
to WEB-INF/lib at the server in your office.
HTH,
Johannes
Brent Johnson schrieb:
>Tomcat 5.5.x (not sure exactly, at this moment Im booted back into
>windowsXP). I'm using the same version with pretty much the same
>configuration as my server where this is working (both machines are
>setup with similar paths and etc for the webapp).
>
>- Brent
>
>On 5/25/05, jiBeya <an...@jibeya.com> wrote:
>
>
>>Brent,
>>what container are you using?
>>
>>regards
>>
>>
>>On 25 May 2005, at 18:14, Brent Johnson wrote:
>>
>>
>>I've got an application running under Cocoon 2.1.7 and Hibernate3.
>>
>>It's working fine right now on my development server at home. In the
>>
>>past, when travelling to the home office, I just copy down the whole
>>
>>webapp and it works fine.
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Hibernate: No Suitable Driver
Posted by Brent Johnson <bl...@gmail.com>.
Tomcat 5.5.x (not sure exactly, at this moment Im booted back into
windowsXP). I'm using the same version with pretty much the same
configuration as my server where this is working (both machines are
setup with similar paths and etc for the webapp).
- Brent
On 5/25/05, jiBeya <an...@jibeya.com> wrote:
> Brent,
> what container are you using?
>
> regards
>
>
> On 25 May 2005, at 18:14, Brent Johnson wrote:
>
>
> I've got an application running under Cocoon 2.1.7 and Hibernate3.
>
> It's working fine right now on my development server at home. In the
>
> past, when travelling to the home office, I just copy down the whole
>
> webapp and it works fine.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Hibernate: No Suitable Driver
Posted by jiBeya <an...@jibeya.com>.
Brent,
what container are you using?
regards
On 25 May 2005, at 18:14, Brent Johnson wrote:
> I've got an application running under Cocoon 2.1.7 and Hibernate3.
> It's working fine right now on my development server at home. In the
> past, when travelling to the home office, I just copy down the whole
> webapp and it works fine.