dcsimg
helloworld ejb on Weblogic8.1 problem..????
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   clear_me
Posted On:   Thursday, January 8, 2004 09:46 PM

Hi, I installed weblogic8.1 on my win-XP. Using weblogic Builder (comes with weblogic8.1) I deployed the beans, and when running stateless session client on dos prompt Im getting the below Exception, Please clear the doubt.. Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/securi y/auth/callback/CallbackHandler (Unsupported major.minor version 48.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknow   More>>
			


Hi,

I installed weblogic8.1 on my win-XP.
Using weblogic Builder (comes with weblogic8.1)
I deployed the beans, and when running
stateless session client on dos prompt
Im getting the below Exception, Please clear the doubt..

Exception in thread "main" java.lang.UnsupportedClassVersionError: javax/securi
y/auth/callback/CallbackHandler (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCon
extFactory.java:131)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext. (Unknown Source)
at HelloClient.getInitialContext(HelloClient.java:58)
at HelloClient.main(HelloClient.java:19)

---------------------------------------------
here is my client program:
----------------------------------------------
import javax.ejb.*;
import java.rmi.RemoteException;
import java.util.*; //Properties
import javax.naming.*; //Context,InitialContext
import javax.rmi.*; //PortableRemoteObject

import SessionBeanSamples.HelloHome;
import SessionBeanSamples.HelloRemote;

public class HelloClient{
public static void main(String args[]){
try{

Context ctx = getInitialContext();
Object obj = ctx.lookup("Hello1");
HelloHome hh = (HelloHome)
PortableRemoteObject.narrow(obj,HelloHome.class);
HelloRemote hr = hh.create();
}catch(Exception e){
e.printStackTrace();
}
}

static String user = "user1";
static String password = "pass";
static String URL = "t3://localhost:7001";




/**
* Gets an initial context.
*
* @return Context
* @exception java.lang.Exception if there is
* an error in getting a Context
*/
public static Context getInitialContext() throws Exception{

Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
prop.put(Context.PROVIDER_URL,URL);
prop.put(Context.SECURITY_PRINCIPAL,user);
prop.put(Context.SECURITY_CREDENTIALS,password);
InitialContext intctx = new InitialContext(prop);
return intctx;


}

}
   <<Less
About | Sitemap | Contact