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 /u/build/gui2/distribution/classes
    [javac] /u/build/ConsignmentDAO.java:84: package
org.apache.tomcat.dbcp.dbcp does not exist
    [javac] import org.apache.tomcat.dbcp.dbcp.DelegatingConnection;
    [javac]                                   ^
    [javac] /u/build/ConsignmentDAO.java:86: cannot find symbol
    [javac] symbol  : class ARRAY
    [javac] location: package oracle.sql
    [javac] import oracle.sql.ARRAY;
    [javac]                  ^
    [javac] /u/build/gui2/ConsignmentDAO.java:87: cannot find symbol
    [javac] symbol  : class ArrayDescriptor
    [javac] location: package oracle.sql
    [javac] import oracle.sql.ArrayDescriptor;
    [javac]                  ^
    [javac] /u/build/gui2/SubmitDeclaration.java:43: cannot find symbol
    [javac] symbol  : class StructDescriptor
    [javac] location: package oracle.sql
    [javac] import oracle.sql.StructDescriptor;
    [javac]                  ^
    [javac] /u/build/lib_ora.java:125: package oracle.jdbc does not exist
    [javac] import oracle.jdbc.*;
    [javac] ^
    [javac] /u/build/gui2/ConsignmentDAO.java:381: cannot find symbol
    [javac] symbol  : class DelegatingConnection
    [javac] location: class com.bt.ccs21.data.accessors.ConsignmentDAO
    [javac]                             if (conn instanceof
DelegatingConnection){
    [javac]                                                 ^
    [javac] /u/build/gui2/ConsignmentDAO.java:382: cannot find symbol
    [javac] symbol  : class DelegatingConnection
    [javac] location: class com.bt.ccs21.data.accessors.ConsignmentDAO
    [javac]                                     underlyingConnection =
((DelegatingConnection)conn).getDelegate();
    [javac]                                                              ^
    [javac] /u/build/gui2/ConsignmentDAO.java:383: cannot find symbol
    [javac] symbol  : class DelegatingConnection
    [javac] location: class com.bt.ccs21.data.accessors.ConsignmentDAO
    [javac]                                     underlyingConnection =
((DelegatingConnection)underlyingConnection).getDelegate();
    [javac]                                                              ^
    [javac] /u/build/gui2/ConsignmentDAO.java:395: cannot find symbol
    [javac] symbol  : class ArrayDescriptor
    [javac] location: class data.accessors.ConsignmentDAO
    [javac]                             ArrayDescriptor rectabDescriptor =
ArrayDescriptor.createDescriptor("LIST_TYPE",underlyingConnection);

    [javac] /u/build/gui2/data/accessors/ConsignmentDAO.java:396: cannot
find symbol
    [javac] symbol  : class ARRAY
    [javac] location: class data.accessors.ConsignmentDAO
    [javac]                             ARRAY awbNoHwbs = new
ARRAY(rectabDescriptor,underlyingConnection,childLessAwbs);
    [javac]                                  ^

    [javac]                                              ^
    [javac] /u/build/common/java/com/rms_lib_ora.java:350: cannot find
symbol
    [javac] symbol  : class OracleConnection
    [javac] location: class com.bt.ccs21.common_java.rms_lib_ora
    [javac]             if( !((OracleConnection)
mainConnection).getImplicitCachingEnabled())
    [javac]                    ^


  [javac]             if( !((OracleConnection)
mainConnection).getImplicitCachingEnabled())
    [javac]                    ^

  [javac]                     ((OraclePreparedStatement)pStatement).close();
    [javac]                       ^

    [javac]                     ((OracleConnection)
mainConnection).setStatementCacheSize( gJDBC_StatementCacheSize );
    [javac]                       ^

    [javac]                                                     +
((OracleConnection) mainConnection).getStatementCacheSize() );
    [javac]                                                         ^


[javac]
^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.





On Fri, Nov 13, 2009 at 12:28 PM, Ziggy <zigg...@gmail.com> wrote:

> 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 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 = (DataSource)
>>> envCtx.lookup("jdbc/EmployeeDB");
>>>
>>> Connection conn = ds.getConnection();
>>>
>>> PreparedStatement lv_pstmt = null;
>>> ResultSet lv_rs = null;
>>>
>>> To be able to compile the above, the jdbc driver in Tomcat/common/lib has
>>> to
>>> be in the classpath i guess.
>>>
>>>
>> These are standard J2SE interfaces from java.sql package. There's no need
>> to include any additional jars to compile such code.
>>
>>
>> --
>> Mikolaj Rydzewski <m...@ceti.pl>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>

Reply via email to