pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Magosányi Árpád <mag@magwas.rulez.org>
To: pgsql-jdbc@postgresql.org
Subject: Datasource portNumber property
Date: Fri, 23 Dec 2011 16:12:58 +0100
Message-ID: <4EF49A7A.6080204@magwas.rulez.org> (raw)

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?




view thread (2+ messages)  latest in thread

Message-ID: <4EF49A7A.6080204@magwas.rulez.org>
Permalink:  ../4EF49A7A.6080204@magwas.rulez.org/
Also on:    postgresql.org/message-id/4EF49A7A.6080204@magwas.rulez.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mag@magwas.rulez.org
  Subject: Re: Datasource portNumber property
  In-Reply-To: <4EF49A7A.6080204@magwas.rulez.org>
  References: <4EF49A7A.6080204@magwas.rulez.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox