× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm having a spot of difficulty running a JTOpen pool under Tomcat 4. I
suspect that one of my configuration files is incorrect.

The Java code is as follows:

Context context = (Context) new InitialContext().lookup("java:comp/env");
AS400JDBCConnectionPoolDataSource dataSource
=(AS400JDBCConnectionPoolDataSource) context.lookup("jdbc/iSeries");
AS400JDBCConnectionPool pool = new AS400JDBCConnectionPool(dataSource);

This dies on the 2nd line, giving this exception:

java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
        at
trisystems.evo.util.ConnectionPool.<clinit>(ConnectionPool.java:95)
        at trisystems.evo.prompt.PromptServer.<clinit>(PromptServer.java:86)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:296)
        at java.lang.Class.newInstance(Class.java:249)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:88
6)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3279)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

My context (from server.xml) is as follows:

<Context path="/evo" docBase="evo" debug="0">
    <Resource name="jdbc/iSeries" auth="Container"
type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/iSeries">
        <parameter>
            <name>driverClassName</name>
            <value>com.ibm.as400.access.AS400JDBCDriver</value>
        </parameter>
        <parameter>
            <name>driverName</name>
 
<value>jdbc:as400://255.255.255.255;user=foo;password=bar;prompt=false;namin
g=system;date format=iso;translate binary=true</value>
        </parameter>
    </ResourceParams>
    <Logger className="org.apache.catalina.logger.FileLogger"
directory="logs"  prefix="localhost_evo_log." suffix=".txt"
timestamp="true"/>
</Context>

In the deployment descriptor for my app, I have:

<resource-ref>
    <description>Resource reference to java.sql.Connection factory defined
in server.xml</description>
    <res-ref-name>jdbc/iSeries</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

I'm running WinNT, Sun's JVM version 1.4.0, Tomcat 4.0.6, JTOpen version
3.0. Any clues?

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning@xxxxxxxxxxxxxxxx
--LongSig




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.