Bug 689930 - SEVERE: javax.xml.transform.TransformerException: File event-model.xml not found
Summary: SEVERE: javax.xml.transform.TransformerException: File event-model.xml not found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fop
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ruediger Landmann
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 700709 (view as bug list)
Depends On:
Blocks: 494832 688554 718085
TreeView+ depends on / blocked
 
Reported: 2011-03-22 19:57 UTC by Hans Ulrich Niedermann
Modified: 2011-09-25 03:30 UTC (History)
13 users (show)

Fixed In Version: fop-1.0-17.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-25 03:30:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log of failing erlang build (72 bytes, text/plain)
2011-03-22 20:04 UTC, Hans Ulrich Niedermann
no flags Details

Description Hans Ulrich Niedermann 2011-03-22 19:57:59 UTC
Description of problem:

  Building the erlang package including docs fails when it calls fop.

Version-Release number of selected component (if applicable):

  fop-1.0-14.fc16.noarch

How reproducible:

  100%

Steps to Reproduce:
1. fedpkg clone erlang
2. cd erlang
3. fedpkg build --scratch
  
Actual results:

  Failed build. See

  http://koji.fedoraproject.org/koji/taskinfo?taskID=2933528
  http://koji.fedoraproject.org/koji/getfile?taskID=2933528&name=build.log

Expected results:

  Successful build of erlang package.

Additional info:

  We can work around this with pre-built erlang docs if necessary.

Comment 1 Hans Ulrich Niedermann 2011-03-22 20:00:14 UTC
Note that building the same erlang package for f14 and f15 works, it is just rawhide which fails. This might be connected to fop-1.0 vs fop-0.9x

Comment 2 Hans Ulrich Niedermann 2011-03-22 20:04:05 UTC
Created attachment 486887 [details]
build.log of failing erlang build

The build.log from the failed koji build of the erlang package.

Comment 3 Hans Ulrich Niedermann 2011-03-31 23:07:20 UTC
Ping?

Comment 4 Ruediger Landmann 2011-03-31 23:21:35 UTC
Hi Hans, yes, this is almost certainly due to a difference between FOP 0.9 and FOP 1.0; I've seen a similar error in another tool that uses FOP (Publican). I'll update as soon as I know more.

Cheers
Rudi

Comment 5 Hans Ulrich Niedermann 2011-04-01 00:08:35 UTC
Ah, good to see confirmation.

I have just implemented a workaround for the erlang package build (using prebuilt docs instead of of rebuilding them).

I will keep that workaround for the time being until fop works again and will keep tracking this bug in the mean time.

Comment 6 Ruediger Landmann 2011-05-02 23:17:22 UTC
*** Bug 700709 has been marked as a duplicate of this bug. ***

Comment 7 Scott Radvan 2011-05-05 01:42:38 UTC
If it helps, here's the full exception it throws for me when building locally:

publican-2.5-2.fc15.noarch





SEVERE: Exception
java.util.MissingResourceException: File event-model.xml not found
	at org.apache.fop.events.DefaultEventBroadcaster.loadModel(DefaultEventBroadcaster.java:83)
	at org.apache.fop.events.DefaultEventBroadcaster.getEventProducerModel(DefaultEventBroadcaster.java:114)
	at org.apache.fop.events.DefaultEventBroadcaster.createProxyFor(DefaultEventBroadcaster.java:142)
	at org.apache.fop.events.DefaultEventBroadcaster.getEventProducerFor(DefaultEventBroadcaster.java:129)
	at org.apache.fop.fonts.FontEventProducer$Provider.get(FontEventProducer.java:43)
	at org.apache.fop.fonts.FontEventAdapter.getEventProducer(FontEventAdapter.java:44)
	at org.apache.fop.fonts.FontEventAdapter.fontLoadingErrorAtAutoDetection(FontEventAdapter.java:56)
	at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:262)
	at org.apache.fop.fonts.FontAdder.add(FontAdder.java:60)
	at org.apache.fop.fonts.FontDetector.detect(FontDetector.java:90)
	at org.apache.fop.fonts.FontInfoConfigurator.configure(FontInfoConfigurator.java:92)
	at org.apache.fop.render.PrintRendererConfigurator.buildFontList(PrintRendererConfigurator.java:106)
	at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:129)
	at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)
	at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:181)
	at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:73)
	at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130)
	at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:102)
	at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:359)
	at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)
	at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)
	at org.apache.fop.apps.Fop.<init>(Fop.java:79)
	at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:109)
	at org.apache.fop.cli.Main.startFOP(Main.java:174)
	at org.apache.fop.cli.Main.main(Main.java:204)
	Finished pdf


No .pdf file is written to tmp/.. when this error occurs.

Comment 8 sandeep shedmake 2011-05-05 04:13:07 UTC
(In reply to comment #7)
  
> No .pdf file is written to tmp/.. when this error occurs.

Acknowledged (See Comment 6 of this bug).

Comment 9 Ruediger Landmann 2011-06-06 02:09:20 UTC
So, the various event-model.xml files that should be packed into fop-1.0.jar are not getting generated by the ant resourcegen task at build time. Still working on this.

Comment 10 Ruediger Landmann 2011-06-16 02:10:43 UTC
Comparing the package built on Koji with the binary available upstream, it seems that there should be one of these event model files for most of the classes in the .jar, but they're simply not created at build time.

The problem is in our EventProducerCollector, which is patched to use a different version of qdox (1.12) from the one that upstream bundles with FOP (1.6). Specifically, clazz.getParentClass() is always null and would result in a null pointer exception:

/home/rlandmann/rpmbuild/BUILD/fop-1.0/build.xml:374: java.lang.NullPointerException
        at com.thoughtworks.qdox.model.JavaMethod.getReturnType(JavaMethod.java:464)
        at com.thoughtworks.qdox.model.JavaMethodDelegate.getReturnType(JavaMethodDelegate.java:26)
        at com.thoughtworks.qdox.model.JavaMethodDelegate.getReturnType(JavaMethodDelegate.java:166)
        at org.apache.fop.tools.EventProducerCollector.createMethodModel(EventProducerCollector.java:142)
        at org.apache.fop.tools.EventProducerCollector.processEventProducerInterface(EventProducerCollector.java:130)
        at org.apache.fop.tools.EventProducerCollector.scanFile(EventProducerCollector.java:99)
        at org.apache.fop.tools.EventProducerCollectorTask.processFileSets(EventProducerCollectorTask.java:213)
        at org.apache.fop.tools.EventProducerCollectorTask.execute(EventProducerCollectorTask.java:69)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

...except that we have a check at lines 125-127 that just quits if clazz.getParentClass() is null.

Comment 11 Andrew Overholt 2011-06-16 18:43:22 UTC
Alex Kurtakov and I took a look at this today.  svn revision 1066078 is the one where upstream moved to the version of qdox we have in Fedora.  Alex has already added that as a patch.  We tried building a trunk checkout and not surprisingly this works.  When we try to use the JARs that Fedora ships for the dependencies, it fails because fop trunk is using an SVN snapshot JAR of xmlgraphics-commons.

Has anyone spoken with upstream about the situation?

Comment 12 Ruediger Landmann 2011-06-16 22:28:21 UTC
(In reply to comment #11)
> Alex Kurtakov and I took a look at this today.  svn revision 1066078 is the one
> where upstream moved to the version of qdox we have in Fedora.  Alex has
> already added that as a patch.  We tried building a trunk checkout and not
> surprisingly this works.  When we try to use the JARs that Fedora ships for the
> dependencies, it fails because fop trunk is using an SVN snapshot JAR of
> xmlgraphics-commons.
> 
> Has anyone spoken with upstream about the situation?

Ah, I (obviously) hadn't spotted the difference in xmlgraphics-commons.

I posted to fop-dev list a couple of days ago with the same information I included in comment #10 above; no reply yet.

I'll fine-tune the question to the list in light of this new information -- many thanks! :)

Comment 13 Jared Smith 2011-06-21 02:29:48 UTC
FWIW, this seems related to https://issues.apache.org/bugzilla/show_bug.cgi?id=50575.

In both cases, it seems that the Fedora/RHEL packages are missing the event models, while the binaries provided upstream contain them.

Comment 14 Stephen Gordon 2011-06-21 05:47:51 UTC
After further investigation of this it seems that taking the source tgz (un-patched) and gradually removing each of the bundled libs (modifying the classpaths in build.xml accordingly) I was able to build against the Fedora packaged versions of the library and still got event-model.xml files generated out of the build.

The notable exception of course is qdox which requires the bundled patch to handle an NPE - unfortunately it then fails silently and no event-model.xml files are generated as was previously the case.

It seems based on the above, and Rudi's verification of my results, that the xmlgraphics-common bundling while poor form is probably a furphy. That said it remains unclear as to what has changed that has made the qdox patch ignore more classes than i did previously.

Comment 15 William Cohen 2011-06-23 19:41:16 UTC
This is fixed with fop-1.0-16.fc16  on rawhide. Downgraded to fop-1.0-14.fc16 things failed. Reinstall fop-1.0.16.fc16 and able to generate pdf file.

Comment 16 Jared Smith 2011-06-24 15:56:23 UTC
I can confirm that fop 1.0-16 indeed fixed the problem.

Comment 17 Paul Morgan 2011-06-28 16:26:53 UTC
fop-1.0-16.fc16.noarch from rawhide is working for me, too.
My java version fwiw is java-1.6.0-openjdk-1.6.0.0-58.1.10.2.fc15.x86_64

Comment 18 Frank Ch. Eigler 2011-07-08 02:26:00 UTC
Confirmed, 1.0-16.fc16 solves this and bug #704298 for me on f15.

Comment 19 Ruediger Landmann 2011-08-28 23:48:45 UTC
(In reply to comment #13)
> FWIW, this seems related to
> https://issues.apache.org/bugzilla/show_bug.cgi?id=50575.
> 
> In both cases, it seems that the Fedora/RHEL packages are missing the event
> models, while the binaries provided upstream contain them.

Debian too now; I've updated the upstream bug to point here.

Unfortunately, we can't ship the (working) 1.0-16 to get around this issue, since building it relies on a really ugly hack: basically, I just extracted the various event-model.xml files from the upstream binary, tarred them up, then inserted them in the appropriate places at build time; they weren't actually generated during the build.

I don't think we should be shipping stuff that we can't build without resorting to such tricks :(

Comment 20 Fedora Update System 2011-09-07 06:56:14 UTC
fop-1.0-17.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/fop-1.0-17.fc15

Comment 21 Fedora Update System 2011-09-08 06:58:21 UTC
Package fop-1.0-17.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fop-1.0-17.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/fop-1.0-17.fc15
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2011-09-25 03:30:10 UTC
fop-1.0-17.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.