• 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: No database connection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No database connection


  • Subject: Re: No database connection
  • From: Daniel Brajkovic <email@hidden>
  • Date: Wed, 1 Aug 2007 16:03:26 -0500

Sure, sorry about that. After one builds his application and creates his .jsp file per Apple's docs, one of the products in the Servlet Resources->WEB-INF folder will be a doc called web.xml. In it you will find the following:

<resource-ref>
<description>The data source to be used by EOF. If there are multiple data sources,
then the definition below must be used to configure which JDBC URL (Model) should
use which data source. If EOF should use a JDBC driver directly, this section must be commented out</description>
<res-ref-name>jdbc/DefaultDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>


Since I used XCode to create my EOModel and I specified the connection in it when i set it up, I just commented this section out as it says to do in the description. And Viola! my app works beautifully.

Sidebar, I've seen some posts (including my own) about how to use WebObjects with OpenLaszlo. While I am sure there are several different ways (SOAP, XML-RPC, etc) I am using JSP as a go between. So far I got it to populate a window of info from a WebObjects component. Next step (no pun intended) will be to invoke direct actions (e.g. add, edit, delete). Should have that test done tonight.

If there's an easier way, I could find no tutorial or combination of tutorials to show me the way.

On Aug 1, 2007, at 3:47 PM, Chuck Hill wrote:

Can you post what was wrong so that others can benefit from it in the future?

Thanks
Chuck


On Aug 1, 2007, at 1:34 PM, Daniel Brajkovic wrote:

Figured it out. Had to comment out a section in the web.xml file. It works now. Thanks.


On Aug 1, 2007, at 1:42 PM, Chuck Hill wrote:

It is probably a classpath problem: lack of JDBC driver or lack of EOF plugin. Try adding the attached class and see if it tells you anything useful.

Chuck

<EOFJDBCConnectionAnalyzer.java>


On Aug 1, 2007, at 11:28 AM, Daniel Brajkovic wrote:

This is killing me and it's holding up my entire project.

I have written a simple WO app and it works fine when i build and run it. But I want it to wo works with JavaServer Pages and so I am deploying it in a servlet. A simple Hello World app works fine. But as soon as I try to access a db app I get this:

Error: java.lang.IllegalStateException: _obtainOpenChannel -- com.webobjects.eoaccess.EODatabaseContext com.webobjects.eoaccess.EODatabaseContext@6a08e5: failed to open database channel. Check your connection dictionary, and ensure your database is correctly configured.

Does anyone know how to fix this?

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


This email sent to email@hidden


--

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/products/practical_webobjects









--

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/products/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
References: 
 >No database connection (From: Daniel Brajkovic <email@hidden>)
 >Re: No database connection (From: Chuck Hill <email@hidden>)
 >Re: No database connection (From: Daniel Brajkovic <email@hidden>)
 >Re: No database connection (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: No database connection
  • Next by Date: Re: Concurrency question
  • Previous by thread: Re: No database connection
  • Next by thread: EMMA Testing
  • Index(es):
    • Date
    • Thread