Hi Rachel, One clarification: the NSPrincipal class in a bundle (.framework usually), is loaded and initialized (static init done) when NSBundle loads the bundle at the start of application launch. That class can then do any runtime configuration that the bundle needs. Something in er.jdbcadaptor.PrincipalClass must be doing something that affects your database connections, check the code to see what.
This file is generated from the (from memory) woantbuild.properties file in the framework. Or maybe wobuild.properties. Chuck From: Webobjects-dev <webobjects-dev-bounces+chill=gevityinc....@lists.apple.com> on behalf of Rachel Han <rachel....@vmlabs.id.au> Date: Wednesday, October 11, 2017 at 5:52 PM To: "webobjects-dev@lists.apple.com" <webobjects-dev@lists.apple.com> Subject: Wonder upgrade 6 to 7 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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com