For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 2 voices, and was last updated 21 years, 11 months ago by
Scott Anderson.
-
AuthorPosts
-
harryajhMemberUsing myeclipse 2.6.00, eclipse 2.1.2, weblogic 6.1
I have a ear app with one ejb & one web component. From the web comp I can locate the ejb via jndi & as long as I’m using jdk 1.3.1 it works perfectly (even debugging which I thought you needed jdk 1.4 for?).
However if I switch to jdk 1.4 (from within eclipse) this statement –
SecurityBeanHome home = (SecurityBeanHome) PortableRemoteObject.narrow(result, SecurityBeanHome.class);
produces this error –
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27
.
.
.I’d like to use “Hot swap” feature in jdk 1.4 but just can’t get this to work – is it because I’m using wl 6.1 or wot?
many thanks
harry
March 5, 2004 at 1:57 pm #204344
Scott AndersonParticipantHarry,
When you say that you switch to JDK 1.4, do you mean as the default JRE for the workspace or as the launch JDK you configure in the WebLogic connector, or both? If you’re only doing it in the connector when you launch WebLogic, you’re effectively running a 1.3.1-compiled application on a 1.4 runtime. While this *should* work, it may be the source of the problem. I’d set both the default workspace JDK and the one used by the WebLogic connector to be the same one, and I’d recommend 1.4.1, not 1.4.2, due to bugs we’ve seen in its debugging implementation.
Default JRE is at Window > Preferences > Java > Installed JREs. Note that changing this will rebuild your entire workspace.
March 6, 2004 at 9:55 am #204379
harryajhMemberInstalled 1.4.1 as you suggested – no difference – what’s puzzling is this
// This works fine
Context ctxt = new InitialContext();
SecurityBeanHome home = (SecurityBeanHome ) ctxt.lookup(“ejb/SecurityBeanHome”);oSecurity = home.create();
// But this
Context ctxt2 = new InitialContext();
Object result = ctxt2.lookup(“ejb/SecurityBeanHome”);// generates java.lang.ExceptionInInitializerError
SecurityBeanHome home2 = (SecurityBeanHome) PortableRemoteObject.narrow(result, SecurityBeanHome.class);Probably doing something really daft?
March 6, 2004 at 4:53 pm #204388
Scott AndersonParticipantWell, you’re not alone seeing this with WebLogic. I found this:
http://groups.google.com/groups?q=PortableRemoteObject+ExceptionInInitializerError&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3c9ae082%40newsgroups.bea.com&rnum=1but, this one looks to have the reason:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3df9be1a%241%40newsgroups.bea.com&rnum=3&prev=/groups%3Fq%3DPortableRemoteObject.narrow%2BExceptionInInitializerError%2Bweblogic%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D3df9be1a%25241%2540newsgroups.bea.com%26rnum%3D3March 7, 2004 at 4:50 am #204399
harryajhMemberthanks for that scott, so they changed the classnames? – why? – idiots!
March 7, 2004 at 10:57 am #204402
Scott AndersonParticipantBecause they own Java and can do whatever they want with it. 😉
I do however agree that it was a dumb thing to do. -
AuthorPosts
