D'Arcy from Winnipeg
Solution Architecture, Business & Entrepreneurship, Microsoft, and Adoption

NFOP: Resource Bundle Not Found

Monday, March 13, 2006 9:16 PM

For anyone that's using the NFOP library for outputting xsl-fo to pdf, if you get the error “Resource Bundle Not Found” when your driver.run( ) command is hit, it could be that your xsl-fo isn't well formed. I was running into this and couldn't figure out why it was happening (not too many Google results other than off of Sourceforge). I finally found a post on Sourceforge that said to verify that your fo syntax was correct. Voila!



# re: NFOP: Resource Bundle Not Found

If you get user defined fonts working could you please tell me?

I looked at this 6 months ago (PDF for volvo configurator), but the lack of font support killed it. (Looking at the code you can see where the non-working code for font loading is commented out).

I contacted the project admin though sourceforge, and he said:
1) hasn't been touched in over a year
2) feel free to fix it yourself. >:(

I seriously considered it, but it would have taken too much time.

Cam 3/14/2006 12:04 PM | Cam Smith

# re: NFOP: Resource Bundle Not Found

The Resource Bundle Not Found exception is caused by the fact that resources (such as properties files) are not handled the same way in .Net as in Java. The runtime is looking up a message to display and getting an error when trying to load the resource. (of course the message is most likely because of a bad fo file, but that's a different issue)

To correct the Resource Bundle Not Found error:
in VS2003, search the J# samples for vjsresgen - this is a program that will convert entire properties files to an resx file. Download the solution and build it to get the vjsresgen.exe program.
In the xerces-2_0_2\src\org\apache\xerces\impl\msg directory, run the program like this:

vjsresgen /out:Messages.resx *.properties

This will create the Messages.resx file in this folder. Add it to the project.

Search for and replace org.apache.xerces.impl.msg.XMLMessages and org.apache.xerces.impl.xs.XMLSchemaMessages and take off the org...msg prefix and rebuild.

You should now see the error messages as intended by the original authors which should help you find the fo error.

Toby 8/15/2006 6:24 AM | Toby Kraft

# re: NFOP: Resource Bundle Not Found

Awesome, thanks for the reply Toby.

D 8/15/2006 6:31 AM | D'Arcy from Winnipeg

# re: NFOP: Resource Bundle Not Found

Thank you! 10/12/2007 9:53 AM | Aaron Schurg

Post a comment