Re: [Resin-interest] TransformerException: org.xml.sax.SAXNotSupportedException - generate PDF

2008-02-20 Thread Daniel López
Hia,

 From the stacktrace, it seems that you are using Xalan as XSLT engine 
but Caucho's implementation as XML parser. It usually works better if 
you can either use Xalan with Xerces or Caucho's XLST engine + parser. 
Theoretically, mixing should work fine, but you have to get the right 
versions that implement the same versions of the compatible specs. etc., 
so it's usually better to play safe and use the pair that are know to 
work fine together.

S!
D.

Hints:
javax.xml.transform.TransformerException:
...
at org.apache.xalan.transformer.TransformerIdentityImpl.transform
...
org.xml.sax.SAXNotSupportedException: ...
at com.caucho.xml.AbstractParser.setProperty
...


TROISSNER Joerg escribió:
> Hello
> 
> 
> I want to change from fop 0.20 to fop 094 and it works fine with 
> standalone examples and also with tomcat but when i try with resin i got 
> the following exception:
> 
> 
> 
> *public** void* convertFO2PDF(File fo, File pdf, PrintWriter 
> out)* throws* IOException, FOPException
> {
> OutputStream outx =* null*;
>* try*
> {
> FOUserAgent foUserAgent = 
> fopFactory.newFOUserAgent();
> // configure foUserAgent as desired
>
>
> outx =* new* FileOutputStream(pdf);
> outx =* new* 
> BufferedOutputStream(outx);
>
> // Construct fop with desired output 
> format
> Fop fop = 
> fopFactory.newFop(MimeConstants./MIME_PDF/, foUserAgent, outx);
>
> TransformerFactory factory =* new* 
> org.apache.xalan.processor.TransformerFactoryImpl();
> 
>// TransformerFactory factory = new 
> org.apache.xalan.xsltc.trax.TransformerFactoryImpl(); //OLD ONE WOERKS FINE!
> 
> //TransformerFactory factory = 
> TransformerFactory.newInstance();
>
> Transformer transformer = 
> factory.newTransformer(); // identity transformer
>
> mylog(factory.getClass().getName());
> 
> mylog(transformer.getClass().getName());
> 
> Source src =* new* StreamSource(fo);
>
>
>// DefaultHandler dh = 
> fop.getDefaultHandler();
>// Result res = new SAXResult(dh);
>
> Result res =* new* 
> SAXResult(fop.getDefaultHandler());
>   
>
>   
>* try*
> {
> transformer.transform(src, res);
> }*catch*(Exception e1)
> {
> mylog2("ERROR:" + e1.toString());
> 
> out.println("");
> e1.printStackTrace(out);
> 
> out.println("");
> }
>
>   
>
>// Result processing
> FormattingResults foResults = 
> fop.getResults();
> java.util.List pageSequences = 
> foResults.getPageSequences();
>for (java.util.Iterator it = 
> pageSequences.iterator(); it.hasNext();)
> {
>   PageSequenceResults 
> pageSequenceResults = (PageSequenceResults)it.next();
>  System.out.println("PageSequence "
> + 
> (String.valueOf(pageSequenceResults.getID()).length() > 0
>  ? 
> pageSequenceResults.getID() : "")
> + " generated " + 
> pageSequenceResults.getPageCount() + " pages.");
> }  
>
>
> }* catch* (Exception e)
> {
> mylog(e.toString());
> out.println("");
>

Re: [Resin-interest] 2008-02-20 snapshot

2008-02-20 Thread Scott Ferguson

On Feb 20, 2008, at 1:17 PM, Jan Kriesten wrote:

>
> Hi Scott,
>
>>> 500 Servlet Exception
>>> [show] 'QName[{}value]' is an unknown property of
>>> 'com.caucho.server.webapp.Application'
>>>
>> Can you send the stack trace?  It should have included the line  
>> number.
>>
>> The problem is probably a bad resin.conf (a  section) or
>> web.xml.  Possibly some extraneous text outside the configuration (?)
>
> actually, that's the only line I get - nothing more (no line number or
> anything)! :-O

The [show] should be clickable, although it needs some updating in the  
next snapshot.

Can you send the relevant configuration files?  I don't see how it  
should be possible to get that exception with a normal config file.

-- Scott

>
>
> The last working version of resin for me is resin-pro-3.1.s080208
>
> Maybe my post "Re: [Resin-interest] 2008-02-16 snapshot release" may  
> give a hint
> what's wrong (I guess you missed that one)?
>
> Best regards, --- Jan.
>
>
>
>
> ___
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] 2008-02-20 snapshot

2008-02-20 Thread Jan Kriesten

Hi Scott,

>> 500 Servlet Exception
>> [show] 'QName[{}value]' is an unknown property of
>> 'com.caucho.server.webapp.Application'
>> 
> Can you send the stack trace?  It should have included the line number.
> 
> The problem is probably a bad resin.conf (a  section) or  
> web.xml.  Possibly some extraneous text outside the configuration (?)

actually, that's the only line I get - nothing more (no line number or 
anything)! :-O

The last working version of resin for me is resin-pro-3.1.s080208

Maybe my post "Re: [Resin-interest] 2008-02-16 snapshot release" may give a 
hint 
what's wrong (I guess you missed that one)?

Best regards, --- Jan.




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] 2008-02-20 snapshot

2008-02-20 Thread Scott Ferguson

On Feb 20, 2008, at 10:19 AM, Jan Kriesten wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> Hi Scott,
>
> | A new snapshot is available.  This one is getting close to a  
> release,
> | so any bugs you run into are very likely real issues that should be
> | reported to the bug tracker at http://bugs.caucho.com.
>
> I get the following error with the latest snapshot:
>
> 500 Servlet Exception
> [show] 'QName[{}value]' is an unknown property of
> 'com.caucho.server.webapp.Application'

Can you send the stack trace?  It should have included the line number.

The problem is probably a bad resin.conf (a  section) or  
web.xml.  Possibly some extraneous text outside the configuration (?)

-- Scott
>
>
> Could you tell me where this could come from - the logs don't give  
> any more clues.
>
> Best regards, --- Jan.
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (Darwin)
>
> iD8DBQFHvG8WLcYXCUxYsy4RAs1qAKC+VFHef97Rclvm+Y9d07wfN3OZQQCfbnjb
> WVDaLknJ78/sjthGxkmFo74=
> =SbuR
> -END PGP SIGNATURE-
>
>
> ___
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] 2008-02-20 snapshot

2008-02-20 Thread Jan Kriesten
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi Scott,

| A new snapshot is available.  This one is getting close to a release,
| so any bugs you run into are very likely real issues that should be
| reported to the bug tracker at http://bugs.caucho.com.

I get the following error with the latest snapshot:

500 Servlet Exception
[show] 'QName[{}value]' is an unknown property of
'com.caucho.server.webapp.Application'

Could you tell me where this could come from - the logs don't give any more 
clues.

Best regards, --- Jan.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHvG8WLcYXCUxYsy4RAs1qAKC+VFHef97Rclvm+Y9d07wfN3OZQQCfbnjb
WVDaLknJ78/sjthGxkmFo74=
=SbuR
-END PGP SIGNATURE-


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] TransformerException: org.xml.sax.SAXNotSupportedException - generate PDF

2008-02-20 Thread TROISSNER Joerg
Hello 


I want to change from fop 0.20 to fop 094 and it works fine with
standalone examples and also with tomcat but when i try with resin i got
the following exception:



public void convertFO2PDF(File fo, File pdf, PrintWriter out)
throws IOException, FOPException 
{
OutputStream outx = null;
try 
{
FOUserAgent foUserAgent =
fopFactory.newFOUserAgent();
// configure foUserAgent as desired


outx = new FileOutputStream(pdf);
outx = new
BufferedOutputStream(outx);

// Construct fop with desired output
format
Fop fop =
fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, outx);

TransformerFactory factory = new
org.apache.xalan.processor.TransformerFactoryImpl();
   // TransformerFactory factory = new
org.apache.xalan.xsltc.trax.TransformerFactoryImpl(); //OLD ONE WOERKS
FINE!
//TransformerFactory factory =
TransformerFactory.newInstance();

Transformer transformer =
factory.newTransformer(); // identity transformer

mylog(factory.getClass().getName());

mylog(transformer.getClass().getName());

Source src = new StreamSource(fo);


   // DefaultHandler dh =
fop.getDefaultHandler();
   // Result res = new SAXResult(dh);

Result res = new
SAXResult(fop.getDefaultHandler());
   

   
try
{
transformer.transform(src, res);
}catch(Exception e1) 
{
mylog2("ERROR:" +
e1.toString());

out.println("");
e1.printStackTrace(out);

out.println("");
}

   

   // Result processing
FormattingResults foResults =
fop.getResults();
java.util.List pageSequences =
foResults.getPageSequences();
   for (java.util.Iterator it =
pageSequences.iterator(); it.hasNext();) 
{
  PageSequenceResults
pageSequenceResults = (PageSequenceResults)it.next();

System.out.println("PageSequence " 
+
(String.valueOf(pageSequenceResults.getID()).length() > 0 
 ?
pageSequenceResults.getID() : "") 
+ " generated " +
pageSequenceResults.getPageCount() + " pages.");
}   


} catch (Exception e) 
{
mylog(e.toString());
out.println("");
out.println("");
out.println(e.toString());
out.println("");
out.println("");
out.println("");
} finally 
{
outx.close();
}
}

javax.xml.transform.TransformerException:
org.xml.sax.SAXNotSupportedException:
http://xml.org/sax/handlers/DeclHandler
at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transform
erIdentityImpl.java:502)
at
j_servlets.j_testservlet.convertFO2PDF(j_testservlet.java:133)
at j_servlets.j_testservlet.doGet(j_testservlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:91)
at
com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChai
n.java:103)
at
com.caucho.server.cache.CacheFilte

[Resin-interest] 2008-02-20 snapshot

2008-02-20 Thread Scott Ferguson
A new snapshot is available.  This one is getting close to a release,  
so any bugs you run into are very likely real issues that should be  
reported to the bug tracker at http://bugs.caucho.com.

The snapshot includes fixes for the Terracotta startup issues, the  
wiki page is http://wiki.caucho.com/Terracotta.

The Hibernate wiki pages has also been updated at 
http://wiki.caucho.com/Hibernate 
.

The actual release will probably be over the weekend.

-- Scott


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest