• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Connecting to DB with user supplied credentials.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting to DB with user supplied credentials.


  • Subject: Re: Connecting to DB with user supplied credentials.
  • From: Henrique Gomes <email@hidden>
  • Date: Wed, 11 Jun 2008 16:56:07 +0100

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 JDBCAdaptor@16434995
[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 JDBCContext@16175446
[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@hidden> 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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Connecting to DB with user supplied credentials.
      • From: "Lon Varscsak" <email@hidden>
References: 
 >Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Daniele Corti" <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: Henrique Gomes <email@hidden>)
 >Re: Connecting to DB with user supplied credentials. (From: "Lon Varscsak" <email@hidden>)

  • Prev by Date: Re: Connecting to DB with user supplied credentials.
  • Next by Date: Re: Fluffy Bunny + Re: WebObjects Nightly Builds and WOLips addition
  • Previous by thread: Re: Connecting to DB with user supplied credentials.
  • Next by thread: Re: Connecting to DB with user supplied credentials.
  • Index(es):
    • Date
    • Thread