Re: Tomcat common/lib

2009-11-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ziggy, On 11/14/2009 12:52 PM, Ziggy wrote: Because of this i couldnt really use the connection object provided via JNDI. Sure you can: just use the getInnermostDelegate method to get the real Connection object. You ought to be able to cast that

RE: Tomcat common/lib

2009-11-15 Thread Gerwood Stewart
Ziggy These days I'm more familiar with Maven (which solves this simply) however from the days of Ant I think the following might help a little: From memory most ant scripts are custom. You have to add the command to copy libraries etc. You will probably need to add an extra set of commands

Re: Tomcat common/lib

2009-11-14 Thread Ziggy
The problem i had with the Oracle specific functions is that they only work if the connection object is of a oracle.jdbc.driver.OracleConnection type. I am using Oracle Specific Types which i found are just a pain to use with Java because they cause lots of issues one of them being interfacing

Re: Tomcat common/lib

2009-11-13 Thread Mikolaj Rydzewski
Ziggy wrote: When i deploy an application on Tomcat, i have to place the jdbc driver in the $CATALINA_HOME/common/lib folder to be able to use the JNDI facilities. This is fine but when i build the war file using ANT, it refuses to build the war file unless i have the jdbc driver in the

Re: Tomcat common/lib

2009-11-13 Thread Ziggy
Excellent thanks. Im only beginning to use ANT so im learning it. Thanks On Fri, Nov 13, 2009 at 8:08 AM, Mikolaj Rydzewski m...@ceti.pl wrote: Ziggy wrote: When i deploy an application on Tomcat, i have to place the jdbc driver in the $CATALINA_HOME/common/lib folder to be able to use the

Re: Tomcat common/lib

2009-11-13 Thread Mikolaj Rydzewski
Ziggy wrote: when i build the war file using ANT, it refuses to build the war file unless i have the jdbc driver in the application's WEB-INF/lib folder Do you use any driver specific calls in your code? Since you use JNDI, you should rely only on DataSource provided by container. Hence, no

Re: Tomcat common/lib

2009-11-13 Thread Ziggy
No i dont have driver specific code. But something like this raises compilation errors as the jar file that includes the Connection, PreparedStatement and ResultSet objects is not accessible from the WEB-INF/lib folder. Context envCtx = (Context) initCtx.lookup(java:comp/env); DataSource ds =

Re: Tomcat common/lib

2009-11-13 Thread Mikolaj Rydzewski
Ziggy wrote: No i dont have driver specific code. But something like this raises compilation errors as the jar file that includes the Connection, PreparedStatement and ResultSet objects is not accessible from the WEB-INF/lib folder. Context envCtx = (Context) initCtx.lookup(java:comp/env);

Re: Tomcat common/lib

2009-11-13 Thread Ziggy
Thats interesting.. let me try it again and see the exact compile error that is raised. On Fri, Nov 13, 2009 at 9:18 AM, Mikolaj Rydzewski m...@ceti.pl wrote: Ziggy wrote: No i dont have driver specific code. But something like this raises compilation errors as the jar file that includes

Re: Tomcat common/lib

2009-11-13 Thread Ziggy
Hi, yes i think you are right. The compiler errors are not on the Connection, PreparedStatement objects references but rather on some specific references. Here are a couple of examples compile: [echo] Compiling java sources: [javac] Compiling 146 source files to

Re: Tomcat common/lib

2009-11-13 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ziggy, On 11/13/2009 8:15 AM, Ziggy wrote: yes i think you are right. The compiler errors are not on the Connection, PreparedStatement objects references but rather on some specific references. Here are a couple of examples Yes, you are using