PDA

View Full Version : Php using oci_connect in liferay with Quercus


rbrown
09-22-2010, 09:41 PM
Trying to port an older php script into a php portlet within liferay. This php script uses oci_connect to connect to an oracle database.

I started from the sample-php-portlet template and started to try debugging issues with oracle connectivity with a really basic php page.


regardless of what I try I always get the following error from the PHP page from the line doing an oci_connect:

Warning: A link to the server could not be established. java.lang.ClassCastException: oracle.jdbc.OracleDriver cannot be cast to javax.sql.DataSource [ocilogon]

and in the Server Log


Any Ideas? Has any one sucessfully used the oci functions in a liferay php portlet.

I am using a bundled install of liferay 6.0.5 with tomcat.
The jdbc jar (using ojdbc14.jar) for oracle is in the WEB-INF/lib folder as well as the <tomcat-home>/lib/ext

domdorn
09-29-2010, 11:28 AM
how are you creating your database connection?
please provide some php-code and share your web.xml.