Hi, Thanks for the hint. Actually we are migrating from struts1 to struts2 and somewhere we had included commons fileupload jar file for a struts1 page. Right now I have discontinued that jar and it is working fine.
Thank you.. On Fri, Oct 31, 2014 at 12:24 PM, <manoj.sha...@nevagroup.com> wrote: > Hi All, > This issue may be because of same name class being loaded in > two different ways by two different loaders on the same name. Make sure > you don't include any extra jars. > > with regards > Manoj Kumar Sharma > > > > > > Re: Help for File Upload error > > Lukasz Lenart > to: > Struts Users Mailing List > 10/31/2014 11:56 AM > > Please respond to "Struts Users Mailing List" > > > > > > > Too many commons-fileupload.jar ? > > 2014-10-31 7:18 GMT+01:00 Arpan <arpan.deb...@gmail.com>: > > HI All, > > > > I am getting a linkagge error while doing file upload operation. I am > using > > fileupload interceptor. Can anyone please tell me how to get rid of that > > error. > > > > Thanks > > Arpan > > > > java.lang.LinkageError: loader constraint violation: when resolving > method > > > > "org.apache.commons.fileupload.servlet.ServletFileUpload.<init>(Lorg/apache/commons/fileupload/FileItemFactory;)V" > > the class loader (instance of > org/eclipse/jetty/webapp/WebAppClassLoader) > > of the current class, > > org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest, and the > > class loader (instance of java/net/URLClassLoader) for resolved class, > > org/apache/commons/fileupload/servlet/ServletFileUpload, have different > > Class objects for the type > > > > he.commons.fileupload.servlet.ServletFileUpload.<init>(Lorg/apache/commons/fileupload/FileItemFactory;)V > > used in the signature > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parseRequest(JakartaMultiPartRequest.java:187) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.processUpload(JakartaMultiPartRequest.java:127) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse(JakartaMultiPartRequest.java:92) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:81) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:803) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.ng.PrepareOperations.wrapRequest(PrepareOperations.java:134) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > org.eclipse.jetty.server.Server.handle(Server.java:370) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) > > INFO | jvm 1 | 2014/10/31 11:47:01 | at > > java.lang.Thread.run(Unknown Source) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > >