jSensors icon indicating copy to clipboard operation
jSensors copied to clipboard

Error

Open YiazmaT opened this issue 7 years ago • 4 comments

Hello, I tried to use jSensors for a university project, but I always get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at com.profesorfalken.jsensors.SensorsConfig.(SensorsConfig.java:33) at com.profesorfalken.jsensors.JSensors.(JSensors.java:51) at com.profesorfalken.jsensors.JSensors.(JSensors.java:41) at monitoradordetemperatura.MonitoradorDeTemperatura.main(MonitoradorDeTemperatura.java:25) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 4 more C:\Users\YiazmaT\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 FALHA NA CONSTRUÇÃO (tempo total: 1 segundo)

Any Ideas on how to solve it? I'm just running the basic tests on README. It says that the problem is on this line: Components components = JSensors.get.components(); Thanks!

YiazmaT avatar May 17 '17 13:05 YiazmaT

Hello,

How did you add it to the classpath? Did you use Maven?

If you just download the Jar here: http://mvnrepository.com/artifact/com.profesorfalken/jSensors/1.0.2 make sure that you have also downloaded all the dependencies (titled as 'Compile Dependencies' in the page ) and added them to your classpath.

Best regards

profesorfalken avatar May 17 '17 20:05 profesorfalken

Hello, Sorry for the long time, I use netbeans on a windows 7 laptop. I already add the jar file to my classpath but still have the same error.

Thanks!

YiazmaT avatar Aug 31 '17 23:08 YiazmaT

I've installed the missing jars, and then i got a new error:

Exception in thread "main" java.lang.NoClassDefFoundError: com/profesorfalken/jpowershell/PowerShellNotAvailableException at com.profesorfalken.jsensors.manager.windows.WindowsSensorsManager.getSensorsData(WindowsSensorsManager.java:39) at com.profesorfalken.jsensors.manager.SensorsManager.getComponents(SensorsManager.java:48) at com.profesorfalken.jsensors.SensorsLocator.getComponents(SensorsLocator.java:34) at com.profesorfalken.jsensors.JSensors.components(JSensors.java:73) at monitoradordetemp.MonitoradorDeTemp.main(MonitoradorDeTemp.java:19) Caused by: java.lang.ClassNotFoundException: com.profesorfalken.jpowershell.PowerShellNotAvailableException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 5 more C:\Users\YiazmaT\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 FALHA NA CONSTRUÇÃO (tempo total: 0 segundos)

I'm using windows 7 ultimate, and i already have installed the windows power shell.

YiazmaT avatar Sep 05 '17 02:09 YiazmaT

Hello,

It seems that it does not find the jPowerShell JAR in the classpath at runtime.

profesorfalken avatar Nov 01 '17 08:11 profesorfalken