acris-json Compilation Issue

40 views
Skip to first unread message

messidinho

unread,
Jul 27, 2010, 10:44:03 PM7/27/10
to acris
I just downloaded the acris-bundle-1.0.0.zip file to try the acris-
json module. I referred to your acris-deployer facebook via JSON demo
source code to experiment with the JSON client code. I've only added
the acris-json-1.0.0.jar to my build path in Eclipse and added the
line <inherits name='sk.seges.acris.json.JSON'/> in my *.gwt.xml file.
However, I'm getting the following compilation errors:
No source code is available for type
sk.seges.acris.json.client.JsonizerBuilder; did you forget to inherit
a required module?
No source code is available for type
sk.seges.acris.json.client.IJsonizer; did you forget to inherit a
required module?

Am I missing any other module or JAR dependencies?

Peter Šimún

unread,
Jul 28, 2010, 3:03:31 AM7/28/10
to acris
Hi,

you have to add also an acris-json-1.0.0-source.jar into your
classpath.
And acris-client-core (both jars).

IMHO, it is better to use maven for project build.
Please, let us know if it is working for you.

Peter

messidinho

unread,
Jul 28, 2010, 11:59:25 PM7/28/10
to acris
Thanks for your help so far. I have progressed further now. However,
I'm encountering a problem with a null object after getting the JSON
string. I'm using the code from
http://code.google.com/p/acris/source/browse/trunk/acris-deployer/src/main/java/sk/seges/acris/json/client/facebook/ShowFacebookData.java.
The code snippet where I'm getting a null is as follows:
IJsonizer jsonnizer = new JsonizerBuilder().create();
Company company = jsonnizer.fromJson(arg0, Company.class);

I'm getting a null for the variable 'company'. It appears to have
problems mapping from the JSON string to the Company object.

Peter Šimún

unread,
Jul 29, 2010, 5:07:21 AM7/29/10
to acris
Are you trying to compile/use the demo or you just have the own code?

is input JSON string valid? Can you post it here?
Do you have @JSONObject annotation on Company POJO? Did you try to
debug it? No exception are there?

I'm 100% sure that you do no have created a Jsonizer interface which
is generated by JSR269 processor. If you don't want to use maven
project setup, you have to run processor manually. Or create it on
your own.

Add this file on the classpath (CompanyJsonizer.java):

package sk.seges.acris.json.client.facebook.model;

public interface CompanyJsonizer extends
sk.seges.acris.json.client.data.IJsonObject<sk.seges.acris.json.client.facebook.model.Company>
{
}

Hope this helps

Peter

On 29. Júl, 05:59 h., messidinho <ger...@gmail.com> wrote:
> Thanks for your help so far. I have progressed further now. However,
> I'm encountering a problem with a null object after getting the JSON
> string. I'm using the code fromhttp://code.google.com/p/acris/source/browse/trunk/acris-deployer/src....

Peter Šimún

unread,
Jul 29, 2010, 5:09:38 AM7/29/10
to acris
I will add this info (about Jsonizers) into official documentation so
it can be handled also in a manual way. Thanks for suggesting this.

Peter

On 29. Júl, 05:59 h., messidinho <ger...@gmail.com> wrote:
> Thanks for your help so far. I have progressed further now. However,
> I'm encountering a problem with a null object after getting the JSON
> string. I'm using the code fromhttp://code.google.com/p/acris/source/browse/trunk/acris-deployer/src....

Gerald Kho

unread,
Jul 30, 2010, 2:27:35 AM7/30/10
to acris
The CompanyJsonizer class did the trick. It all works now. I was using
the demo source code in my own code base to test out the Acris JSON
library. I do plan to use the gwt-maven-plugin in Eclipse, but I
expect it to take longer to get the JSON code working because I'm not
sure how well the gwt-maven-plugin will work with the Google Eclipse
Plugin.

Peter Šimún

unread,
Jul 30, 2010, 4:01:20 AM7/30/10
to acris
We are using gwt-maven-plugin for maven GWT compilation and GEP for
development in eclipse and it works perfectly. Just look at the
configuration in our pom.xml files - for example in the showcase.

Good to hear, that demo is working for you.
Any feedback from using acris is very appreciated.

Thank,
Peter
Reply all
Reply to author
Forward
0 new messages