RE: [Barcode4j-users] barcode4j question

2010-12-09 Thread Eric Douglas
Are you failing an FOP transform?
Can you provide xml/xslt or fo to test?
 
I use 7-Zip to view jars.  Open your jars and look for the manifest
file.  Verify they don't have a classpath line, or make note of what
jars they refer to.
FOP has, or had in a previous version, a classpath in it's manifest.  I
found a couple of jars it requires which also had one and I downloaded
their source and removed it to recompile since we set up our classpaths
differently.
 
Web addresses in xslt do not require web access.  I wondered about that
when I was learning it as well.



From: John Brady [mailto:john.br...@aerlingus.com] 
Sent: Thursday, December 09, 2010 6:21 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: [Barcode4j-users] barcode4j question



Hi,

 

I see from the FOP site that "When using a servlet engine, there are
potential CLASSPATH issues, and potential conflicts with existing
XML/XSLT libraries. Servlet containers also often use their own
classloaders for loading webapps, which can cause bugs and security
problems."

 

The other thing that it could be is our test environment doesn't have
access to the Internet. The URI namespace is
"http://www.w3.org/1999/XSL/Format"; I understand that the namespace URI
strings are simply unique identifiers not valid URLs so I don't think
this would cause the application to fail.

 

Based on these possible causes, is there any information on the XML/XSLT
libraries that can be in conflict with FOP or do I need to have internet
access to transform the document.

 

One thing I have noticed when I do the following:

 

 FOElementMapping fem = new FOElementMapping();

 String namespaceURI = fem.getNamespaceURI();

 ElementMappingRegistry emr = new ElementMappingRegistry(fopFactory);

 String elementMapping = emr.getElementMapping(namespaceURI));

 

The elementMapping is null in my remote test environment and is set to
an instance of an object org.apache.fop.fo.foelementmapp...@57306c on my
local JBoss version. 

 

 

Best Regards, 

John 

 

..For low fares and great deals on hotels, car hire and travel insurance

visit http://www.aerlingus.com

***
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.  Any review, dissemination or other use of, or taking
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material. 

***
Aer Lingus Limited
Registered in Ireland
Company Number 9215
Registered Office at Dublin Airport, Dublin,Ireland.

***


RE: [Barcode4j-users] barcode4j question

2010-12-09 Thread John Brady
Hi,



I see from the FOP site that "When using a servlet engine, there are potential 
CLASSPATH issues, and potential conflicts with existing XML/XSLT libraries. 
Servlet containers also often use their own classloaders for loading webapps, 
which can cause bugs and security problems."



The other thing that it could be is our test environment doesn't have access to 
the Internet. The URI namespace is "http://www.w3.org/1999/XSL/Format"; I 
understand that the namespace URI strings are simply unique identifiers not 
valid URLs so I don't think this would cause the application to fail.



Based on these possible causes, is there any information on the XML/XSLT 
libraries that can be in conflict with FOP or do I need to have internet access 
to transform the document.



One thing I have noticed when I do the following:


 FOElementMapping fem = new FOElementMapping();
 String namespaceURI = fem.getNamespaceURI();
 ElementMappingRegistry emr = new ElementMappingRegistry(fopFactory);
 String elementMapping = emr.getElementMapping(namespaceURI));



The elementMapping is null in my remote test environment and is set to an 
instance of an object 
org.apache.fop.fo.foelementmapp...@57306c
 on my local JBoss version.





Best Regards,

John


..For low fares and great deals on hotels, car hire and travel insurance 
visit http://www.aerlingus.com
***
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.  Any review, dissemination or other use of, or taking
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material. 
***
Aer Lingus Limited
Registered in Ireland
Company Number 9215
Registered Office at Dublin Airport, Dublin,Ireland.
***


Re: [Barcode4j-users] barcode4j question

2010-12-07 Thread Jeremias Maerki
John,
I still think this is a class loading problem. You didn't say what kind
of server you're using. If, for some reasons, that server unpacks all
application JARs into a commons local directory and loads the classes
from there, it could possibily be so that Barcode4J's
META-INF/services/org.apache.fop.fo.ElementMapping file overwrote the
FOP one. That way, FOP doesn't find its own fo:* classes and that
UnknownXMLObj might be explained. You could try to temporarily remove
the Barcode4J FOP extension from the classpath and check if that changes
anything.

At any rate, you have to make sure the individual JARs are not merged
without special handling for the META-INF/services files and that all of
the JARs are associated with the same classloader(-hierarchy).

On 06.12.2010 20:26:05 John Brady wrote:
> Hi,
> 
> I have taken a clean version of fop.jar (FOP 0.95) from here:
> http://archive.apache.org/dist/xmlgraphics/fop/binaries/
> 
> I am still getting the same issue (error attached). It is throwing the error 
> at the following call (method attached):
> 
> transformer.transform(src, res);
> 
> I am able to get it to work in eclipse under test conditions but when I 
> deploy it to my UAT server it fail at the line above. I am thinking that I am 
> missing a jar on UAT that eclipse may have included. Do you know what else 
> could cause this issue? 
> 
> Best Regards,
> John Brady
> 
> IT Specialist 
> Aerlingus.com  
> 
>  
> 
> -Original Message-
> From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
> Sent: 29 November 2010 21:09
> To: John Brady
> Subject: Re: [Barcode4j-users] barcode4j question
> 
> Hi John
> 
> This smells like a class loading problem. I'd say that FOP
> hasn't found the file META-INF/services/org.apache.fop.fo.ElementMapping
> in the classpath. That usually doesn't happen. I can only imagine that
> you've unpacked fop.jar and repacked it in a different way so the
> plug-ins are not found. After all, the main ElementMapping services file
> is normally (!) in the same JAR as the ElementMappingRegistry.
> 
> On 29.11.2010 20:27:23 John Brady wrote:
> > Hi Jeremias,
> > 
> > I am at the stage now where I am integrating the code into the booking 
> > engine. I am looking to pipe the document through into the 
> > HttpServletResponse directly by returning a byte array. My previous tests 
> > were successful when writing the contents directly to a pdf file including 
> > the barcode. Now when I try to use ByteArrayOutputStream I get the error 
> > attached (line 222 = transformer.transform(src, res);). I am using Fop 
> > 0.95. The function I am using to create the byte array is also attached in 
> > the code.txt document. Is there something obvious I am missing?
> > 
> > Kind Regards,
> > John
> 
> 
> 
> Best regards,
> Jeremias Märki
> _
> Jeremias Märki, Software-Development and Consulting
> Contact Information: http://www.jeremias-maerki.ch/contact.html
> Blog: http://www.jeremias-maerki.ch/blog/
> 
> 
> ..For low fares and great deals on hotels, car hire and travel insurance 
> visit http://www.aerlingus.com
> ***
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed.  Any review, dissemination or other use of, or taking
> of any action in reliance upon, this information by persons or entities
> other than the intended recipient is prohibited.If you have received
> this email in error please notify the sender immediately and delete
> the material. 
> ***
> Aer Lingus Limited
> Registered in Ireland
> Company Number 9215
> Registered Office at Dublin Airport, Dublin,Ireland.
> ***




Jeremias Maerki


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



RE: [Barcode4j-users] barcode4j question

2010-12-06 Thread John Brady
Hi,

I have taken a clean version of fop.jar (FOP 0.95) from here:
http://archive.apache.org/dist/xmlgraphics/fop/binaries/

I am still getting the same issue (error attached). It is throwing the error at 
the following call (method attached):

transformer.transform(src, res);

I am able to get it to work in eclipse under test conditions but when I deploy 
it to my UAT server it fail at the line above. I am thinking that I am missing 
a jar on UAT that eclipse may have included. Do you know what else could cause 
this issue? 

Best Regards,
John Brady

IT Specialist 
Aerlingus.com  

 

-Original Message-
From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch] 
Sent: 29 November 2010 21:09
To: John Brady
Subject: Re: [Barcode4j-users] barcode4j question

Hi John

This smells like a class loading problem. I'd say that FOP
hasn't found the file META-INF/services/org.apache.fop.fo.ElementMapping
in the classpath. That usually doesn't happen. I can only imagine that
you've unpacked fop.jar and repacked it in a different way so the
plug-ins are not found. After all, the main ElementMapping services file
is normally (!) in the same JAR as the ElementMappingRegistry.

On 29.11.2010 20:27:23 John Brady wrote:
> Hi Jeremias,
> 
> I am at the stage now where I am integrating the code into the booking 
> engine. I am looking to pipe the document through into the 
> HttpServletResponse directly by returning a byte array. My previous tests 
> were successful when writing the contents directly to a pdf file including 
> the barcode. Now when I try to use ByteArrayOutputStream I get the error 
> attached (line 222 = transformer.transform(src, res);). I am using Fop 0.95. 
> The function I am using to create the byte array is also attached in the 
> code.txt document. Is there something obvious I am missing?
> 
> Kind Regards,
> John



Best regards,
Jeremias Märki
_
Jeremias Märki, Software-Development and Consulting
Contact Information: http://www.jeremias-maerki.ch/contact.html
Blog: http://www.jeremias-maerki.ch/blog/


..For low fares and great deals on hotels, car hire and travel insurance 
visit http://www.aerlingus.com
***
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.  Any review, dissemination or other use of, or taking
of any action in reliance upon, this information by persons or entities
other than the intended recipient is prohibited.If you have received
this email in error please notify the sender immediately and delete
the material. 
***
Aer Lingus Limited
Registered in Ireland
Company Number 9215
Registered Office at Dublin Airport, Dublin,Ireland.
***
2010:12:06:18:39:10:091:main  :WARN :fo.ElementMappingRegistry:Unknown 
formatting object http://www.w3.org/1999/XSL/Format^root
2010:12:06:18:39:10:341:main  
:ERROR:action.DisplayAdvanceBoardingPassLookupDispatchAction:TransformerException:
 [s]
javax.xml.transform.TransformerException: org.apache.fop.fo.UnknownXMLObj
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1151)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:590)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1037)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1015)
at 
com.aerlingus.business.booking.boardingpass.BoardingPassesGeneratorDelegate.convertToPDF(BoardingPassesGeneratorDelegate.java:238)
at 
com.aerlingus.obe.pnr.presentation.action.DisplayAdvanceBoardingPassLookupDispatchAction.printBoardingPass(DisplayAdvanceBoardingPassLookupDispatchAction.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at 
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:252)
at 
com.aerlingus.obe.presentation.action.ObeBaseLookupDispatchAction.execute(ObeBaseLookupDispatchAction.java:105)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:148