You can remove the Class.forName call.  Change the first argument to the
AS400JDBCConnectionPoolDataSource constructor from jdbc:as400://17.118.19.15
to just 17.118.19.15.  The URL syntax is used for calls to
DriverManager.getConnection(..).

Gary

> -----Original Message-----
> From: java400-l-bounces@xxxxxxxxxxxx 
> [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom
> Sent: Sunday, November 13, 2005 1:39 PM
> To: java400-l@xxxxxxxxxxxx
> Subject: Lotus Domino & DB2 & JTOpen ,Error invalid port 
> range: as400://
> 
> I`ve got a Problem with Connection Pooling and JTopen 4.9.
> I try to access a DB2 Database from Lotus Domino 6.5.4  using 
> Connection 
> pooling.
> An Agent without Connection Pooling works really fine (if you forget 
> about the Performance ...)
> 
> Below you find the agent Code with the Output including the Error 
> Message "invalid Port Range ... "
> I can't find anything about this error.
> 
> Any Help is really appreciated.
> 
> Tom
> 
> 
> import lotus.domino.*;
> import java.sql.*;
> import com.ibm.as400.access.*;
> 
> public class JavaAgent extends AgentBase {
> 
> 
>     public void NotesMain() {
> 
>         try {
>             Session session = getSession();
>             AgentContext agentContext = session.getAgentContext();
> 
>               AS400JDBCConnectionPoolDataSource dataSource = null;
>                      
>             try {
>                        
> Class.forName("com.ibm.as400.access.AS400JDBCDriver");
>                 } catch(Exception e2) {
>                    
> System.err.println("Class.forName(com.ibm.as400.access.AS400JD
> BCDriver):" 
> + e2.toString());       
>             }
>             try {
>                       dataSource = new 
> AS400JDBCConnectionPoolDataSource("jdbc:as400://17.118.19.15",
> "US","PW");
>                     if (dataSource == null) {
>                         System.out.println("DataSource is NULL");
>                     } else {
>                         System.out.println("DataSource is not NULL");
>                     }
>                 } catch(Exception e2) {
>                    System.err.println("new 
> AS400JDBCConnectionPoolDataSource" + e2.toString());       
>             }       
>        
>             try {
>                     AS400JDBCConnectionPool pool = new 
> AS400JDBCConnectionPool(dataSource);               
>                     if (dataSource == null) {
>                         System.out.println("pool is NULL");
>                     } else {
>                         System.out.println("pool is not NULL");
>                         pool.fill(10);
>                     }
>                 } catch(Exception e2) {
>                    System.err.println("new AS400JDBCConnectionPool" + 
> e2.toString());       
>             }   
> 
> 
>         } catch(Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
> 
> 
> Output of the Agent with Error Message:
> 
> "DataSource is not NULL
> pool is not NULL
> new 
> AS400JDBCConnectionPooljava.lang.IllegalArgumentException: invalid 
> port range: as400://17.118.19.15"


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

This mailing list archive is Copyright 1997-2022 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.