noclassdeffounderror

java.lang.NoClassDefFoundError解决方案

我的梦境 提交于 2019-11-30 18:57:29
首先:java.lang.NoClassDefFoundError是运行是错误,编译的时候不报错。这与 java.lang.ClassNotfoundException是不一样的。 解决方法 第一种,也是新手容易犯的错误,那就是classpath环境变量配置错误.这个错误在我最开始学习android的时候就遇到过,弄的焦头烂额的. 解决办法 : 在系统环境变量那一栏中点->新建classpath。 变量名:classpath 变量值: .;%JAVA_HOME%/lib/;%JAVA_HOME%/jre/lib/ ( 注意, CLASSPATH 最前面是有个 “.” 的,表示当前目录,这样当我们运行 javaAClass 的时候,系统就会先在当前目录寻找 AClass 文件了。 ) 第二种,环境变量配置正确,但加载第三方包的时候会报错,比如: java.lang.NoClassDefFoundError:com.ryong21.io.net.NetClient 这种问题就比较麻烦,而且查的时候大部分都说是环境变量配置不正确,但明明是正确的啊,而且包也已经加载了,也已经Add to build path了,(如果不添加的话在编写代码的时候就会报错)。可是还是不行,写代码的时候没有错,运行的时候才出现错误。 解决办法 : 1.项目根目录下新建一个libs文件夹 2

java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest [duplicate]

折月煮酒 提交于 2019-11-30 18:06:00
问题 This question already has answers here : java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest (4 answers) Closed 3 years ago . I'm very new to Tomcat servlet coding, and I'm getting this error: > java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest -> `servlet-api.jar` is in lib `tomcat_root/lib` dirctory CATALINA_HOME = C:\tomcat\lib\; JAVA_HOME = C:\Program Files\Java\jdk1.7.0_01 Path = ....;%JAVA_HOME%\bin;%JAVA_HOME%;... I'm confused, because javac is

org.lwjgl.system.Library error

允我心安 提交于 2019-11-30 15:52:09
问题 I set up LWJGL 3 in Eclipse, and it's giving me this error when I try to run the test code from https://www.lwjgl.org/guide: Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.system.Library at org.lwjgl.system.MemoryAccess.<clinit>(MemoryAccess.java:22) at org.lwjgl.system.Pointer.<clinit>(Pointer.java:22) at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:594) at HelloWorld.run(HelloWorld.java:30) at HelloWorld.main(HelloWorld.java:109) I made sure that

NoClassDefFoundError on Calligraphy library

跟風遠走 提交于 2019-11-30 11:31:07
After adding compile 'com.android.support:support-v13:21.0.+' to build.gradle , I had some conflicts on building my app, so I had to add multiDexEnabled = true to defaultConfig inside build.gradle . Those conflict are gone, but i got another exception (on opening the app) for the missing calligraphy library: java.lang.NoClassDefFoundError: uk.co.chrisjenx.calligraphy.R$attr at uk.co.chrisjenx.calligraphy.CalligraphyConfig$Builder.<init>(CalligraphyConfig.java:150) at com.taxiyaab.android.util.ApplicationClass.onCreate(ApplicationClass.java:120) at newapp.com.taxiyaab.taxiyaab

NoClassDefFoundError: android.app.ANRManagerProxy

拈花ヽ惹草 提交于 2019-11-30 10:54:33
Does anyone know why this happens? I see this crash reported by my app but I have no idea what it is. java.lang.NoClassDefFoundError: android.app.ANRManagerProxy Thread: Binder_3, Exception: java.lang.NoClassDefFoundError: android.app.ANRManagerProxy at android.app.ANRManagerNative.asInterface(ANRManagerNative.java:30) at android.app.ANRManagerNative$1.create(ANRManagerNative.java:94) at android.app.ANRManagerNative$1.create(ANRManagerNative.java:88) at android.util.Singleton.get(Singleton.java:34) at android.app.ANRManagerNative.getDefault(ANRManagerNative.java:37) at android.os.MessageLogger

#java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 09:13:57
问题 I am getting java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester error and I am stuck with this error for more than a month. I have tried all Digester versions available and I also checked for duplicate JARs in classpath. I have designed the report through iReport-5.6.0 and I used the JARs from the iReport-5.6.0\ireport\modules\ext and other required JARs. Error-Log: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester at net.sf

Java NoClassDefFound Error

馋奶兔 提交于 2019-11-30 09:12:44
I am trying to run a basic Hibernate program. When I run it, I am getting the below error java.lang.NoClassDefFoundError: org/jboss/logging/BasicLogger I tried google'ing for it and did include the following jar files in my classpath :- jboss-common-3.2.3.jar jboss-common-client-3.2.3.jar Am I missing some more jar file ? Thanks EDIT : I did include the following jar file inside classpath :- jboss-logging-3.1.0.CR1.jar But, Facing the error: java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Lj‌​ava/lang/Object Amit Deshpande Yes jboss

How to avoid java.lang.NoClassDefFoundError

蹲街弑〆低调 提交于 2019-11-30 08:41:03
问题 I have a code for adding the texts to existing .doc file and it'll save that as another name by using apache POI. The following is the code I have tried so far import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFFooter; import org.apache.poi.xwpf.usermodel.XWPFTable; public class

NoClassDefFondError in Android… but the Class is in one jar included in the Classpath

和自甴很熟 提交于 2019-11-30 08:27:42
I am developing an App in Android. It has to be able of take a photo, and to send that photo to a webpage. This is the code: HttpClient httpclient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost("someurl"); MultipartEntity multipartEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE); //Here throws the exception multipartEntity.addPart("data", new InputStreamBody( new ByteArrayInputStream(byteArray), "image/png")); multipartEntity.addPart("caption", new StringBody(filename)); httpPost.setEntity((HttpEntity) multipartEntity); I have the libraries needed in my ClassPath

java.lang.NoClassDefFoundError: org/springframework/beans/factory/NoUniqueBeanDefinitionException

拜拜、爱过 提交于 2019-11-30 07:28:57
问题 I am trying to create a simple project using Spring MVC+JPA Hibernate+maven. My web.xml is as follows <servlet> <servlet-name>ContactManager</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value></param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>