What steps will reproduce the problem?
1. Run the following conversion script with the attached input file:
cli/dp2 dtbook-to-epub3 --i-source ./CK_12_Engineering__An_Introd.xml \
--data /Users/john/testing/epub3/CK_12_Engineering-urispaces.zip \
--output /Users/john/testing/epub3/CK_12_Engineering-urispaces-output.zip \
--x-assert-valid false \
> /Users/john/testing/epub3/CK_12_Engineering-urispaces-client.log
What is the expected output? What do you see instead?
I would expect that the conversion would succeed, and the use of any URIs to
refer to files inside of a book package would encode the path strings first, or
at least gracefully degrade.
Instead the conversion fails before it even begins. Here is the stack trace
from jvm.log.
DEBUG [o.daisy.pipeline.webservice.JobsResource] XML multi:<jobRequest
xmlns='http://www.daisy.org/ns/pipeline/data'><script
href='http://localhost:8182/ws/scripts/dtbook-to-epub3'/><input
name='source'><item value='./CK_12_Engineering__An_Introd.xml'/></input><option
name='assert-valid'>false</option></jobRequest>
@o.d.pipeline.webservice.JobsResource:241#processMultipart
DEBUG [o.daisy.pipeline.webservice.JobsResource] Job's nice name:
@o.d.pipeline.webservice.JobsResource:324#createJob
DEBUG [ org.daisy.pipeline.job.XProcDecorator] Storing the resource
collection @o.daisy.pipeline.job.XProcDecorator:79#from
INFO [ o.d.p.webservice.PipelineStatusService] Error caught from
application(resource): Internal Server Error
@o.d.p.w.PipelineStatusService:45#getStatus
Jan 15, 2014 3:05:39 PM org.restlet.resource.ServerResource doCatch
WARNING: Exception or error caught in server resource
Internal Server Error (500) - The server encountered an unexpected condition
which prevented it from fulfilling the request
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:517)
at org.restlet.resource.ServerResource.post(ServerResource.java:1215)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:592)
at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:649)
at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:348)
at org.restlet.resource.ServerResource.handle(ServerResource.java:951)
at org.restlet.resource.Finder.handle(Finder.java:246)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:84)
at org.restlet.Application.handle(Application.java:381)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Router.doHandle(Router.java:431)
at org.restlet.routing.Router.handle(Router.java:648)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:155)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.routing.Filter.doHandle(Filter.java:159)
at org.restlet.routing.Filter.handle(Filter.java:206)
at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:211)
at org.restlet.Component.handle(Component.java:392)
at org.restlet.Server.handle(Server.java:516)
at org.restlet.engine.ServerHelper.handle(ServerHelper.java:72)
at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:152)
at org.restlet.ext.jetty.JettyServerHelper$WrappedServer.handle(JettyServerHelper.java:170)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException
at java.net.URI.create(Unknown Source)
at org.daisy.pipeline.job.IOHelper.dump(IOHelper.java:80)
at org.daisy.pipeline.job.XProcDecorator.from(XProcDecorator.java:80)
at org.daisy.pipeline.job.MappingJobContext.<init>(MappingJobContext.java:11)
at org.daisy.pipeline.job.JobContextFactory.newMappingJobContext(JobContextFactory.java:34)
at org.daisy.pipeline.webservice.JobsResource.createJob(JobsResource.java:367)
at org.daisy.pipeline.webservice.JobsResource.createResource(JobsResource.java:178)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.restlet.resource.ServerResource.doHandle(ServerResource.java:503)
... 52 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 12:
images/cover image.jpg
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
... 63 more
INFO [ o.d.p.webservice.PipelineStatusService] Overriding error
representation: Internal Server Error
@o.d.p.w.PipelineStatusService:24#getRepresentation
What version of the product are you using? On what operating system?
v1.7 on Ubuntu Linux
Please provide any additional information below.
The attached file is modified from the original in order to demonstrate the
problem. I originally encountered this in many other copyrighted books.
Original issue reported on code.google.com by john.bru...@gmail.com on 15 Jan 2014 at 11:15
Original issue reported on code.google.com by
john.bru...@gmail.com
on 15 Jan 2014 at 11:15Attachments: