Skip navigation
5066 Views 8 Replies Latest reply: Sep 15, 2009 9:30 AM by Guenther Niess RSS
_sTe_ Bronze 1 posts since
Mar 20, 2009
Currently Being Moderated

Mar 20, 2009 5:12 AM

whack weather example usage

ez all

i'm pretty new with whack and i have some perplexities about the weather example...i built it, run it: now what? how i can use it? i suppose i have to write a client plugin but...

 

thanks!

  • Guenther Niess KeyContributor 305 posts since
    Jun 19, 2008
    Currently Being Moderated
    May 10, 2009 6:07 AM (in response to _sTe_)
    Re: whack weather example usage

    Hi, for testing you can use Psi for example, add your weather component in your buddy list and send him a message with a weather station from http://weather.noaa.gov/ (see the attached screenshot).But for a comfortable usage, yeah, maybe you can write a client

    Attachments:
  • ayyrk Bronze 7 posts since
    Jul 27, 2007
    Currently Being Moderated
    Jun 25, 2009 5:57 AM (in response to _sTe_)
    Re: whack weather example usage

    I read that the weather example was in a sample folder in the source. I downloaded the source zip and did not find it.

     

    Q: Where are you getting the weather example these days?

     

    Thanks,

    • Guenther Niess KeyContributor 305 posts since
      Jun 19, 2008
      Currently Being Moderated
      Jun 25, 2009 6:08 AM (in response to ayyrk)
      Re: whack weather example usage

      You can get it via subversion

       

      svn co http://svn.igniterealtime.org/svn/repos/whack/trunk whack
      

       

      But currently I think you can't compile the trunk if you don't fix some old references. See my attached patch to compile and run the actual revision (11087).

       

      Best regards

      Attachments:
      • ayyrk Bronze 7 posts since
        Jul 27, 2007
        Currently Being Moderated
        Jun 25, 2009 11:21 AM (in response to Guenther Niess)
        Re: whack weather example usage

        I changed the whack.jar build compile target includes in order to pick up the xmpp classes. That allowed me to use whack.jar in my component project. I hope I'm on the right track..

        Thanks!

         

         

        <target name="jar" depends="compile" unless="jar.uptodate" description="Produces whack.jar">
                <jar destfile="${jar.dest.dir}/whack.jar"
                     basedir="${compile.dir}"
                     includes="org/**/*.class" />
                  <!-- includes="org/jivesoftware/whack/**/*.class" -->
        </target>

        • ayyrk Bronze 7 posts since
          Jul 27, 2007
          Currently Being Moderated
          Jun 25, 2009 12:24 PM (in response to ayyrk)
          Re: whack weather example usage

          1) I rebuild whack.jar from SVN - just needed to modify the build.xml to include more classes in whack.jar.

           

          2) I got the weather sample to compile against these jars:

           

              commons-httpclient.jar

              dom4j.jar      

              jweather.jar

              tinder-1.0.0.jar

              xpp3.jar
              commons-logging.jar   

              jakarta-oro.jar

              log4j.jar   

              whack.jar

           

          2) When I try to run the weather example I get:

           

          Exception in thread "main" java.lang.NoClassDefFoundError: org/jivesoftware/stringprep/IDNA
                  at org.xmpp.packet.JID.init(JID.java:369)
                  at org.xmpp.packet.JID.<init>(JID.java:248)
                  at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:212)
                  at org.jivesoftware.whack.ExternalComponentManager.addComponent(ExternalComponentM anager.java:191)
                  at org.jivesoftware.weather.ExternalWeatherComponent.main(ExternalWeatherComponent .java:32)
          Caused by: java.lang.ClassNotFoundException: org.jivesoftware.stringprep.IDNA
                  at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                  at java.security.AccessController.doPrivileged(Native Method)
                  at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                  at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                  ... 5 more

           

          3) It looks like the missing class is required by the tinder jar. My goal is to run the weather example.

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points