I coded an application, which works perfectly in eclipse. But when I want to start this over an *.bat, the InitialContext Method doesn't work - it seems it gets stuck.
private MyLocator() throws MyLocatorException | { | try | { | Properties jndiProps = new Properties(); | String myServer = "localhost"; | jndiProps.setProperty("java.naming.factory.initial", | "org.jnp.interfaces.NamingContextFactory"); | jndiProps.setProperty("java.naming.provider.url", myServer); | jndiProps.setProperty("java.naming.factory.url.pkgs", | "org.jboss.naming:org.jnp.interfaces"); | | System.out.println("MyLocator: InitialContext is initialised..."); | context = new InitialContext(jndiProps); | System.out.println("MyLocator: InitialContext was initialised."); | } | catch (Exception e) | { | throw new MyLocatorException("InitialContext failed"); | } | } The first System.out is printed but the second System.out isn't shown not an exception thrown either. After the executing thread is reactivated after a period of time, I receive: java.lang.UnsupportedClassVersionError: org/jboss/logging/Logger (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 org.jnp.interfaces.NamingContext.<clinit>(NamingContext.java:101) | at org.jnp.interfaces.NamingContextFactory.getInitialContext(NamingContextFactory.java:41) | 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.<init>(Unknown Source) | at test.mail.MyLocator.<init>(MyLocator.java:52) | at test.mail.MyLocator.getInstance(MyLocator.java:70) | at test.mail.MyImp.<init>(MyImp.java:89) | at test.mail.DoImp.handleImport(DoImp.java:77) | at test.mail.MyThread.run(MyThread.java:68) | The classpath is correct and the needed class and *.jars are available. => So where's the bug? [The applications works properly in eclipse!)] Why is the exception just thrown in the 2nd "run" and why does the application "seize"? Thanks in advance ADICKO View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3855365#3855365 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3855365 ------------------------------------------------------- This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user