Solder exception after "java -jar start.jar"

When starting java -jar start.jar , the following error appears. sudo service jetty start works just fine. What is the problem? No deployable webapps, new installation. I modified the file / etc / default / jetty to enable the start of the service.

 wissen12@wissen12 :/usr/share/jetty$ java -jar start.jar 7 [main] INFO org.mortbay.util.FileResource - Checking Resource aliases 396 [main] WARN org.mortbay.xml.XmlConfiguration - EXCEPTION java.lang.NoSuchMethodException: class org.mortbay.jetty.Server.setThreadPool(class org.mortbay.thread.QueuedThreadPool) at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:417) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:231) at org.mortbay.xml.XmlConfiguration.newInstance(XmlConfiguration.java:198) at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:880) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.mortbay.start.Main.invokeMain(Main.java:194) at org.mortbay.start.Main.start(Main.java:534) at org.mortbay.start.Main.start(Main.java:441) at org.mortbay.start.Main.main(Main.java:119) 

Thanks.

+4
source share
2 answers

I had the same problem. Upgrading from Jetty 7.1.x to 7.4.x solved it. Looking at the source code, it looks like Jetty XML bean processing has added a lot more fallback cases for inaccurate type matching in setters.

+1
source

There are two possibilities that stand out as the most likely cause:

  • The server configuration file (jetty.xml) that you are using does not match the version of Jetty that you are using.

  • Versions match, but setThreadPool throws an exception that gets lost

The second seems more likely, so you should follow the instructions on this page http://docs.codehaus.org/display/JETTY/Debugging to enable registration of the "ignored exception".

I expect you to find that during a call to "Server.setThreadPool" an exception is thrown that is "ignored" and treated as an "NoSuchMethod" exception.

0
source

Source: https://habr.com/ru/post/1333195/


All Articles