This sounds like the data source for your application server is not
configured correctly. Usually WO will try to connect to a data
source called "DefaultDataSource" when deployed as a WAR (ignoring
whatever is set in the EO Model file settings). There are two
options, defining that data source for the container (i.e. Jetty) or
disabling the use in the web.xml file in the WO project.
This is a snippet of how I defined my data source for Tomcat. This is
inside the tomcat server.xml file inside the <Context/> for my WO
App. Dunno if it's relevant or useful for Jetty, but perhaps others
use Tomcat too. This is actually my settings for my test server, be
sure to check the meanings of the parameters and tweak them as
necessary for a live deployment environment.
<Resource name="jdbc/DefaultDataSource" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/DefaultDataSource">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
<value>some_user_name_here</value>
</parameter>
<parameter>
<name>password</name>
<value>some_password_here</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://staging_host_name.my.domain.com:3306/
testdb?autoReconnect=true</value>
</parameter>
</ResourceParams>
On Nov 22, 2005, at 3:14 PM, Randy Becker wrote:
Hello, I'm trying to deploy my project to a war with jetty. I'm
running into problems connecting to my mysql database in my
deployment environment. I was given a url by my host for the
database configuration i.e. jdbc:mysql://host/database?
user=username&password=password. My local development environment
is set up to use the same settings, (i.e. username and host, etc.)
and works fine. The deployment database is setup correctly, schema-
wise, (via phpmysql) but when I attempt to deploy, and the app
tries to access the database, I get an error like this:
java.lang.IllegalStateException: _obtainOpenChannel --
com.webobjects.eoaccess.EODatabaseContext
[EMAIL PROTECTED]: failed to open
database channel. Check your connection dictionary, and ensure your
database is correctly configured.
What can I do to get my project to deploy correctly?
-Randy
P.S. Apologies if this message is duplicated - I'm seem to be
having trouble with lists.apple.com today...
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list (Webobjects-
[EMAIL PROTECTED])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/webobjects%
40erikwalter.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to [email protected]