paperclips-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Paperclips-discuss] Problem with FileURLConnection


From: Andy Madigan
Subject: [Paperclips-discuss] Problem with FileURLConnection
Date: Wed, 10 Nov 2004 18:32:10 -0800 (PST)

I managed to run into a problem I had before on Sun's VM, but this time
it's sablevm. I ran make, which gave me a gnupaperclips.jar. I added
this jar to the classpath and started with java gnupaperclips
--config=server.xml. When I checked the server I got a 404 on the root
directory (same problem as before). But this time I also got exception
stack traces on the console. The stack trace is this:

java.lang.ClassCastException
   at gnu.paperclips.Service.getResource (Service.java:703)
   at gnu.paperclips.servlets.WWW.getLastModified (WWW.java:208)
   at javax.servlet.http.HttpServlet.testConditional
(HttpServlet.java:367)
   at javax.servlet.http.HttpServlet.service (HttpServlet.java:290)
   at javax.servlet.http.HttpServlet.service (HttpServlet.java:345)
   at gnu.paperclips.RequestableServlet.service
(RequestableServlet.java:144)
   at gnu.paperclips.Requestable.dispatch (Requestable.java:256)
   at gnu.paperclips.Dispatcher$DFilterChain.doFilter
(Dispatcher.java:320)
   at gnu.paperclips.filters.WebLog.doFilter (WebLog.java:69)
   at gnu.paperclips.RequestFilter.filter (RequestFilter.java:203)
   at gnu.paperclips.Dispatcher$DFilterChain.doFilter
(Dispatcher.java:325)
   at gnu.paperclips.Dispatcher.dispatch (Dispatcher.java:219)
   at gnu.paperclips.http.HTTPResponse.doRequest
(HTTPResponse.java:205)
   at gnu.paperclips.http.HTTPRequest.doRequest (HTTPRequest.java:192)
   at gnu.paperclips.http.HTTPConnection.handle
(HTTPConnection.java:247)
   at gnu.socketserver.Server.serviceSocket (Server.java:421)
   at gnu.socketserver.Server.run (Server.java:307)
   at java.lang.Thread.run (Thread.java:704)
   at java.lang.VMThread.callRun (VMThread.java:120)
   at java.lang.Thread.callRun (Thread.java:390)
   at java.lang.VirtualMachine.runThread (VirtualMachine.java:121)

As  you can see the trace ends (or begins) at Service.java line 703,
this line is a cast from a URLConnection to a
gnu.java.net.protocol.file.FileURLConnection. I'm not sure why it fails
on sablevm (which uses the GNU Classpath), but this seems like a bad
cast since some platforms won't use that specific class for
FileURLConnections. What I really can't figure out is that this error
didn't occur when I used the jar that was already in CVS. 

=====





reply via email to

[Prev in Thread] Current Thread [Next in Thread]