Re: org.xml.sax.SAXException: Unrecognized file format (.0,6) [ was: adding jars to 2.2 ]
Cannot really help you with this, but I would assume that at some point in the pipeline something is created that doesn't seem to be XML. The code in these jars you have added were tested, before using them with cocoon, I assume, so that one could rule out that the problem originates from there? Steven D. Majewski wrote: On Oct 8, 2009, at 8:25 AM, Andre Juffer wrote: Steven D. Majewski wrote: I call some java classes from flowscript that aren't included in the default 2.2 blocks. If I manually add the jars to ./target/rcl/webapp/WEB-INF/lib/, the errors go away. What is the right way to add these jars with maven ? For example: commons-codec-1.3.jar. How do you add a dependency for a .jar instead of a block ? Update the pom.xml (make dependencies) and ensure that the jars are in local repository. When creating the war file for deployment, these jars are automatically included. OK. I already had commons-codec in my .m2/repository, so I looked at it's .pom file to get artifact group id's and version number. I also added commons-transaction, which was not in my local repo. That generated an error with instructions for how to do 'mvn install:install-file'. After doing that I can jetty:run. Now, one one pipeline, I'm getting: Caused by: org.apache.cocoon.ProcessingException: Failed to process pipeline at map:serialize type=xml - file:///Users/sdm7g/DL/VIVAEAD/cocoon-app/restored/sitemap.xmap:190:37 at map:transform - file:///Users/sdm7g/DL/VIVAEAD/cocoon-app/restored/sitemap.xmap:187:47 at map:generate - file:///Users/sdm7g/DL/VIVAEAD/cocoon-app/restored/sitemap.xmap:186:52 at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:923) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:379) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439) 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:592) at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71) at $Proxy8.process(Unknown Source) at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:199) ... 77 more Caused by: org.xml.sax.SAXException: Unrecognized file format (.0,6) at org.apache.cocoon.components.sax.AbstractXMLByteStreamInterpreter.checkProlog(AbstractXMLByteStreamInterpreter.java:315) at org.apache.cocoon.components.sax.AbstractXMLByteStreamInterpreter.parse(AbstractXMLByteStreamInterpreter.java:93) at org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:44) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:358) Which seems to be from this code: private void checkProlog() throws SAXException { int valid = 0; int ch = 0; if ((ch = this.read()) == 'C') valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); if ((ch = this.read()) == 'X') valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); if ((ch = this.read()) == 'M') valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); if ((ch = this.read()) == 'L') valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); if ((ch = this.read()) == 1) valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); if ((ch = this.read()) == 0) valid++; else throw new SAXException(Unrecognized file format (. + valid + , + ch + )); } } I don't understand what it's trying to do here. Is the Unrecognized complaint on my xml input file ? ( Both the xml input and the xsl file start with ?xml version='1.0' ? the xsl has an excoding explicitly declared UTF-8, the xml does not. But both appear to use only simple ascii. ) What is the significance of the C -- is that a sax event code ? -- Steve Majewski - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org -- Andre H. Juffer | Phone: +358-8-553 1161 Biocenter Oulu and | Fax: +358-8-553-1141 Department of Biochemistry | Email:
xsp add cookie to response
Hi, I'm trying to send a cookie in a response using xsp but it's not working for me. I've tried using within xsp:logic org.apache.cocoon.environment.http.HttpCookie c = new org.apache.cocoon.environment.http.HttpCookie(thisuser, user); response.addCookie(c); and also tried xsp-response:add-cookiexsp:exprc/xsp:expr/xsp-response:add-cookie and have added lines in the xsp:page xmlns:xsp-cookie=http://apache.org/xsp/cookie/2.0; xmlns:xsp-response=http://apache.org/xsp/response/2.0; However when I look at the contents of the response I don't see the cookie appearing when using xsp-cookie:getCookies as=xml Could someone direct me to a solution please, Thanks in advance Frank -- View this message in context: http://www.nabble.com/xsp-add-cookie-to-response-tp25818271p25818271.html Sent from the Cocoon - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org
RE: embedding fonts
You refer to a D:/fop-fonts/config.xml in your sitemap ? Can you summarize what you are usingm what you have done so far and what you get at the end ? Thanks. From: Rover Rock [mailto:rockro...@gmail.com] Sent: jeudi, 8. octobre 2009 23:02 To: users@cocoon.apache.org Subject: Re: embedding fonts Ok, I see. Are the fonts provided through your config file Unicode fonts ? I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:) + When you use fop elements (in your xml or in a xsl) how are the fo:root parameters configured ? The Locale should be among them + the default font, …. I didnt configure fo:root parameters... � This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. � Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. � Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. � An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. � If you have received this email in error, please notify the sender immediately and delete the original.
Re: embedding fonts
Hello Do you have metrics files with hungarian characters? If I remember well you have to get ttf fonts with hungarian characters and build xml metric files with commands similar to these: java -classpath classes:lib\fop.jar;lib\avalon-framework- cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib \xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts \TIMES.ttf fonts\TIMES.xml java -classpath classes:lib\fop.jar;lib\avalon-framework- cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib \xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts \TIMESBD.ttf fonts\TIMESBD.xml java -classpath classes:lib\fop.jar;lib\avalon-framework- cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib \xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts \TIMESBI.ttf fonts\TIMESBI.xml java -classpath classes:lib\fop.jar;lib\avalon-framework- cvs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib \xalan-2.4.1.jar org.apache.fop.fonts.apps.TTFReader -d DEBUG fonts \TIMESI.ttf fonts\TIMESI.xml Then you build your configuration file userconfig.xml: configuration fonts font metrics-file=fonts/TIMES.xml kerning=yes embed-file=fonts/ TIMES.ttf font-triplet name=TimesNewRoman style=normal weight=normal/ /font font metrics-file=fonts/TIMESBD.xml kerning=yes embed- file=fonts/TIMESBD.ttf font-triplet name=TimesNewRoman,Bold style=normal weight=normal/ /font font metrics-file=fonts/TIMESBI.xml kerning=yes embed- file=fonts/TIMESBI.ttf font-triplet name=TimesNewRoman,BoldItalic style=normal weight=normal/ /font font metrics-file=fonts/TIMESI.xml kerning=yes embed- file=fonts/TIMESI.ttf font-triplet name=TimesNewRoman,Italic style=normal weight=normal/ /font /fonts /configuration Once you have done all this you can refer to your userconfig.xml in your sitemap. Ttf (true type fonts) can be found on the net or perhaps you have them in your operating system. Barara On 9 Oct, 2009, at 11:39 am, Laurent Medioni wrote: You refer to a D:/fop-fonts/config.xml in your sitemap ? Can you summarize what you are usingm what you have done so far and what you get at the end ? Thanks. From: Rover Rock [mailto:rockro...@gmail.com] Sent: jeudi, 8. octobre 2009 23:02 To: users@cocoon.apache.org Subject: Re: embedding fonts Ok, I see. Are the fonts provided through your config file Unicode fonts ? I use only the default install, i did not modify any config file and Unicode fonts settings. Where and what can i do?:) + When you use fop elements (in your xml or in a xsl) how are the fo:root parameters configured ? The Locale should be among them + the default font, ‚Ķ. I didnt configure fo:root parameters... ï This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. ï Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. ï Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. ï An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. ï If you have received this email in error, please notify the sender immediately and delete the original. - To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org