You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by buddhika chamith <ch...@gmail.com> on 2010/05/07 18:56:31 UTC

HelloWTKX Not Working

Hi All,

I just started up playing with Pivot. But I bumped on an issue with
HelloWTKX example. When running the sample it throws an exception as
follows.

java.lang.IllegalArgumentException: location is null.
    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 HelloWTKX.startup(HelloWTKX.java:22)
    at
org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown
Source)
    at java.awt.Window.processEvent(Window.java:1785)

I have double checked the wtkx file location. It is in the same directory as
the class file as referred in the codes. Am I missing some thing here?
Thanks for any help in this regard.

Regards,
Chamith

Re: HelloWTKX Not Working

Posted by lello <rb...@gmail.com>.
Thanks for the help.

I finally found a solution, which is very easy indeed, but apparently
IntelliJ didn't explain it clearly.
I am psting it because someone could run into the same problem.
Basically all one has to do is: 
File->Settings->Compiler
Then from insert the bxml, or wtkx extension to the files being recognized
as resources. These latter are automatically copied to the output directory.


Sandro Martini wrote:
> 
> Hi all,
> I don't know IDEA, but are you able to try to add another source folder
> and put resources there (with the same package structure as your classes)
> ?
> Like in Maven project structure, with src/main/java and src/main/resources
> for example.
> Then, in eclipse if wanted I can filter included/excluded files for any
> source folder (and default is *.* allowed), maybe even in IDEA (or maybe
> you could leave *.java in src/main/java and add *.* in the
> src/main/resources) ...
> 
> Hope this helps.
> 
> Bye,
> Sandro
> 


--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/HelloWTKX-Not-Working-tp784187p2811696.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: HelloWTKX Not Working

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
I don't know IDEA, but are you able to try to add another source folder and
put resources there (with the same package structure as your classes) ?
Like in Maven project structure, with src/main/java and src/main/resources
for example.
Then, in eclipse if wanted I can filter included/excluded files for any
source folder (and default is *.* allowed), maybe even in IDEA (or maybe you
could leave *.java in src/main/java and add *.* in the src/main/resources)
...

Hope this helps.

Bye,
Sandro


--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/HelloWTKX-Not-Working-tp784187p2805824.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: HelloWTKX Not Working

Posted by lello <rb...@gmail.com>.
Hi All,
I have the same issue witha IDEA and I can''t find a solution.
Any help is appreciated.

--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/HelloWTKX-Not-Working-tp784187p2801546.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: HelloWTKX Not Working

Posted by dhruva023 <dh...@gmail.com>.
Hey Buddhika, how did you resolve this issue? could you please explain it. I
was using eclipse to develop one app and it was working fine. Now I moved to
idea and I am getting this "location is null" error. I cant figure out the
configuration.

Thanks,

--
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/HelloWTKX-Not-Working-tp784187p2791798.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: HelloWTKX Not Working

Posted by buddhika chamith <ch...@gmail.com>.
Hi Greg,

Figured it out. IDEA doesn't include the wtkx file in the build output
directory by default. Placing wtkx in the build output directory solved the
issue. Thanks for the help.

Regards

Re: HelloWTKX Not Working

Posted by Greg Brown <gk...@mac.com>.
OK. Is the tutorials/src directory on your classpath when you run the app? If not, it won't be able to find the WTKX files. This isn't necessary when you run from the JAR file, but you might need to configure IDEA to include it.

On May 7, 2010, at 1:19 PM, buddhika chamith wrote:

> I am trying to run the app from the source.


Re: HelloWTKX Not Working

Posted by buddhika chamith <ch...@gmail.com>.
I am trying to run the app from the source.

Re: HelloWTKX Not Working

Posted by Greg Brown <gk...@mac.com>.
There's no real standard, though we do use Eclipse to build the platform (you can also build it with Ant).

Are you building that app from source or are you trying to run it from the tutorials JAR file?


On May 7, 2010, at 1:06 PM, buddhika chamith wrote:

> Hi Greg,
> 
> Thanks for the quick reply. I running the app as an Idea Java project with pivot jars in the classpath. Btw what is the standard development platform Pivot apps? 
> 
> Regards


Re: HelloWTKX Not Working

Posted by buddhika chamith <ch...@gmail.com>.
Hi Greg,

Thanks for the quick reply. I running the app as an Idea Java project with
pivot jars in the classpath. Btw what is the standard development platform
Pivot apps?

Regards

Re: HelloWTKX Not Working

Posted by Greg Brown <gk...@mac.com>.
How are you building/running the app?

On May 7, 2010, at 12:56 PM, buddhika chamith wrote:

> Hi All,
> 
> I just started up playing with Pivot. But I bumped on an issue with HelloWTKX example. When running the sample it throws an exception as follows.
> 
> java.lang.IllegalArgumentException: location is null.
>     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 HelloWTKX.startup(HelloWTKX.java:22)
>     at org.apache.pivot.wtk.DesktopApplicationContext$HostFrame.processWindowEvent(Unknown Source)
>     at java.awt.Window.processEvent(Window.java:1785)
> 
> I have double checked the wtkx file location. It is in the same directory as the class file as referred in the codes. Am I missing some thing here? Thanks for any help in this regard.
> 
> Regards,
> Chamith