Re: WebObjects and MS SQLServer 2012
Re: WebObjects and MS SQLServer 2012
- Subject: Re: WebObjects and MS SQLServer 2012
- From: Chuck Hill <email@hidden>
- Date: Sat, 22 Sep 2012 09:30:40 -0700
Hi Anil,
On 2012-09-22, at 12:00 AM, Anil Bajaj wrote:
> On Sep 21, 2012, at 8:39 PM, Chuck Hill <email@hidden> wrote:
>
>> Hi Anil,
>>
>> On 2012-09-21, at 5:34 AM, Anil Bajaj wrote:
>>
>>> Hi,
>>>
>>> We are trying to upgrade our DB to SQLServer 2000 to SQLServer 2012 (yeah, it's a huge leap), and I'm having a bit of trouble getting it going.
>>>
>>> I've installed Microsoft's jdbc driver sqljdbc4.jar in /Library/Java/Extensions.
>>>
>>> And setup the connection dictionary as follows:
>>>
>>> URL: jdbc:sqlserver://tracker_host:1433;databaseName=Tracker
>>> Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
>>>
>>> When I run the app, I get the following database exception:
>>>
>>> 1102 [main] INFO er.transaction.adaptor.Exceptions - Database Exception occured: java.lang.IllegalStateException: _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext com.webobjects.eoaccess.EODatabaseContext@17bf9b45: failed to open database channel. Check your connection dictionary, and ensure your database is correctly configured.
>>> 1109 [main] INFO er.extensions.eof.ERXDatabaseContextDelegate - WOTracker: {username = "ACG"; driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; password = "<password deleted for log>"; URL = "jdbc:sqlserver://tracker_host:1433;databaseName=Tracker"; }
>>> 1110 [main] INFO er.transaction.adaptor.ConnectionAnalyzer - Checking JDBC connection with information {username = "ACG"; driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; password = "<password deleted for log>"; URL = "jdbc:sqlserver://tracker_host:1433;databaseName=Tracker"; }
>>
>> Is there nothing else? That last message comes from er.extensions.jdbc.ERXJDBCConnectionAnalyzer which should diagnose the problem for you. If it just stops... It must be blocking on
>> EOObjectStoreCoordinator.defaultCoordinator().lock();
>>
>> Which suggests that it is happening too late and some other thread has that locked. You could try triggering some database access earlier in app startup to see if you can get better information.
>>
>> Has the driver name or package changed? Could it be trying to load it from an older JDBC driver that is finding someplace? Though I would expect /Library/Java/Extensions to win over anything else.
>>
>>
>>
>>> Am I missing anything? Like a JDBC Driver plugin or something?
>>
>> WebObjects comes with a plugin. There is an extension in Wonder:
>> com.webobjects.jdbcadaptor.ERXMicrosoftPlugIn
>>
>> I have not tried that with SQLServer 2012 but I don't see why it would not work.
>
> I was able to resolve it after configuring it to use the ERXMicrosoftPlugIn. Although I was not able to find this in Wonder, I found a copy of it in the MicrosoftPlugIn.framework which I was able to find on the web. Seems to be missing in the Wonder distribution.
>
> Thanks for all your help,
Right! Now I remember. I wrote it and it was originally in Wonder and then I had to remove it. You can find the master here:
http://www.global-village.net/chill/ms_sql_server_eof_plugin
Now that Wonder is 5.4.3 only, I should add that back in. Thanks for the reminder.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects
_______________________________________________
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