java.lang.UnsupportedClassVersionError: javax/management/InvalidAttributeValueException (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at weblogic.rmi.internal.ClientRuntimeDescriptor.<clinit>(ClientRuntimeDescriptor.java:52)
at weblogic.jndi.WLInitialContextFactoryDelegate.<clinit>(WLInitialContextFactoryDelegate.java:180)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:131)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at gg.ejb.testW.main(Unknown Source)
Exception in thread "main"
我的情况说这样的:
本地有一个EJB工程,有一个客户端工程调用这个EJB工程。
myeclipse6.0,weblogic8.1,ejb2.0,jdk1.4
报出这个异常的原因是我的客户端工程建立的时候是用的jdk1.5,后来我用jdk1.4重新建立一个工程,再把原来客户端工程的代码复制过来就OK了。