问题jetty 7.4和eclipse遇到了javax / transaction / UserTransaction问题

时间:2011-08-25 18:00:54

标签: java eclipse jetty

Jetty jetty-hightide-7.4.5.v20110725 Eclipse helios jdk 1.6

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
    at org.eclipse.jetty.start.Main.start(Main.java:612)
    at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
    at org.eclipse.jetty.start.Main.main(Main.java:79)
Caused by: java.lang.NoClassDefFoundError: javax/transaction/UserTransaction
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructors(Class.java:1459)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:742)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:377)
    at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:329)
    at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:285)
    at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1185)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1120)
    ... 8 more
Caused by: java.lang.ClassNotFoundException: javax.transaction.UserTransaction
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 18 more

Usage: java -jar start.jar [options] [properties] [configs]
       java -jar start.jar --help  # for more information

java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.jetty.start.Main.invokeMain(Main.java:469) at org.eclipse.jetty.start.Main.start(Main.java:612) at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265) at org.eclipse.jetty.start.Main.main(Main.java:79) Caused by: java.lang.NoClassDefFoundError: javax/transaction/UserTransaction at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructors(Class.java:1459) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(XmlConfiguration.java:742) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:377) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:329) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:285) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1185) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1120) ... 8 more Caused by: java.lang.ClassNotFoundException: javax.transaction.UserTransaction at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 18 more Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information

1 个答案:

答案 0 :(得分:0)

似乎缺少Java Transaction API。您可以尝试下载相应的JAR file manually并将其放在Jetty的lib目录中。