Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7
-
Fix Version/s: 1.8
-
Component/s: ICE-Components
-
Labels:None
-
Environment:Weblogic 9 + 10
-
Workaround Exists:Yes
-
Workaround Description:
Description
Test build 10 of 1.8 and found that file upload stopped before completion.
Issue Links
- is duplicated by
-
ICE-4159 In Weblogic 9, inputFile and dataExporter broken, unless exploded deployment
- Closed
Activity
Sam Xiao
created issue -
Sam Xiao
made changes -
Field | Original Value | New Value |
---|---|---|
Attachment | screenshot-1.jpg [ 11650 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 1.8 [ 10161 ] | |
Assignee Priority | P1 | |
Affects Version/s | 1.8 [ 10161 ] | |
Assignee | Mark Collette [ mark.collette ] |
Deryk Sinotte
made changes -
Workaround Description |
The workaround is in how it is deployed. If you deploy to the server in an exploded directory, that is you copy a folder containing the contents of the .war file, rather than the .war file itself, the result is a deployment with real paths to the files so that getRealPath() will now return valid values. Deploying and running our Component Showcase against WebLogic 9 and 10 using this technique shows that it works properly. |
|
Workaround Exists | [Yes] | |
Salesforce Case | [] |
Ken Fyten
made changes -
Summary | File upload stops working for weblogic 9 and 10 | inputFile not working on Weblogic 9 and 10 |
Salesforce Case | [] | |
Fix Version/s | 1.8 [ 10161 ] | |
Assignee Priority | P1 | |
Security | Private [ 10001 ] |
Mark Collette
made changes -
Arran Mccullough
made changes -
Salesforce Case | [50070000009MwVS] |
Ken Fyten
made changes -
Summary | inputFile not working on Weblogic 9 and 10 | inputFile, dataExporter not working on Weblogic 9 and 10 |
Ken Fyten
made changes -
Component/s | Components [ 10012 ] | |
Fix Version/s | 1.8.2 [ 10190 ] | |
Assignee | Mark Collette [ mark.collette ] | Adnan Durrani [ adnan.durrani ] |
Ken Fyten
made changes -
Assignee Priority | P2 | |
Assignee | Adnan Durrani [ adnan.durrani ] | Yip Ng [ yip.ng ] |
yip.ng
made changes -
Attachment | c-s-jsp.war [ 12010 ] |
yip.ng
made changes -
Attachment | c-s-jsp.war [ 12010 ] |
Ken Fyten
made changes -
Summary | inputFile, dataExporter not working on Weblogic 9 and 10 | inputFile not working on Weblogic 9 and 10 |
Assignee Priority | P2 | |
Assignee | Yip Ng [ yip.ng ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] | |
Fix Version/s | 1.8.2 [ 10190 ] | |
Affects Version/s | 1.7 [ 10080 ] | |
Affects Version/s | 1.8 [ 10161 ] |
Ken Fyten
made changes -
Comment |
[ I just found out (after studying file uploader and setting up the metadata and properties for data exporter) that data exporter makes use of Resource and Resource Registry, unlike file uploader (which has its own file upload servlet?). Seems like Resource and Resource Registry don't have similar directory options? Do we then start changing them as well? ] |
Ken Fyten
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
The problems are related to the use of the ServletContext.getRealPath() method. The getRealPath() method does odd things on WebLogic. What happens is that, in WL 9 and 10, when you deploy a .war through the web console, it's doesn't unpack it but just uses it "as is". So all calls to getRealPath() return null because there are no real paths. Calls to get resource() return "zip://" type URLs pointing to entries in the .war file.
WebLogic has always had this problem (and some other less common app servers too like SAP's). Previously, to get around this, we used a different method:
final IdGenerator idGenerator = new IdGenerator(context.getResource("/WEB-INF/web.xml").getPath());
Of course this only helps for reading the value. If you need to write to the location (ie file upload), then it still might be an issue because the URL will be "zip://" instead of "file://" and it may not let you write at all.
In the end, we really shouldn't be using getRealPath() if we can avoid it. It's unreliable across app servers and it's not exposed by the JSF APIs (ExternalContext doesn't have a matching version of getRealPath). Perhaps getResourcePaths and some manipulation of the set that is returned or getResource().getPath. Of course, none of these may help if the .war file is not exploded during deployment.