2

I'm trying to restart an old project that I had to go back into when my server died. This project goes out and reads a couple of hardware sensors through a USB hardware interface and it DID work, the last time I compiled and ran it. That was over a year ago, though, against an old JDK (probably 1.6) and an old version of Tomcat (probably 6). This time, using Java 8 and Tomcat 8, I get a truly horrendous error when my new Tomcat install tries to start up:

    CRIT: Couldn't get method ID <init> from tagLossEvent_class
    Exception in thread "localhost-startStop-1" java.lang.NoSuchMethodError: <init>
            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
            at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
            at java.lang.Runtime.loadLibrary0(Runtime.java:870)
            at java.lang.System.loadLibrary(System.java:1122)
            at com.phidgets.Phidget.<clinit>(Phidget.java:26)
            at com.electricgearbox.temperature.PhidgetSensor.<init>(PhidgetSensor.java:33)
            at com.electricgearbox.temperature.PhidgetSensor.getInstance(PhidgetSensor.java:45)
            at com.electricgearbox.temperature.TempServletListener.contextInitialized(TempServletListener.java:21)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4811)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
            at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
            at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at java.lang.Thread.run(Thread.java:745)

It causes the whole JDK to shut down. Has anyone seen anything like this, and do you know how I could fix this problem?

user1071914
  • 3,295
  • 11
  • 50
  • 76
  • which version of `phidget.jar` you using ? – Sanjeev Jul 11 '16 at 05:53
  • @user1071914: you may want to check: http://stackoverflow.com/questions/35186/how-do-i-fix-a-nosuchmethoderror – Hoàng Long Jul 11 '16 at 06:06
  • Thanks to @Sanjeev, that was the problem. I had an old version of the jar in the project. The vendor doesn't include an actual version number, or anything like that - I wound up unpacking the jar and comparing class file sizes. Whew! If you would like to post your comment as an answer I will be happy to mark it correct. – user1071914 Jul 12 '16 at 01:26

1 Answers1

1

This usually happens when external library jar is not compatible with the upgraded java version, please check version of phidget.jar and upgrade it to latest.

Hope this helps.

Sanjeev
  • 9,876
  • 2
  • 22
  • 33