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, 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: 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: 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 See my blog post about this!




7 Responses to File upload fails for APEX 4.1.1 with GlassFish 3.1.2

  1. Alex Hafner says:

    Nice one, Matthias, I’ve run into the exact same issue. Thanks for pointing to the fix.



  2. fateh says:

    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 .


    • matthiashoys says:

      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?


      • fateh says:

        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
        I have this domain name: 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 that its DNS poitns to my public ip address.

        How to map these domains names to the my APEX Applications e.g : >>>>> >>>

        I highly appreciate your help….

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

  4. Alexander says:

    Merci Matthias!

  5. Pingback: Confluence: CTB Infrastructure

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: