5 Replies Latest reply on Oct 15, 2010 12:24 PM by Udo

    Apex Listener - Catalina - Failed to load mimes.xml

      Hello All,

      I'm catching the following error in the Catalina Logs and don't know how to resolve it. The file exists in the location, but I don't know where its being called from. This occurs during a file upload attempt using AJAX through an ifram.
      Upload type is multiplart/form-data.

      Thanks in advance for any assitance.

      java.io.FileNotFoundException: /opt/oracle/product/apache-tomcat-6.0.20/webapps/apex/WEB-INF\mimes.xml (No such file or directory)
              at java.io.FileInputStream.open(Native Method)
              at java.io.FileInputStream.<init>(Unknown Source)
              at java.io.FileInputStream.<init>(Unknown Source)
              at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
              at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
              at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
              at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
              at javax.xml.parsers.SAXParser.parse(Unknown Source)
              at javax.xml.parsers.SAXParser.parse(Unknown Source)
              at oracle.dbtools.apex.hooks.fileUpload.MimeTypes.loadFile(MimeTypes.java:46)
              at oracle.dbtools.apex.hooks.fileUpload.MimeTypes.getType(MimeTypes.java:35)
              at oracle.dbtools.apex.hooks.fileUpload.ApexFileLoader.processDocTable(ApexFileLoader.java:90)
              at oracle.dbtools.apex.hooks.fileUpload.ApexFileLoader.processFile(ApexFileLoader.java:56)
              at oracle.dbtools.apex.hooks.ProcessorRegistry.fileUploadPreProcess(ProcessorRegistry.java:65)
              at oracle.dbtools.apex.FileUpload.loadFiles(FileUpload.java:51)
              at oracle.dbtools.apex.ModApex.doPost(ModApex.java:99)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
              at java.lang.Thread.run(Unknown Source)
        • 1. Re: Apex Listener - Catalina - Failed to load mimes.xml
          Hello Jan,

          I guess that's a Servlet API issue. Tomcat 6 provides the Servlet 2.5 API which doesn't support multipart/form-data directly. You could try to migrate to Tomcat 7 which comes with Servlet 3.0 (that finaly supports multipart/form-data) or you have to add an additional filter to provide support multipart/form-data. Unfortunately, that filter doesn't come "out of the box". Here's an example including the filter code and the configuration you'd have to add to the web.xml of the Listener deployment:

          You could also try to run that request using the embedded GlassFish. As far as I know it's based on GlassFish V3 which supports Servlet API 3.0 too.

          1 person found this helpful
          • 2. Re: Apex Listener - Catalina - Failed to load mimes.xml
            Hello Udo,

            Thank you very much for the tip, it was very helpful. I migrated to Tomcat 7.0.2 with 3.0 servlet to deal with the multipart/form-data mime type.
            All went well with the installation.

            Now when I try to upload usign the multipart/form-data I get the following error: More files were uploaded in this request than the number of file item types defined on the page.
            I'm completely lost as to what this could be.

            I appreciate any assitance, thank you very much.

            <table summary=""><tr><td><img src="/i/error.gif" border="0" /></td>
            *<td>More files were uploaded in this request than the number of file item types defined on the page.*
            <tr><td><a href="javascript:window.history.go(-1)">OK</a></td>
            <td><br /></td></tr></table>
            <!--Application:"124" Page:"1" User:"" -->
            <!--request: ""-->
            <!--lastQuery (1st 1000 chars):-->
            <script type="text/javascript">
            • 3. Re: Apex Listener - Catalina - Failed to load mimes.xml
              Hello Jan,

              that sounds more like an APEX problem than like Listener issue.
              It seems you (dynamically) create new items to upload which APEX doesn't know about. How's the upload page organized?

              • 4. Re: Apex Listener - Catalina - Failed to load mimes.xml
                Hello Udo,

                I'm using an javascript extension whihc creates and ifram through whihc I'm uploading the file. That seems to be configured properly.
                As for the page setup, I've tried several variations and none seem to work.

                I tried to create a file browser item, and set some hidden html class on it. Then when I use the javascript uploader, I set the value inside the file browser($s('P1_FILENAME', myval)), this was to get over previous errors of "failed to load source".

                Now apex doesn't like that as well, so I'm thinking its just not possible to do a clean javascript file uploader. I guess the only option now is to create a separate page, hide the items and display it into an iframe.

                Any thoughts on fileuploader with javascript inside APEX? Oh, almost forgot to mention that I'm using the fileuploaderfield from sencha.


                • 5. Re: Apex Listener - Catalina - Failed to load mimes.xml
                  Hi Jan,

                  I have no experiences with that fileuploaderfield-tool you mention, but I know that it is possible to create a javascript-upload-form. Though currently only avaiable in German, the following community-page gives a structured introduction on how to build such a page.
                  All upload-items are predefined in APEX, so there is a maximum number of items.
                  "On Submit" of the form, the process to starts (as you would do in any other upload form) to transfer the item into the target table.
                  I still don't know how your page is constructed and how the upload process is suggested to work. Perhaps the community-example can give you a hint on what you're missing so far. If you encounter any language-related problems, I can surely help you with that guide.
                  Probably you'll get more help when you post this problem to the APEX forum. Would it be possible to reproduce your scenario on apex.oracle.com? I guess, there are a lot of people out there who would help you get it running there.

                  1 person found this helpful