Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Exception of Clock Sample in Ubuntu

2011-12-15
2013-05-02
  • pengran zhao
    pengran zhao
    2011-12-15

    Hi Everyone,

    I am trying to run the ClockFrame sample but got some exceptions in Ubuntu 10. According to the guide, I have copied the jar packages of Apache Xerces, kXML2, JAXP, XMLPull  and Cyberlink to JRE path: /usr/lib/jvm/java-6-sun-1.6.0.26/jre. So I think the configuration is right. The exception message is as following:

    CyberGarage warning : org.cybergarage.xml.ParserException: org.xmlpull.v1.XmlPullParserException: could not load any factory class (even small or full default implementation); nested exception is:
    org.kxml2.io.XmlReader
    org.cybergarage.upnp.device.InvalidDescriptionException: org.cybergarage.xml.ParserException: org.xmlpull.v1.XmlPullParserException: could not load any factory class (even small or full default implementation); nested exception is:
    org.kxml2.io.XmlReader
    at org.cybergarage.upnp.Device.loadDescription(Device.java:577)
    at org.cybergarage.upnp.Device.<init>(Device.java:228)
    at ClockDevice.<init>(ClockDevice.java:27)
    at ClockFrame.<init>(ClockFrame.java:31)
    at ClockFrame.main(ClockFrame.java:135)
    Exception in thread "main" java.lang.NullPointerException
    at ClockFrame.start(ClockFrame.java:80)
    at ClockFrame.main(ClockFrame.java:136)

    I am new to UPNP. Can anyone kindly give me some help? Thank you very much.

    Peng

     
  • pengran zhao
    pengran zhao
    2011-12-15

    One more thing…I just checked the source code of kxml2. There is no org.kxml2.io.XmlReader in the path. Maybe the packages are not compatible? Please help me. Thank you.

     
  • Satoshi Konno
    Satoshi Konno
    2011-12-19

    Hi,

    Could you remove your kXML parser from in your JRE directory ?

    I have used the kXML parser on Android 1.6 under, but the parser is not supported on
    the latest Android version. Thus, the implementation is no good.

    Best Regards,

    Satoshi Konno

     
  • pengran zhao
    pengran zhao
    2011-12-29

    First, thank you for your reply. I have solve the issue in my way. What I have done is as following:

    1. Remove all the jar packages from the jre directory.
    2. Only add clink210.jar and kxml2.jar as a external jar files in the project property in Eclipse.

    This is wired. Maybe the jar packages will conflict in some way if we add all of them. By the way, I don't think it is a good idea to copy all packages to jre directory. It will make other applications also load these jar packages.

    Welcome for any advice.

     
  • pengran zhao
    pengran zhao
    2011-12-29

    And by the way, I found that the control point doesn't display the device some times. I will look at it. If I can't solve it, I will post another topic for the issue. But of course, any advice is welcome.