Okay everyone, I have got the mother of all edge-cases (please don't
hate).
I am using the relatively new WOLips ability to have multiple WO
Installations by having multiple wolips.properties files.
- Everything builds and runs just fine within eclipse while being
built by the incremental builder, server- and client-side apps launch
and run just fine.
- I have changed the build.properties file to have a
wolips.properties entry that points to my custom wolips.properties
file that points to a specific install of WO 5.3.3
- When deployed to Tomcat using the WOLips Ant Tools -> Install , the
server-side app starts up just fine and runs as expected but the the
client-side application can't launch because when WebStart requests
the client-side jars from the server, the server responds that it
can't find the requested files. The request is a standard HTTP
request, but it isn't a WA or WO request, it's a WR request.
Here's the request:
http://localhost:8080/BakeryManagementJavaClient/WebObjects/BakeryManagementJavaClient.woa/wr/JavaEOApplication.jar
Here's the error I get:
com.webobjects.foundation.NSForwardException for
java.io.FileNotFoundException: /plication.jar (No such file or
directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at
sun
.net
.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at
sun
.net
.www
.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:
161)
at java.net.URL.openStream(URL.java:1007)
at com.webobjects.foundation.NSData.<init>(NSData.java:315)
at
com
.webobjects
.appserver
._private
.WOURLValuedElementData.appendToResponse(WOURLValuedElementData.java:67)
at
com
.webobjects
.appserver
._private
.WOResourceRequestHandler
._responseForDataCachedWithKey(WOResourceRequestHandler.java:51)
at
com
.webobjects
.appserver
._private
.WOResourceRequestHandler.handleRequest(WOResourceRequestHandler.java:
119)
at
com
.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:
1306)
at
er
.extensions
.appserver
.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1772)
at
er
.extensions
.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1737)
at
com
.webobjects
.jspservlet
._WOApplicationWrapper
.servletDispatchRequest(_WOApplicationWrapper.java:118)
at
com
.webobjects
.jspservlet.WOServletAdaptor._handleRequest(WOServletAdaptor.java:678)
at
com.webobjects.jspservlet.WOServletAdaptor.doGet(WOServletAdaptor.java:
660)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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.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:
286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
845)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
447)
at java.lang.Thread.run(Thread.java:613)
Now the interesting part is that it appears to be looking for a file
called "/plication.jar", which should be "JavaEOApplication.jar"
instead. Something is chopping off the first 8 characters of the file
name.
If I use:
wo.system.root=/System
wo.local.root=/
wo.apps.root=/Library/WebObjects/Applications
in my wolips.properties file when deploying the application, the
deployed appliation works just fine.
These values are used to generate the following entries in the web.xml
file:
<!-- Indicates the root where WebObjects frameworks are installed.
In Mac OS X,
for example, WO frameworks are located in the "/System/Library/
Frameworks"
directory; keeping in tradition, WOROOT is set to "/System".
On Windows,
it could be "c:\Apple", on Solaris, it could be "/opt/Apple".
If "-DWOROOT=/path/to/somewhere" is defined (in the container
startup script,
for example), the value indicated here is ignored. -->
<context-param>
<param-name>WOROOT</param-name>
<param-value>/Developer/WebObjects/bestmaid/System</param-value>
</context-param>
<!-- Indicates the root where local frameworks are installed. In
Mac OS X,
for example, these frameworks are located in the "/Library/
Frameworks"
directory; keeping in tradition, LOCALROOT is set to "/". On
Windows,
it could be "c:\Apple\Local", on Solaris, it could be "/opt/
Apple/Local".
If "-DLOCALROOT=/path/to/somewhere" is defined (in the
container startup script,
for example), the value indicated here is ignored. -->
<context-param>
<param-name>LOCALROOT</param-name>
<param-value>/Developer/WebObjects/bestmaid</param-value>
</context-param>
<!-- Indicates the root where WebObjects applications are
installed. In Mac OS X
deployment, for example, WO applications are usually deployed
in the
"/Library/WebObjects/Applications" directory and
WOAINSTALLROOT is set to
"/Library/WebObjects/Applications". If "-DWOAINSTALLROOT=/path/
to/somewhere"
is defined (in the container startup script, for example), the
value
indicated here is ignored. -->
<context-param>
<param-name>WOAINSTALLROOT</param-name>
<param-value>/Developer/WebObjects/bestmaid/Library/WebObjects/
Applications</param-value>
</context-param>
Now, correct me if I'm wrong, but since this is a fully-embedded
servlet deployment, those values shouldn't even be used because all of
the WO frameworks are embedded in the app already.
Here's my questions:
1) Why do those values need to be set in the web.xml file for a fully
embedded app
2) Why is the request for the JavaEOApplication.jar file being
butchered?
Dave
This archive was generated by hypermail 2.0.0 : Thu May 21 2009 - 15:36:55 EDT