泽西岛:文件上传问题

时间:2017-03-22 21:12:58

标签: java jersey

我正在使用球衣1.9.1。当我包含com.sun.jersey的jersey-multipart [not org.glassfish]时,FormDataMultiPart编译错误消失了。但是,它会在运行时抛出以下错误。任何修复,拜托!

Mar 22, 2017 1:52:53 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [Jersey] in web application [/csmgt] threw load() exception
java.lang.ClassNotFoundException: com.sun.jersey.multipart.FormDataMultiPart
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    at java.lang.Class.privateGetPublicMethods(Unknown Source)
    at java.lang.Class.getMethods(Unknown Source)
    at com.sun.jersey.core.reflection.MethodList.getMethods(MethodList.java:77)
    at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:64)
    at com.sun.jersey.core.reflection.MethodList.<init>(MethodList.java:60)
    at com.sun.jersey.server.impl.modelapi.annotation.IntrospectionModeller.createResource(IntrospectionModeller.java:116)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.getAbstractResource(WebApplicationImpl.java:745)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.createAbstractResourceModelStructures(WebApplicationImpl.java:1522)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1295)

1 个答案:

答案 0 :(得分:1)

我尝试使用jersey代码上传图片文件,

cmd

我收到了文件作为输入流。