You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sergei P. Volin" <sv...@ttk.ru> on 2002/04/13 07:19:07 UTC
DriverManager can't find suitable driver from LogonAction.
Hi,
I'm using Struts v.1.1 Night Build and trying to access DBCP pool from LogonAction and use JOCL document containing the discription of pool. But got SQLException: "No suitable driver". I used the known examples from commons-dbcp and succeded with both of them but failed when tried to combine them. I did the following steps.
1. First I run an example JOCLPoolingDriverExample.java from commons-dbcp/doc and got error message:
"java.lang.RuntimeException: org.xml.sax.SAXException: System property org.xml.sax.driver not specified"
This was fixed easily by setting System property in code:
System.setProperty("org.xml.sax.driver","org.apache.xerces.parsers.SAXParser")
Then it was ok. It created a pool to my InterBase server and returned results.
2. Then I used struts-example from Struts 1.1. It works ok.
3. On the next step I decided to make a Logon Form as in struts-example and check passwords through connection pool to my IB. I used the same code for creating pool as in first example. For building application I use JBuilder6 + Tomcat4. I did everything that was told in many places - put my JOCL document to classes/ directory. But failed - code didn't find JOCL document in classes.
To figure out what was wrong I compiled first example within my application to be sure that in my project all libraries are set ok, put JOCL document in classes/ directory (in the same place as above) and got successfull connection to pool! What the difference between these two codes?
Now I want to know - where is my fault? I like dbcp but almost came into frustration with this issue. Any idea?
Sergei.