Maven, two apps with direct connect SSL, one works
Maven, two apps with direct connect SSL, one works
- Subject: Maven, two apps with direct connect SSL, one works
- From: Ramsey Gurley <email@hidden>
- Date: Wed, 06 Apr 2016 17:59:30 -0700
Hi all,
Weird problem. I have two apps. App1 works with SSL direct connect, in eclipse with maven and without. App2 works with SSL direct connect without maven. With maven, the SSL direct connect properties I have in Properties.dev are not located.
The reason that happens is in ERXApplication _addAdditionalAdaptors, sslEnabled() is returning false. Properties.dev is the same for both, so I start digging. Why is it false for App2? It turns out the properties are not loaded, because in ERXApplication.Loader.mainBundle(), ClassPath.get(NSBundle.class) turns out to be null and InitMainBundle isn’t fired.
Well, why is that? Because in NSBundle, at line 315 in a static initializer block, a call to LoadBundlesFromJars ends up calling NSBundle.addBundle. This fires a NSBundleDidLoadNotification which triggers the above behavior before ClassPath is loaded at line 339 in that same static initializer block.
In App1, *there is no observer* for this notification at L315. It makes it all the way to NSBundle L341 where LoadBundlesFromClassPath is fired, which then ends up firing the notification to a now existent observer.
What’s really weird is at the last line of ERXApplication.Loader(String[]) constructor, there’s a addObserver for the NSBundleDidLoadNotification. Setting breakpoints, I can see that is done before NSBundle is referenced in both App1 and App2. I see no place where removeObserver is ever called on the application, so I’m totally puzzled.
Does any of this sound familiar to anyone?
In the non maven branch, I’m just starting to look, but the line numbers are not lining up. It looks like the old build is finding NSBundle in JavaFoundation while the Maven build finds it in ERFoundation.
Thanks,
Ramsey
_______________________________________________
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