Symptom: It can be compiled by using eclipse and other IDE development tools, but can be run. However, it can be compiled by saving dos in notepad and cannot be run. The error "exception in thread" Main "Java. lang. noclassdeffounderror ".
Solution: 1. It is impossible to set environment variables incorrectly because integrated development tools can run
2. I wrote a simple "helloworld" again in notepad"Program, Compilation can be passed and
ArticleDirectory
Cause of exception:
Solution:
Exception in thread "Main" Java. Lang. noclassdeffounderror: COM/Sun/mail/util/lineinputstreamCause of exception:
The Java EE version is different from that of javamail.For example, if javamail 1.3 or lower is on javaee5, the above error will occur, but it will work normally in javaee1.4. (However, I have tried javaee5 + javamail1.4.) Because javaee5 contains javamail classes but is not compre
By default, the image display function is not enabled for Tomcat/resin in Linux. You need to add support options.In Linux, when we use Java image packages to process images, we often encounter Java. lang. noclassdeffounderror: Sun. AWT. x11graphicsenvironment, because the Java Virtual Machine needs local X-server support for image processing, there are two solutions:1 Java 1.4 or laterAdd the parameter-djava. AWT. Headless = true when starting Java. F
Javax. servlet. ServletException: java. lang. NoClassDefFoundError: javax/el/ELResolver error solution,
Today, you don't need eclipse, myeclipse, or other development tools. When writing a JSP page (a little dead), you suddenly encounter problems that you have never encountered before. The error is as follows:
HTTP Status 500 - java.lang.NoClassDefFoundError: javax/el/ELResolvertype Exception reportmessage java.lang.NoClassDefFoundError: javax/el/ELRe
The Android program depends on a Library program B. The requirements for converting formatted json strings to standard json strings are used in program B.
Public static String jsonFormatter (String uglyJSONString) {Gson gson = new GsonBuilder (). setPrettyPrinting (). create (); JsonParser jp = new JsonParser (); JsonElement je = jp. parse (uglyJSONString); String prettyJsonString = gson. toJson (je); return prettyJsonString ;}
However, in the Android program
Java. lang.
Org.apache.catalina.startup.HostConfig.deployDescriptor ( hostconfig.java:656) at Org.apache.catalina.startup.hostconfig$deploydescriptor.run (HostConfig.java:1635) at Java.util.concurrent.executors$runnableadapter.call (executors.java:471) at java.util.concurrent.futuretask$ Sync.innerrun (futuretask.java:334) at Java.util.concurrent.FutureTask.run (futuretask.java:166) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145) at Java.util.concurrent.threadpoolexecuto
Hive Launcher exception in thread "main" Java.lang.NoClassDefFoundError errorCause: Configuration issues, Hadoop is missing the corresponding hive jar package.* * Resolution:Step 1. Modify the/conf/hadoop-env.sh in the Hadoop directory to add Hadoop to the jar in hive, as shown in (Path is the hive installation path):Step 2. Copy all the hive--. jar files under Hive/lib to the Lib in HadoopApache Hive Boot Report noclassdeffounderror error
inputstream in = JdbcUtils.class.getClassLoader (). getResourceAsStream ("db.properties"); Db.properties can not get, and then go to see Class.getclassloader (). getResourceAsStream method, which shows that this method will get the file from Classpath, so generally put the configuration file in the project \ Web-inf\classes folder, and then find that the db.properties is not under the classes file, so this exception is resolved. Placing the configuration file in the classes directory solves the
did not add the expansion pack to participate in the compilation. It also compiles cocos2dx-3.9 's official Test-cpp/lua to Android and finds that it continues to report errors.It dawned on me that I was reminded by a colleague's remark. In fact, Himi on the Android side of the development compared to a lot less. The introduction of jars, I introduce problems caused by.Later I re-introduced Android-async-http-x.x.x.jar by the following steps to resolve:Right-click on the Android project under t
morning encountered a tricky thing, import a project, the results of the original Tomcat server to guide the bad, all kinds of red, black, blue error everywhere ah, just finished a project, afraid of being destroyed, I that worried! Fortunately, the following are the most effective ways to choose the right way to go without a road: Here are a few errors to consider:Document base E:\workspice\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\zhgy\;Exception in thread "main" JAVA.L
Download the code for Cloudsim 4.0 today, run the sample program that comes with it, and the result is a partial run error:The reason is that the Org.apache.commons.math3.distribution.UniformRealDistribution class is not found,WORKAROUND: You need to add a reference Commons-math3-3.6.1.jar (: Commons-math3-3.6.1.jar).Step: Eclipse Project name Right-click->properties->java Build path->labraries->add External jars-> Select the downloaded Commons-math3-3.6.1.jar and make sure you are ready.CloudSi
Try to use JUnit today and download the latest JUnit version, which is 4.11. lang. noClassDefFoundError: An error such as org/hamcrest/SelfDescribing. I checked it online. The general solution is to change to a lower version. Some people say that the hamcrest package is missing. I went to the official website and looked at it again. I found the following:
Junit. jar: Includes the Hamcrest classes. The simple all-in-one solution to get started qu
Error message: org. springframework. beans. factory. BeanCreationException: Error creating bean with name 'userservice' defined in file [F: \ eclipse \ ec_wp \ SpringProgramming0300
\ Bin \ com \ spring \ service \ UserService. class]: Initialization of bean failed; nested exception is org. springframework. beans. factory. BeanCreationException: Error creating bean with name
'Txadvice ': Cannot resolve reference to bean 'txmanager' while setting bean property 'transactionmanager'; nested excepti
Document directory
Environment
Problem
Solution
Environment
JBoss 6.0 + myeclipse 8.6 + MySQL 5.1 + Struts 2.3 + EJB 3.0
Problem
The following exception occurs when JBoss is started:
Java. Lang. noclassdeffounderror: ORG/hornetq/API/CORE/client/clientsession
Solution
Check whether the struts jar package version is correct.
My EJB project uses jar files such:
@ Wentasy blog is for your reference only. Welcome to visit.
The main cause of this error is the package name in the program. The program is as follows:
Package imputationrareprob; public class imputationrareprob {public static void main (string [] ARGs) {system. Out. println (ARGs [0]);}
Note the package at the top layer of the program. If you run the package as follows, this error will occur.
If you run it in the following way, the noclassrareprob error will occur, but if you use eclipse to run it, there will be no error. The reason is that eclipse has
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)at org.apache.catalina.core.ApplicationFilterConfig.
Core error cause: java. lang. noClassDefFoundError: org/apache/commons/lang3/StringUtils. Obviously, this class is
occurs, I initially thought it was an ndk version problem or android. mk in android did not add the lib of the extension package for compilation. It also compiled the cocos2dx-3.9's official test-cpp/lua to android run, found that all continue to report errors.
I suddenly realized it with a message from my colleagues. In fact, Himi is much less than Android development. Jar is introduced.
Then I took the following steps to re-introduce the android-async-http-x.x.x.jar:
Right-click libs under th
Error: cocould not find medialib accelerator Wrapper Classes. Continuing in pure JAva mode.Occurs in: COM. Sun. Media. Jai. mlib. medialibaccessorJava. Lang. noclassdeffounderror: COM/Sun/medialib/mlib/Image
The solution to this exception is to modify a parameter in the Catalina. BAT file.
Set java_opts = % java_opts %-djava. util. logging. manager = org. apache. juli. classloaderlogmanager-djava. util. logging. config. file = "% catalina_base %
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.