Wonder upgrade 6 to 7
Wonder upgrade 6 to 7
- Subject: Wonder upgrade 6 to 7
- From: Rachel Han <email@hidden>
- Date: Thu, 12 Oct 2017 11:51:48 +1100
Hi All,
I am a webobjects developer for a few years now and we have a project which
is about 10 years old, so it is kind of hibernation of legacy and sweetness
of wonder. We were doing wonder upgrade from 6 to 7 and like to share our
experience in the forum so it would be of any help if anyone having the
same issue.
Firstly, of course download wonder7 from jenkins latest build, and copied
all the frameworks over to Library/Frameworks. And then reopen eclipse
oxygen (eclipse caches frameworks, so need to be reopened and then clean
the project), after fixed all the compile error,
Then run the application gave me this exception:
Oct 12 09:21:27 xxx[51032] WARN NSLog - An exception occurred while
trying to open a channel: N/A
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.Exceptions -
Database Exception occured: java.lang.IllegalStateException:
_obtainOpenChannel -- er.extensions.eof.ERXDatabaseContext
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database
channel. Check your connection dictionary, and ensure your database is
correctly configured.
Oct 12 09:21:27 xxx[51032] INFO
er.extensions.eof.ERXDatabaseContextDelegate - xxx: {username = "xxx";
driver = "oracle.jdbc.driver.OracleDriver"; DataSourceJndiName = "xxx";
password = "<password deleted for log>"; URL = "jdbc:oracle:thin:@xxx"; }
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Checking JDBC connection with information {username = "xxx"; driver =
"oracle.jdbc.driver.OracleDriver"; DataSourceJndiName = "xxx"; password =
"<password deleted for log>"; URL = "jdbc:oracle:thin:@xxx"; }
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Trying to create JDBCAdaptor...
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Successfully created adaptor class er.extensions.jdbc.ERXJDBCAdaptor
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Trying to create plugin...
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Created plugin class com.webobjects.jdbcadaptor.EROraclePlugIn
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Trying to load JDBC driver oracle.jdbc.driver.OracleDriver...
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Successfully loaded JDBC driver oracle.jdbc.driver.OracleDriver
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
JDBC driver and plugin are loaded, trying to connect...
Oct 12 09:21:27 xxx[51032] INFO er.transaction.adaptor.ConnectionAnalyzer -
Error: Exception thrown while connecting.
Check exception message carefully.
Oct 12 09:21:27 xxx[51032] ERROR er.transaction.adaptor.ConnectionAnalyzer -
No connection.
Oct 12 09:21:27 xxx[51032] WARN NSLog - A fatal exception occurred:
_obtainOpenChannel -- er.extensions.eof.ERXDatabaseContext
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database
channel. Check your connection dictionary, and ensure your database is
correctly configured.
[2017-10-12 9:21:27 AEDT] <main> java.lang.IllegalStateException:
_obtainOpenChannel -- er.extensions.eof.ERXDatabaseContext
er.extensions.eof.ERXDatabaseContext@4e31276e: failed to open database
channel. Check your connection dictionary, and ensure your database is
correctly configured.
at com.webobjects.eoaccess.EODatabaseContext._obtainOpenChannel(
EODatabaseContext.java:1967)
Then, for the purpose of pinpointing exactly which framework is causing
this error, I tried to upgrade the frameworks batch by batch. so firstly I
upgraded all frameworks in wonder/core, and again reopen eclipse and clean,
the application started up ok. Secondly, I upgraded all frameworks in
EOAdaptor, the application did not start up and gave me the error, so it is
obviously one of the frameworks in EOAdaptor is causing the issue. At this
moment, everything looks simple enough, we only were using
JavaERJDBCAdaptor framework.
After comparing everything in the JavaERJDBCAdaptor framework between
wonder6 and wonder7, only one difference is in the info.plist file
in wonder7, these two lines were added:
<key>NSPrincipalClass</key>
<string>er.jdbcadaptor.PrincipalClass</string>
From my understanding (or guessing) is that, at runtime, anytime there is a
NSPrincipalClass instance, the wonder will replace it with a
er.jdbcadaptor.PrincipalClass instance.
Anyway, after removed these 2 lines, the application started up correctly.
Obviously this is not a common circumstance, but hopefully, if anyone is
having the same issue, then they could try to tackle it using the similar
method.
And also, if anyone would help me understand how this info.plist get built
into the wonder framework package, it would be really appreciated.
Thanks in advance.
Cheers,
Rachel
_______________________________________________
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