Thank you Gary.
That worked perfectly for me.

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


-----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.


import lotus.domino.*;
import java.sql.*;

public class JavaAgent extends AgentBase {

   public void NotesMain() {

       try {
           Session session = getSession();
           AgentContext agentContext = session.getAgentContext();

             AS400JDBCConnectionPoolDataSource dataSource = null;
try { Class.forName("");
               } catch(Exception e2) {
System.err.println("Class.forName( BCDriver):" + e2.toString()); }
           try {
dataSource = new AS400JDBCConnectionPoolDataSource("jdbc:as400://",
                   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");
               } catch(Exception e2) {
System.err.println("new AS400JDBCConnectionPool" + e2.toString()); }

       } catch(Exception e) {

Output of the Agent with Error Message:

"DataSource is not NULL
pool is not NULL
new AS400JDBCConnectionPooljava.lang.IllegalArgumentException: invalid port range: as400://"

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-2022 by 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.