zoukankan      html  css  js  c++  java
  • List转换成JSON对象报错(一)

    List转换成JSON对象


    1、具体报错如下

    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClass(Unknown Source)
    	at java.security.SecureClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.defineClass(Unknown Source)
    	at java.net.URLClassLoader.access$100(Unknown Source)
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at com.you.file.upload.util.ListToJSON.main(ListToJSON.java:48)
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.exception.NestableRuntimeException
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.net.URLClassLoader$1.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    	at java.lang.ClassLoader.loadClass(Unknown Source)
    	... 13 more
    

    2、错误原因

          lib目录下未导入commons-lang-2.4.jar


    3、解决办法

         在WEB-INF下的lib目录下导入commons-lang-2.4.jar


  • 相关阅读:
    1. Visual Basic概述
    4. HTML5
    Android 操作SQLite基本用法
    android开发规范
    ListView与ArrayAdapter的搭配使用
    个人笔记——Android网络技术
    Java中forEach, 用来遍历数组
    详细讲解Android的网络通信(HttpUrlConnection和HttpClient)
    简单使用URLConnection、HttpURLConnection和HttpClient访问网络资源
    Http编程之HttpClient
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13315160.html
Copyright © 2011-2022 走看看