Skip site navigation (1) Skip section navigation (2)

Datasource portNumber property

From: Magosányi Árpád <mag(at)magwas(dot)rulez(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Datasource portNumber property
Date: 2011-12-23 15:12:58
Message-ID: 4EF49A7A.6080204@magwas.rulez.org (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi!

I need to define the port number in a cdo-server.xml file.
I was trying the following forms:
<dataSource
                                 
class="org.postgresql.ds.PGSimpleDataSource"
                                 url="jdbc:postgresql://127.0.0.1:5433/" 
databaseName="cdo"
                                 user="cdo" password="cdo"/>

In this case the application tries to connect to port 5432.

<dataSource
                                 
class="org.postgresql.ds.PGSimpleDataSource"
                                 url="jdbc:postgresql://127.0.0.1/" 
databaseName="cdo" portNumber="5433"
                                 user="cdo" password="cdo"/>

in this case I get:
java.lang.IllegalArgumentException: Value of property portNumber can not 
be assigned to type int
org.eclipse.net4j.db.DBException: java.lang.IllegalArgumentException: 
Value of property portNumber can not be assigned to type int

Any hint to solve the problem?


Responses

pgsql-jdbc by date

Next:From: Dave CramerDate: 2011-12-23 15:40:13
Subject: Re: Datasource portNumber property
Previous:From: Oliver JowettDate: 2011-12-23 01:56:49
Subject: Re: Bug: Transaction still open after error when autocommit=true

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group