Hi,

I made further investigations. The strange thing about this error is
the fact that AccessControlException occurs for my project's src
directory. The path, which the error message specifies, is even an
absolute windows path. However, the resource files, which I open
inside the program, are located inside war/WEB-INF.

Searching the internet, I found the following explanation (Citation
from http://forums.sun.com/thread.jspa?threadID=5370375):
"we encountered this as well. upon investigating into the depths of
the transformer code, the problem seems to be that the class
SyntheticRepository is making a call to ClassPath.getClassPath() which
attempts to access all the directories listed in various system
classpaths. if the calling code does not have read access to these
paths, then the call throws a securityexception and the
SyntheticRepository class fails to load, which borks the overall
transformer initialization. the kicker in all of this, is that the
call to ClassPath.getClassPath() seems entirely extraneous, as the
results of the call are never actually used for anything! it's pretty
much a bug."

In the following you can find a code snippet which works on a local
tomcat server however fails on gwt/gae. It considers already the
workaround for the bug emurmur mentioned. You can take the stylesheet
from
http://www.antennahouse.com/XSLsample/sample-xsl-xhtml2fo/xhtml2fo.xsl

protected void doGet(HttpServletRequest request,HttpServletResponse
response) throws ServletException, IOException
{
 
System.setProperty("javax.xml.transform.TransformerFactory","com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");

   String xslInputFilename = "/WEB-INF/xhtml2fo.xsl";

   TransformerFactory factory = TransformerFactory.newInstance();
   factory.setAttribute("debug", true);

   try {
      Transformer transformer = factory.newTransformer(new
StreamSource(getServletContext().getResourceAsStream(xslInputFilename)));
   } catch (TransformerConfigurationException e) {
   e.printStackTrace();
  }
}

I would really appreciate further help. Especially a workaround for
the misbehaviour of SyntheticRepository would be nice.
Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to