Funny, the first connectWithModelNamed throws a NPE, but the second invocation I put on the catch wasn't even necessary. If I only invoke it once, swallow the NPE and continue to fetch some EOs, a connection is then started with the provided credentials...

[2008-6-11 16:41:54 WEST] <WorkerThread3> Using JDBCPlugIn 'PostgresqlPlugIn' for [EMAIL PROTECTED] [2008-6-11 16:41:54 WEST] <WorkerThread3> connecting with dictionary: {plugin = "PostgresqlPlugIn"; username = "hgomes"; driver = ""; password = "<password deleted for log>"; URL = "jdbc:postgresql:// server/db"; }
java.lang.NullPointerException
at com .webobjects .eoaccess .EODatabaseContext.forceConnectionWithModel(EODatabaseContext.java:1139) at com .webobjects .eoaccess.EOUtilities.connectWithModelNamed(EOUtilities.java:840)
.....
[2008-6-11 16:42:4 WEST] <WorkerThread3> fetching JDBC Info with [EMAIL PROTECTED] [2008-6-11 16:42:4 WEST] <WorkerThread3> connecting with dictionary: {plugin = "PostgresqlPlugIn"; username = "hgomes"; driver = ""; password = "<password deleted for log>"; URL = "jdbc:postgresql:// server/db"; } [2008-6-11 16:42:18 WEST] <WorkerThread3> === Begin Internal Transaction [2008-6-11 16:42:18 WEST] <WorkerThread3> evaluateExpression: <com.webobjects.jdbcadaptor.PostgresqlExpression: "SELECT ....

Why does the invocation of connectWithModelNamed throw an exception and subsequent uses of the EditingContext work??

Henrique Gomes

On Jun 11, 2008, at 4:25 PM, Lon Varscsak wrote:

To clarify, you want each session to have it's own connection to the database?

Lon

On Wed, Jun 11, 2008 at 7:50 AM, Henrique Gomes <[EMAIL PROTECTED]> wrote:


On Jun 11, 2008, at 3:41 PM, Daniele Corti wrote:

But, were you connected to a DB before calling
EOUtilities.connectWithModelNamed?




I restart the app and only see this message *after* calling
EOUtilities.connectWithModelNamed :

<WorkerThread0> Using JDBCPlugIn 'PostgresqlPlugIn' for JDBCAdaptor

So I guess not?

---
Henrique Gomes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/varscsak%40smarthealth.com

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lists%40farol.pt

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to