When I need to use document operations rather than a sax2 parser
through the XMLReaderFactory
reader, I set a system property which declares the first preferred
implementation of the factory:

String appEngineEnv =
System.getProperty("com.google.appengine.runtime.environment");

if (appEngineEnv != null &&
appEngineEnv.equalsIgnoreCase("Production")){ // else Development
        // avail in app engine:
        System.setProperty("javax.xml.parsers.SAXParserFactory",
 
"com.sun.org.apache.xerces.internal.parsers.SAXParserFactoryImpl");
}




On Apr 27, 8:58 pm, Sam <sam.stig...@gmail.com> wrote:
> Hi,
>
> I'm new to App Engine. I just spent the weekend porting my code over
> to Java. The major class in my app is a SAX XML parser that extends
> DefaultHandler. For some reason, I keep on getting errors similar to
> the following (extracted from the Eclipse debugger) whenever I try to
> get a PersistenceManager:
>
> Source not found
> -------------------------
> The JAR file /Applications/eclipse/plugins/
> com.google.appengine.eclipse.sdkbundle_1.4.3v201103311225/appengine-
> java-sdk-1.4.3/lib/usr/appengine-api-1.0-sdk-1.4.3.jar has no source
> attachment.
>
> You can attach source by clicking Attach Source below:
>
> // "Attach Source" button follows....
>
> I've tried deleting Eclipse and then re-install both it and the Google
> add-ons, but that didn't help. The error is happening both when I try
> to instantiate an instance of the PMF class as shown in the Guestbook
> example, and when I try to eliminate that by using the following line
> instead:
>
> PersistenceManager pm =
> javax.jdo.JDOHelper.getPersistenceManagerFactory().getPersistenceManager();
>
> My call stack for the main thread looks like the following every time
> it crashes:
>
> XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean)
> line: 820
> XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource)
> line: 737
> SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: 119
> SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource)
> line: 1205
> SAXParserImpl$JAXPSAXParser.parse(InputSource) line: 522
> SAXParserImpl$JAXPSAXParser.parse(String, DefaultHandler) line: 277
> MyServlet.doGet(HttpServletRequest, HttpServletResponse) line: 24
> MyServlet(HttpServlet).service(HttpServletRequest,
> HttpServletResponse) line: 617
> MyServlet(HttpServlet).service(ServletRequest, ServletResponse) line:
> 717
> ServletHolder.handle(ServletRequest, ServletResponse) line: 511
> ... and so on. I'm willing to send the entire callstack if anyone
> would find that helpful.
>
> Some classes I don't even get a "class not found" error for; just
> "Source not found." in red text with a button to edit the source
> lookup path. Those classes include XIncludeAwareParserConfiguration,
> SAXParserImpl$JAXPSAXParser, ServletHolder, ServeBlobFilter,
> ServletHandler, StaticFileFilter, SecurityHandler,
> DevAppEngineWebAppContext, JettyContainerService$ApiProxyHandler,
> Server, HttpConnection, HttpParser, and QueuedThreadPool$PoolThread.
>
> The classes that are getting the "class not found" errors are all
> saying the AppEngine jar doesn't have source attached to it, see
> above. They are: TransactionCleanupFilter, my servlet (which extends
> HttpServlet), SelectChannelConnector$ConnectorEndPoint.
>
> I'm stumped.
>
> Do you have any ideas?
>
> Thanks in advance,
>
> Sam Stigler
> sam.stig...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to