On Jun 26, 2009, at 8:51 AM, John Pollard wrote:
Thanks to all who replied, I can't say how useful your help is.
The ERXJDBCConnectionAnalyzer gave a beautiful account of what was
going on, so much so that I want to hug the class as well as Chuck.
I am not sure that I want a hug, but you are welcome. Let this be a
lesson: you can benefit from Wonder WITHOUT extending ERXApplication
and friends.
Terse error messages that act like a guard to a room of treasure
bring about the opposite emotions. For the enjoyment of all, here is
what this helpful class had to report:
- Trying to create JDBCAdaptor...
- Successfully created adaptor com.webobjects.jdbcadaptor.JDBCAdaptor
- Trying to create plugin...
- Created plugin com.webobjects.jdbcadaptor.MySQLPlugIn
- Trying to load JDBC driver com.mysql.jdbc.Driver...
- Error: Failed to load JDBC driver class com.mysql.jdbc.Driver
- The JDBC driver jar is either missing from (a) your classpath or
(b) the JRE extensions directory/ies.
- The classpath being used is:
- file:/Library/WebObjects/Applications/MPMall.woa/Contents/
Resources/Java/
- file:/Library/WebObjects/Applications/MPMall.woa/Contents/
Resources/Java/mpmall.jar
- file:/Library/Frameworks/MPServerEOs.framework/Resources/Java/
mpservereos.jar
- file:/Library/Frameworks/InraxEOModel.framework/Resources/Java/
inraxeomodel.jar
- file:/Library/Frameworks/MPGoogleCheckout.framework/Resources/Java/
mpgooglecheckout.jar
- file:/System/Library/Frameworks/JavaWOExtensions.framework/
Resources/Java/javawoextensions.jar
- file:/System/Library/Frameworks/JavaWebObjects.framework/Resources/
Java/javawebobjects.jar
- file:/System/Library/Frameworks/JavaFoundation.framework/Resources/
Java/javafoundation.jar
- file:/System/Library/Frameworks/JavaXML.framework/Resources/Java/
javaxml.jar
- file:/System/Library/Frameworks/JavaEOAccess.framework/Resources/
Java/javaeoaccess.jar
- file:/System/Library/Frameworks/JavaEOControl.framework/Resources/
Java/javaeocontrol.jar
- file:/System/Library/Frameworks/JavaJDBCAdaptor.framework/
Resources/Java/javajdbcadaptor.jar
- The JRE extension directories being used are:
- /Library/Java/Extensions:/System/Library/Java/Extensions:/System/
Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext
The missing jar is in /Library/WebObjects/Extensions on the
deployment box (oops, this is different to my deployment box).
Clearly somehow my previous build was picking this up, my recent
build not for some reason. I have tried to banish use of these
extensions directories but completely failed to get linking working
when bundling all jars into a framework.
It does not look like anything from /Library/WebObjects/Extensions is
on the classpath and I would expect it to be there. Check the
permissions on that directory.
Chuck
On 25 Jun 2009, at 19:01, Chuck Hill wrote:
On Jun 25, 2009, at 10:40 AM, John Pollard wrote:
Dave/Timo/Chuck, thank you for your replies.
I am not using Wonder.
This is a fine time to start! :-) It is a stand alone class.
<ERXJDBCConnectionAnalyzer.java>
Chuck
I have added logging of the DB connection parameters in the (first
and only) model within the EOModelGroup, and the bits I set seem
to come out as expected:
driver = "com.mysql.jdbc.Driver"; URL = "jdbc:mysql://localhost/
MPDB2?
user
=
root
&capitalizeTypeNames
=true&useUnicode=true&characterEncoding=UTF-8"; }
(I cut out the password)
The log line spitting out the whole model connection dictionary is
huge, but the above seem to be key bits contained in it.
Unfortunately I can't compare with the previous application
release because that didn't have the logging line in it. If I get
my powermac back from the repairers, I could add the log line to
compare. But the key values look right to me.
This same EOModel framework works ok with the previous build of
the application. To me that seems to show that the model framework
and settings is not under suspicion itself as I can use it and it
works.
The same EOModel framework has always worked fine, connecting to a
mysql database. The problem below is when the new build
application is used, so it seems to be a problem with how that
application makes use of my model framework rather than the model
framework itself. So the Properties idea seems quite a good one as
that seems to be one way to tell the application to ignore the
framework connection info. Do we know of any changes in wolips
with picking up db connection properties?
All works in development ok, so it is a deployment issue.
John
On 25 Jun 2009, at 17:41, David Avendasora wrote:
Can you paste the connection information here from the EOModel?
What type of DB is it? Is there any way that there are some
permissions on the DB that keep this instance from connecting?
Dave
On Jun 25, 2009, at 12:34 PM, John Pollard wrote:
Ah yes, I was just reading the thread about Properties on the
dev list, but no, the app Properties file only has commented out
property lines in it. Thanks for the idea though.
On 25 Jun 2009, at 17:01, David Avendasora wrote:
On Jun 25, 2009, at 8:07 AM, John Pollard wrote:
Hi List,
I maintain a separate framework containing the model
definition which has worked well.
My powerpc g5 recently died so I have switched to another Mac.
In development all is well, but on deployment I now get this:
...
[2009-6-25 11:42:8 GMT] <main> Model loaded is: <EOModelGroup
( ( Inrax,
file:/Library/Frameworks/InraxEOModel.framework/Resources/
Inrax.eomodeld ) )>
...
[2009-6-25 11:42:8 GMT] <main> Waiting for requests...
[2009-6-25 11:42:8 GMT] <MPMallSessionMonitor> An exception
occurred while trying to open a channel: N/A
Exception in thread "MPMallSessionMonitor"
java.lang.IllegalStateException: _obtainOpenChannel --
com.webobjects.eoaccess.EODatabaseContext
com.webobjects.eoaccess.eodatabasecont...@1e037a: failed to
open database channel. Check your connection dictionary, and
ensure your databa
se is correctly configured.
at
com
.webobjects
.eoaccess
.EODatabaseContext._obtainOpenChannel(EODatabaseContext.java:
1967)
at
com
.webobjects
.eoaccess
.EODatabaseContext
._objectsWithFetchSpecificationEditingContext
(EODatabaseContext.java:3054)
...
The first line correctly shows the InraxEOModel.framework
where the model is lurking but then later it fails to connect.
Under what circumstances might the model framework be found
ok, but the database connection fail (when I know the database
is ok)?
I don't think the fault lies with the model framework because
I can use this newly deployed framework with the previously
deployed applications and it works fine.
So something must have changed in the way the newly built
application tries to do the database connection (works in
development, not in deployment).
Is there anything in the application's Properties file that is
overriding the connection info?
Is there any more logging I can do, or checks within the
deployed application files to see what is causing the failure.
I have moved to the latest stable wolips which may be one
difference, though I was already on the hotness.
Thanks,
John
_______________________________________________
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/webobjects%40avendasora.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/webobjects%40avendasora.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/chill%40global-village.net
This email sent to [email protected]
--
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/products/practical_webobjects
_______________________________________________
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/chill%40global-village.net
This email sent to [email protected]
--
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/products/practical_webobjects
_______________________________________________
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]