Hi All,

I am getting the following exception when trying to get Tree View example
working. I have created an Eclipse project for this and trying to run it via
Eclipse. I haven't made any modifications to the sources except for the icon
paths in tree_data.wtkx which I think may be the source of the trouble.

An error occurred while processing  element <TreeNode> starting at line
number 4 in file
/home/chamith/Development/Eclipse/General/Memo/bin/tests/tree_data.wtkx:
java.lang.IllegalArgumentException: iconURL is null.
    at org.apache.pivot.wtk.content.TreeNode.setIcon(Unknown Source)
    at org.apache.pivot.wtk.content.TreeNode.setIcon(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
    at org.apache.pivot.beans.BeanDictionary.put(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.processEndElement(Unknown
Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.processEndElement(Unknown
Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at org.apache.pivot.wtkx.WTKXSerializer.readObject(Unknown Source)
    at tests.TreeView.startup(TreeView.java:18)
    at
org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown
Source)
    at java.awt.Window.processEvent(Window.java:1785)
    at java.awt.Component.dispatchEventImpl(Component.java:4413)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Window.dispatchEventImpl(Window.java:2440)
    at java.awt.Component.dispatchEvent(Component.java:4243)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
An error occurred while processing  element <wtkx:include> starting at line
number 11 in file
/home/chamith/Development/Eclipse/General/Memo/bin/tests/tree_view.wtkx:
java.lang.IllegalArgumentException: iconURL is null.
    at org.apache.pivot.wtk.content.TreeNode.setIcon(Unknown Source)
    at org.apache.pivot.wtk.content.TreeNode.setIcon(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
..................

Some of the lines in the tree-data.wtkx refering to icons are as follows
with relative paths. Icons are located in the same folder as class files and
wtkx files.

    <TreeBranch text="Activity" icon="folder.jpg">
        <TreeBranch text="Games" icon="folder.jpg">
            <TreeNode text="Foosball" icon="page_white.jpg"/>
            <TreeNode text="Ping Pong" icon="page_white.jpg"/>
            <TreeNode text="Air Hockey" icon="page_white.jpg"/>

Any help is greatly appreciated.

Regards,
Buddhika

Reply via email to