google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

UnsatisfiedLinkError with JsonUtils #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The goal is to test our code, populating object from a json file.
We encounter error using the JsonUtil, you can reproduce with that simple 
snippest :

JsonUtils.safeEval("{}");

We use the 0.34 version, with GWT 2.4.0, under windows XP.

The error is the following : 

java.lang.UnsatisfiedLinkError: 
com.google.gwt.core.client.JsonUtils.initEscapeTable()Lcom/google/gwt/core/clien
t/JavaScriptObject;
    at com.google.gwt.core.client.JsonUtils.initEscapeTable(Native Method)
    at com.google.gwt.core.client.JsonUtils.<clinit>(JsonUtils.java:22)
    at <ourPackage>.client.service.ConvertJsonFileToCTOTest.convertGetTodoListData(ConvertJsonFileToCTOTest.java:34)
    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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at com.octo.gwt.test.internal.runner.AbstractGwtRunner.run(AbstractGwtRunner.java:40)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Original issue reported on code.google.com by jhat...@gmail.com on 28 Nov 2011 at 10:45

GoogleCodeExporter commented 9 years ago
JSONParser has been patched in the lastest 0.35-SNAPSHOT version, but yet not 
JsonUtils methods.

I'll check what is possible to do ASAP

Original comment by gael.laz...@gmail.com on 28 Nov 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Thanks to be so quick for answering.

May we help you in that task, is there a similar action that has been fixed to 
get inspired for the JSONUtils patch ?

Original comment by jhat...@gmail.com on 28 Nov 2011 at 11:01

GoogleCodeExporter commented 9 years ago
Yes, the JSONParser is patched by the JSONParserPatcher, which relies on the 
Jackson low level Streaming API to parse JSON : 
http://code.google.com/p/gwt-test-utils/source/browse/src/framework/trunk/gwt-te
st-utils/src/main/java/com/octo/gwt/test/internal/patchers/JSONParserPatcher.jav
a

Maybe Jackson would help the same way for JSONUtils.

Original comment by gael.laz...@gmail.com on 28 Nov 2011 at 11:05

GoogleCodeExporter commented 9 years ago
Hi, 

the UnsatisfiedLinkError on "initEscapeTable" method has been fixed when I have 
implemented the JSONObject.toString() support : 
http://code.google.com/p/gwt-test-utils/issues/detail?id=113

But JsonUtils.safeEval("{}"); still won't work since the GWT Overlay types are 
not nicely handled right now (see explaination here : 
http://code.google.com/p/gwt-test-utils/issues/detail?id=97)

Original comment by gael.laz...@gmail.com on 31 Jan 2012 at 7:00

GoogleCodeExporter commented 9 years ago
Hi there,

A little update :I just started support for overlay types (issue 
http://code.google.com/p/gwt-test-utils/issues/detail?id=133), which are a 
prerequisite to fix JsonUtils.safeEval("{}");

Stay tuned ;)

Original comment by gael.laz...@gmail.com on 30 Jun 2012 at 5:07

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 7 Aug 2012 at 5:07

GoogleCodeExporter commented 9 years ago
I just deployed a new 0.40-SNAPSHOT with support for JsonUtils methods ! Could 
anyone give it a try and post some feedback ?

Before updating, you should read this wiki page carefully : 
http://code.google.com/p/gwt-test-utils/wiki/MigrationTo040

Thanks a lot !

Original comment by gael.laz...@gmail.com on 7 Aug 2012 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 7 Aug 2012 at 8:51