Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

"incompatible versions" error w/ EJB access

47 views
Skip to first unread message

Fahd Alfadli

unread,
Jul 30, 2001, 2:42:49 PM7/30/01
to
I get an "incompatible versions" error when trying to access a 1.1 EJB on
WLS6.1 while getting initial context. The bean was compiled with the 6.1
ejbc. It compiles and deploys, but when trying to access it via a client
class I get the "incompatible versions" error. The client was developed for
WLS 5.1. I would think the client code would not have to change to access
the 1.1 bean on 6.1 but I am probably incorrect.

Do the clients get the context differently on WLS6.1 now? Is the WLS 5.1 way
of getting the context supported for backward compatibility?

Below is my getInitial context method.

private Context getInitialContext() throws Exception {
Hashtable p = new Hashtable();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
p.put(Context.SECURITY_CREDENTIALS, "password");
p.put(Context.SECURITY_PRINCIPAL, "system");

return new InitialContext(p);
}


Here is the Error returned to the console.

javax.naming.CommunicationException. Root exception is
weblogic.socket.UnrecoverableConnectException: [Login failed: 'Incompatible
version:Incompatible versions - this server:6.1.0.0 client:5.1.0]

at weblogic.socket.Login.checkLoginSuccess(Login.java:77)

at weblogic.socket.JVMSocketT3.connect(JVMSocketT3.java:85)

at weblogic.socket.JVMAbbrevSocket.connect(JVMAbbrevSocket.java:160)

at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:282)

at
weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:91
8)

at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)

at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)

at
weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:248)

at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:219)

at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)

at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)

at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)

at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:195)

at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:148)

at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:123)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)

at javax.naming.InitialContext.init(InitialContext.java:222)

at javax.naming.InitialContext.<init>(InitialContext.java:198)

at
com.enron.fairchild.SnapComDataTest.getInitialContext(SnapComDataTest.java:6
0)

at com.enron.fairchild.SnapComDataTest.getStuff(SnapComDataTest.java:22)

at com.enron.fairchild.SnapComDataTest.<init>(SnapComDataTest.java:14)

at com.enron.fairchild.SnapComDataTest.main(SnapComDataTest.java:74)

java.lang.NullPointerException

at com.enron.fairchild.SnapComDataTest.getStuff(SnapComDataTest.java:47)

at com.enron.fairchild.SnapComDataTest.<init>(SnapComDataTest.java:14)

at com.enron.fairchild.SnapComDataTest.main(SnapComDataTest.java:74)

Any ideas,

Thanks in advance

Fahd


Mike Reiche

unread,
Jul 30, 2001, 3:48:37 PM7/30/01
to

We have been told by BEA that 5.1 beans and 6.x beans are not compatible. We have
been told that they will never be.

We have been told that future versions 6.x -> 7.x ... will be.

If you hear different, please let me know.

Mike Reiche

Fahd Alfadli

unread,
Jul 30, 2001, 2:49:08 PM7/30/01
to
Not compatible? SWEET!

"Mike Reiche" <miker...@earthlink.net> wrote in message
news:3b65ac05$1...@newsgroups.bea.com...

Dimitri Rakitine

unread,
Jul 30, 2001, 4:12:35 PM7/30/01
to
Do you have 5.1 classes in your client classpath when you run it? If so,
change your classpath to include 6.1 classes instead.

> return new InitialContext(p);
> }

> at weblogic.socket.Login.checkLoginSuccess(Login.java:77)

> at weblogic.socket.JVMSocketT3.connect(JVMSocketT3.java:85)

> at weblogic.socket.JVMAbbrevSocket.connect(JVMAbbrevSocket.java:160)

> at weblogic.socket.JVMSocketManager.create(JVMSocketManager.java:282)

> at
> weblogic.rjvm.ConnectionManager.findOrCreateSocket(ConnectionManager.java:91
> 8)

> at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:339)

> at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:306)

> at
> weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:248)

> at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:219)

> at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:186)

> at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)

> at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:200)

> at
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
> textFactoryDelegate.java:195)

> at
> weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
> textFactoryDelegate.java:148)

> at
> weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
> ory.java:123)

> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)

> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)

> at javax.naming.InitialContext.init(InitialContext.java:222)

> at
> com.enron.fairchild.SnapComDataTest.getInitialContext(SnapComDataTest.java:6
> 0)

> at com.enron.fairchild.SnapComDataTest.getStuff(SnapComDataTest.java:22)

> at com.enron.fairchild.SnapComDataTest.main(SnapComDataTest.java:74)

> java.lang.NullPointerException

> at com.enron.fairchild.SnapComDataTest.getStuff(SnapComDataTest.java:47)

> at com.enron.fairchild.SnapComDataTest.main(SnapComDataTest.java:74)

> Any ideas,

> Thanks in advance

> Fahd

--
Dimitri

Fahd Alfadli

unread,
Jul 30, 2001, 3:39:21 PM7/30/01
to
thanks, that was one of the contributers to the problem, but it still does
not like the getInitialContext method.
"javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: attempting to add an object which is not an
instance of java.security.Principal to a Subject's Principal Set"

As soon as i figure it out I will post the resolution to this thread.

"Dimitri Rakitine" <d...@dima.dhs.org> wrote in message
news:3b65...@newsgroups.bea.com...

Lisa Klag

unread,
Jul 30, 2001, 5:44:31 PM7/30/01
to

Hey Mike, Whatcha mean by this? I'm having problems with 6.1 and I'm wondering
if it because I am using 5.1 dtds for my beans. This worked OK in 6.0sp2, but
6.1 is a whole 'nother story.

thanks,
lisa

Mike Reiche

unread,
Jul 30, 2001, 8:06:35 PM7/30/01
to

I don't think the dtd's should be a problem. Make sure you rebuild your beans with
ejbc.

There are probably other people around that are more smarter (tm) than me when
it comes to beans in 6.1

mike

mike reiche

unread,
Jul 30, 2001, 8:26:04 PM7/30/01
to

oooh - that was the easy answer - use WLS 6 for your client.

You should be able to do that with any EJB client.

Mike

0 new messages