Hi Jochen,
    Here is the setup we are deploying to:
  • CrEme 4.1
  • Starting up the Java process using Microlaunch 2.0 (a JNLP implementation that runs with CrEme)
    When we deploy using xercesImpl.jar, the default properties are used and everything runs excellently.

    However, xercesImpl.jar runs a bit slow on CrEme. So we are trying to move to nanoXml.

    With regard to changing the SAX parser to nanoXml,  am I correct that you are referring to the properties file, jaxb.properties?

    So that jaxb.properties should look like :

javax.xml.bind.context.factory=org.apache.ws.jaxme.impl.JAXBContextImpl
javax.xml.parsers.SAXParserFactory=org.xml.sax.helpers.ParserAdapter
org.xml.sax.parser=net.n3.nanoxml.sax.SAXParser


    Initially we had some problems with loading the jaxb.properties file on the PDA using CrEme 4.1. The issue is related to loading a resource from a Jar file when running CrEme. My experience with CrEme is that you need to use:

            InputStream inputstream = getClass().getResourceAsStream(resourceName);

    to open a file from a Jar file on CrEme.

    The standard Java approach,

          URL resource = pClassLoader.getResource(resourceName);

    However, placing the jaxb.properties in a directory that is part of the default CrEme classpath gets the jaxb.properties loaded.

    Unfortunately, once the jaxb.properties file is found, we get ClassLoader issues (I am guessing related to starting in Microlaunch).

    A quick fix for me might be to make the default values in the code be the above and recompile the project. Thus, no problem loading jaxb.properties and no ClassLoader issues either.

    If I wanted to override the current defaults for the three properties above, what code would I change?

    Thanks,
    Doug


Jochen Wiedmann wrote:
Doug Clancey wrote:

    Does anyone know if NanoXML <http://nanoxml.cyberelf.be/> can be used as the XML parser for JaxMe?

    NanoXML is SAX 1.0 Compliant.

Why do you want to use it?

Basically, there is no problem. See the class
   org.xml.sax.helpers.ParserAdapter


In other words, setting the property javax.xml.parsers.SAXParserFactory to the fully qualified name of the Parser class and the property org.xml.sax.parser to the NanoXML implementation of Parser should do the trick.


Jochen





--
Doug Clancey
Software Architect
Gruby Technologies
Office: (701)223-9113
Direct: (952)412-8196
Fax: (701)223-4255
Privilege & Confidentiality Notice
This is a transmission from Gruby Technologies and may contain information which is privileged, confidential, and protected. This transmission is for the intended recipient only. If you are not the intended recipient, please destroy this transmission (and any attachments) without retaining a copy and advise the sender immediately (via e-mail). Unauthorized use or distribution is prohibited and may be unlawful.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to