5 Replies Latest reply: Oct 4, 2012 12:01 AM by Kalyan Pasupuleti-Oracle RSS

    WL 12: File Upload Issue in WEBLOGIC

    962209
      I am using Jakarta Commons File Upload to upload files on the server, when I deploy my applicaion on JBOSS it works fine and when I deploy it on the weblogic it doesn't work i.e the method

      *     this.request = request ;*
      *     FileItemFactory fileItemFactory = new DiskFileItemFactory();*
      *     ServletFileUpload servletFileUploadHandler = new ServletFileUpload(request) ;*
      *     items = servletFileUploadHandler.parseRequest(request);*

      returns me 0 items

      Any idea, or there is any security restriction imposed on weblogic that is doing this?

      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Here is the exact error and a big part of the stack trace

      egoryId=8],Business Object=BoImpl[name=triContractLink,id=10008744,module=ModuleImpl[name=triContrac
      t,id=21]]]][MID-253372397]
      ERROR 12-09 14:54:59,463 - java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at com.MYPROJECT.mime.MultipartBodyIterator.getName(MultipartBodyIterator.java:162)
      at com.MYPROJECT.architecture.util.DocUtil.writeContent(DocUtil.java:51)
      at jsp_servlet._html._en._default._gui.__contentimport._jspService(__contentimport.java:305)

      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
      java:242)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
      java:216)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:130)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:352)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.MYPROJECT.platform.context.ContextFilter$2.execute(ContextFilter.java:130)
      at com.MYPROJECT.platform.context.ContextServiceImpl.runInNewReadOnlyContext(ContextServiceImp
      l.java:146)
      at com.MYPROJECT.platform.context.ContextFilter.doFilterInternal(ContextFilter.java:116)
      at com.MYPROJECT.platform.context.ContextFilter.doFilter(ContextFilter.java:65)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.MYPROJECT.web.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:109)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.MYPROJECT.web.filter.XSSDecodingFilter.doFilter(XSSDecodingFilter.java:61)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.MYPROJECT.web.filter.XSSURLEncodeFilter.doFilter(XSSURLEncodeFilter.java:68)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.MYPROJECT.web.filter.EncodingFilter.doFilter(EncodingFilter.java:29)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServ
      letContext.java:3288)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
      ontext.java:3254)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java
      :2163)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
      089)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1512)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSu
      pportProviderImpl.java:254)

      ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      Regards,

      Aless

      Edited by: Aless Aguiar on 14/09/2012 06:48

      Edited by: Aless Aguiar on 17/09/2012 04:02

      Edited by: Aless Aguiar on 17/09/2012 04:09

      Edited by: Aless Aguiar on 17/09/2012 04:09
        • 1. Re: WL 12: File Upload Issue in WEBLOGIC
          Kalyan Pasupuleti-Oracle
          Hi,

          Give me full stack trace to verify the issue.

          Regards,
          Kal
          • 2. Re: WL 12: File Upload Issue in WEBLOGIC
            962209
            Kal, thank you for your attention.

            This is the stack trace..

            egoryId=8],Business Object=BoImpl[name=triContractLink,id=10008744,module=ModuleImpl[name=triContrac
            t,id=21]]]][MID-253372397]
            ERROR 12-09 14:54:59,463 - java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
            java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
            at java.util.ArrayList.RangeCheck(ArrayList.java:547)
            at java.util.ArrayList.get(ArrayList.java:322)
            at com.MYPROJECT.mime.MultipartBodyIterator.getName(MultipartBodyIterator.java:162)
            at com.MYPROJECT.architecture.util.DocUtil.writeContent(DocUtil.java:51)
            at jsp_servlet._html._en._default._gui.__contentimport._jspService(__contentimport.java:305)

            at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
            java:242)
            at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
            java:216)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
            at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:130)
            at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:352)
            at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at com.MYPROJECT.platform.context.ContextFilter$2.execute(ContextFilter.java:130)
            at com.MYPROJECT.platform.context.ContextServiceImpl.runInNewReadOnlyContext(ContextServiceImp
            l.java:146)
            at com.MYPROJECT.platform.context.ContextFilter.doFilterInternal(ContextFilter.java:116)
            at com.MYPROJECT.platform.context.ContextFilter.doFilter(ContextFilter.java:65)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at com.MYPROJECT.web.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:109)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at com.MYPROJECT.web.filter.XSSDecodingFilter.doFilter(XSSDecodingFilter.java:61)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at com.MYPROJECT.web.filter.XSSURLEncodeFilter.doFilter(XSSURLEncodeFilter.java:68)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at com.MYPROJECT.web.filter.EncodingFilter.doFilter(EncodingFilter.java:29)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
            at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServ
            letContext.java:3288)
            at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
            ontext.java:3254)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
            at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java
            :2163)
            at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2
            089)
            at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
            at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1512)
            at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSu
            pportProviderImpl.java:254)

            Edited by: Aless Aguiar on 17/09/2012 05:16
            • 3. Re: WL 12: File Upload Issue in WEBLOGIC
              Kalyan Pasupuleti-Oracle
              Hi,

              Plz check following BUG 13976683 this will help you for further resolution.

              Regards,
              Kal
              • 4. Re: WL 12: File Upload Issue in WEBLOGIC
                962209
                Hi Kal, this link is not available. Do you know any one? Tks

                http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=13976683
                • 5. Re: WL 12: File Upload Issue in WEBLOGIC
                  Kalyan Pasupuleti-Oracle
                  Hi,

                  I can see that one.

                  BUG 13976683 - COMETD SERVLET ON WL 10.3.5.0 YIELDS INDEXOUTOFBOUNDSEXCEPTION

                  Please check from MOS patches and update.

                  where as currently you are looking sunbug


                  Regards,
                  Kal