File upload fails for APEX 4.1.1 with GlassFish 3.1.2

Environment: APEX 4.1.1, GlassFish 3.1.2 Open Source Edition, Oracle database 11.2.0.3.0, Oracle Linux 6.2

I tried to export/import some workspaces and applications from APEX 4.1.1 with GlassFish 3.1.1 and Oracle 10g to a new server which had a fresh installation of APEX 4.1.1 with GlassFish 3.1.2 and Oracle 11g as back end. To my surprise, I received the following error when I tried to upload any export sql file:

1 error has occurred

File must be selected to upload. (Go to error)

I first thought that it was a browser issue, so I tried both Google Chrome and Internet Explorer 9, but the error remained. Then I tried to re-export the workspace and applications, maybe the file got corrupt or something. Still, same error… I had a look at the log files of both the APEX listener and the GlassFish instance that APEX was deployed under, but I didn’t see anything wrong.

And then I noticed the following thread on the OTN APEX forum: https://forums.oracle.com/forums/thread.jspa?threadID=2359384. Looks like some other people were also having problems uploading files, and it seemed to be related to the version of GlassFish…

Next, I found this GlassFish bug description: http://java.net/jira/browse/GLASSFISH-18444. They were talking about problems with rich:fileupload and apache file uploads. Bingo! So, I downloaded the modified web-core.jar file, copied it to the modules folder of my GlassFish installation (after renaming the original file) and, after restarting my GlassFish instance, file uploads worked fine again in APEX! Problem solved for now, but luckily this didn’t happen in production!

 

Update 08/2012: this issue has now been fixed in GlassFish 3.1.2.2. See my blog post about this!

 

Matthias

7 thoughts on “File upload fails for APEX 4.1.1 with GlassFish 3.1.2

  1. Thanks Matthias,
    Have you ever done this with glassfish:
    I need to map many internet domains names to different Apex Applications.
    I read about virtual server in glassfish, but I could not do it .

    Regards,
    Fateh

    • Hello Fateh,

      Sorry, I never did something like that. There’s a part about Virtual Servers in the administration-guide.pdf manual, did you have a look at that?

      Regards,
      Matthias

      • Hi Matthias,
        Great that you replied…I hope that you have the time to help even though you may not need it …. Honestly , I’ve tried to do it many times since last year.
        I checked Oracle Doc, The Open Source Doc… and the PDF as you advised.
        But really I do not know what to do….
        Let us consider this:
        on my Netgear router on Port forwarding I made :
        port 80 to be forwarded to the machine with local IP address 192.168.1.101.
        I have this domain name: http://www.theexecutivetowers.info/ that its DNS points to my Public IP address.
        when we put that domain name on the browser, we will see APEX workspace log in page.

        I have another domain name fam-erp.com that its DNS poitns to my public ip address.

        How to map these domains names to the my APEX Applications e.g :
        fam-erp.com >>>>> fam-erp.com/apex/f?p=104
        theexecutivetowers.info >>> theexecutivetowers.info/apex/f?p=101

        I highly appreciate your help….
        Fateh

  2. Pingback: GlassFish Server release 3.1.2.2 fixes APEX file download bug « Matthias Hoys

  3. Pingback: Confluence: CTB Infrastructure

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.