Bug 33966 - Java 1.5 Gives File Not Found Errors
Java 1.5 Gives File Not Found Errors
Status: RESOLVED FIXED
Product: Lenya
Classification: Unclassified
Component: Creator
1.2.2
PC Linux
: P2 major
: 1.2.5
Assigned To: Lenya Developers
: ErrorMessage, JDK1.5
: 34785 40614 (view as bug list)
Depends on:
Blocks: 32923 40614
  Show dependency tree
 
Reported: 2005-03-11 17:56 UTC by Jeffry Hysong
Modified: 2007-03-21 21:37 UTC (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffry Hysong 2005-03-11 17:56:35 UTC
When using Java 1.5 and attempting to create a new page 'foo2' with File->New
Document as the first step in the Tutorial, Lenya delivers the following
error:file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)

It does however create the folder for 'foo2' under the 'tutorial' folder and it
creates index_en.xml with a size of 0 bytes. It doesn't show up in the document
view though Lenya recognizes that the id is in use.

This behavior doesn't happen when using Java 1.4.2.

full exception chain stacktrace

org.apache.lenya.cms.task.ExecutionException:
/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/config/tasks/targets.xml:138:
org.apache.lenya.cms.authoring.CreatorException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)
	at org.apache.lenya.cms.task.AntTask.executeAntTarget(AntTask.java:129)
	at org.apache.lenya.cms.task.AntTask.execute(AntTask.java:229)
	at
org.apache.lenya.cms.task.DefaultTaskWrapper.execute(DefaultTaskWrapper.java:248)
	at org.apache.lenya.cms.cocoon.acting.TaskAction.act(TaskAction.java:62)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:124)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:606)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by:
/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/config/tasks/targets.xml:138:
org.apache.lenya.cms.authoring.CreatorException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)
	at
org.apache.lenya.cms.ant.DocumentCreatorTask.execute(DocumentCreatorTask.java:59)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
	at org.apache.tools.ant.Task.perform(Task.java:364)
	at org.apache.tools.ant.Target.execute(Target.java:341)
	at org.apache.tools.ant.Target.performTasks(Target.java:369)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
	at org.apache.lenya.cms.task.AntTask.executeAntTarget(AntTask.java:126)
	... 57 more
Caused by: org.apache.lenya.cms.authoring.CreatorException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)
	at org.apache.lenya.cms.authoring.DocumentCreator.create(DocumentCreator.java:130)
	at
org.apache.lenya.cms.ant.DocumentCreatorTask.execute(DocumentCreatorTask.java:47)
	... 63 more
Caused by: javax.xml.transform.TransformerException:
java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:245)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:278)
	at org.apache.lenya.xml.DocumentHelper.writeDocument(DocumentHelper.java:199)
	at org.apache.lenya.cms.authoring.DefaultCreator.create(DefaultCreator.java:176)
	at org.apache.lenya.cms.authoring.DocumentCreator.create(DocumentCreator.java:121)
	... 64 more
Caused by: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/authoring/tutorial/foo2/index_en.xml
(No such file or directory)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:235)
	... 68 more





Additionally, when trying to edit any of the Tutorial pages, for example the
Features page it delivers the following error: Reason:
java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/rcml/content/authoring/features/index_en.xml.rcml
(No such file or directory)
Check the log files.
File name:	/content/authoring/features/index_en.xml



Also when trying to Submit a page, such as the Features page, it will deliver
the following error: Reason: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/rcml/content/authoring/features/index_en.xml.rcml
(No such file or directory)
Check the log files.
File name:	/content/authoring/features/index_en.xml
full exception chain stacktrace[hide]

org.apache.lenya.cms.task.ExecutionException:
org.apache.lenya.workflow.WorkflowException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/workflow/history/authoring/features/index_en.xml
(No such file or directory)
	at
org.apache.lenya.cms.task.WorkflowInvoker.invokeTransition(WorkflowInvoker.java:233)
	at
org.apache.lenya.cms.task.DefaultTaskWrapper.execute(DefaultTaskWrapper.java:242)
	at org.apache.lenya.cms.cocoon.acting.TaskAction.act(TaskAction.java:62)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:124)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:89)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:180)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:606)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
Caused by: org.apache.lenya.workflow.WorkflowException:
javax.xml.transform.TransformerException: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/workflow/history/authoring/features/index_en.xml
(No such file or directory)
	at org.apache.lenya.workflow.impl.History.transitionFired(History.java:281)
	at
org.apache.lenya.workflow.impl.WorkflowInstanceImpl.invoke(WorkflowInstanceImpl.java:127)
	at
org.apache.lenya.workflow.impl.SynchronizedWorkflowInstancesImpl.invoke(SynchronizedWorkflowInstancesImpl.java:158)
	at
org.apache.lenya.cms.task.WorkflowInvoker.invokeTransition(WorkflowInvoker.java:229)
	... 52 more
Caused by: javax.xml.transform.TransformerException:
java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/workflow/history/authoring/features/index_en.xml
(No such file or directory)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:245)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:278)
	at org.apache.lenya.xml.DocumentHelper.writeDocument(DocumentHelper.java:199)
	at org.apache.lenya.workflow.impl.History.transitionFired(History.java:279)
	... 55 more
Caused by: java.io.FileNotFoundException:
file:/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/content/workflow/history/authoring/features/index_en.xml
(No such file or directory)
	at java.io.FileOutputStream.open(Native Method)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
	at
org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:235)
	... 58 more


This is my first attempt at a bug report so sorry if it's not proper.
Comment 1 Gregor J. Rothfuss 2005-03-30 06:24:06 UTC
(In reply to comment #0)
> When using Java 1.5 and attempting to create a new page 'foo2' with File->New

/home/skarn/src/lenya-1.2.2/build/lenya/webapp/lenya/pubs/default/config/tasks/targets.xml:138:
> org.apache.lenya.cms.authoring.CreatorException:
> javax.xml.transform.TransformerException: java.io.FileNotFoundException:

this is a known xalan bug: http://issues.apache.org/jira/browse/XALANJ-1978
Comment 2 Gregor J. Rothfuss 2005-03-30 06:54:23 UTC
since xalan is rather slow in fixing this bug, one way to solve this is to use
saxon 7.9 as xslt processor. saxon 7.9 needs to be copied into lib (the build
script adds libraries in lib into the classpath)

http://wiki.apache.org/cocoon/Saxon has instructions how to switch to saxon as
default xslt processor
Comment 3 Gregor J. Rothfuss 2005-05-06 17:21:43 UTC
*** Bug 34785 has been marked as a duplicate of this bug. ***
Comment 4 Markus Angst 2005-08-14 18:33:48 UTC
(In reply to comment #2)
> since xalan is rather slow in fixing this bug, one way to solve this is to use
> saxon 7.9 as xslt processor. saxon 7.9 needs to be copied into lib (the build
> script adds libraries in lib into the classpath)

Download xalan-j_2_7_0-bin.zip from http://xml.apache.org/xalan-j/downloads.html.
Go to $LENYA_HOME/build/lenya/webapp/WEB-INF/lib and replace
xalan-2.6.1-dev-20041008T0304.jar with xalan.jar, replace xml-apis.jar and
xercesImpl.jar with the versions from the downloaded ZIP file and add
serializer.jar. Seems to have worked for me so far.
Comment 5 Jan Metzner 2006-01-27 17:14:11 UTC
Since lenya 1.4 does not contain xalan and cocoon 2.1.x contains xalan-2.7.0.jar
this should work.
Comment 6 Antonio Gallardo 2006-05-07 04:04:03 UTC
I was unable to reproduce this error in lenya 1.4. It simply works as expected.
Comment 7 Antonio Gallardo 2006-05-07 05:11:00 UTC
I compiled and ran current lenya 1.2.x branch with java 1.5. I followed the
instructions and I was unable to reproduce this error. It is already fixed.

Please review and close the bug.
Comment 8 Antonio Gallardo 2007-03-21 21:37:00 UTC
*** Bug 40614 has been marked as a duplicate of this bug. ***