Comments (12)
Do you have any ObjectMapper declared ? Or you get this error just when adding the com.gwtplatform.dispatch.rest.DispatchRest
?
Which version of gwtp are you using ? There was a problem with an older version when having both rpc and rest dispatcher.
from gwt-jackson.
Using version 1.3.1 I am only declaring com.gwtplatform.dispatch.rest.DispatchRest
module and also created some GWTP rest "services" on the client side (so the generator will pick them up). That is all.
from gwt-jackson.
[java] Invoking generator com.google.gwt.inject.rebind.GinjectorGenerator
[java] [ERROR] Error injecting com.gwtplatform.dispatch.rest.client.ActionMetadataProvider: Unable to create or inherit binding: No @Inject or default constructor found for com.gwtplatform.dispatch.rest.client.ActionMetadataProvider
[java] Path to required node:
[java] com.gwtplatform.dispatch.rest.client.RestRequestBuilderFactory [com.gwtplatform.dispatch.rest.client.gin.RestDispatchAsyncModule.configureDispatch(RestDispatchAsyncModule.java:100)]
[java] -> com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory [com.gwtplatform.dispatch.rest.client.gin.RestDispatchAsyncModule.configureDispatch(RestDispatchAsyncModule.java:100)]
[java] -> com.gwtplatform.dispatch.rest.client.ActionMetadataProvider [@Inject constructor of com.gwtplatform.dispatch.rest.client.DefaultRestRequestBuilderFactory]
[java] [ERROR] Error injecting com.gwtplatform.dispatch.rest.client.serialization.JacksonMapperProvider: Unable to create or inherit binding: No @Inject or default constructor found for com.gwtplatform.dispatch.rest.client.serialization.JacksonMapperProvider
[java] Path to required node:
[java] com.gwtplatform.dispatch.rest.client.serialization.Serialization [com.gwtplatform.dispatch.rest.client.gin.RestDispatchAsyncModule.configureDispatch(RestDispatchAsyncModule.java:104)]
[java] -> com.gwtplatform.dispatch.rest.client.serialization.JsonSerialization [com.gwtplatform.dispatch.rest.client.gin.RestDispatchAsyncModule.configureDispatch(RestDispatchAsyncModule.java:104)]
[java] -> com.gwtplatform.dispatch.rest.client.serialization.JacksonMapperProvider [@Inject constructor of com.gwtplatform.dispatch.rest.client.serialization.JsonSerialization]
[java] [ERROR] Errors in 'gen/com/gwtplatform/mvp/client/DesktopGinjectorProvider.java'
[java] [ERROR] Line 8: Failed to resolve 'com.gwtplatform.mvp.client.DesktopGinjector' via deferred binding
from gwt-jackson.
You also declare com.gwtplatform.dispatch.rpc.DispatchRpc
in your gwt.xml.
Did you try with one simple rest service first ?
It seems like a configuration problem of gwtp. Maybe you should also ask on their forum.
A quick search on your error gives http://stackoverflow.com/questions/22578452/how-do-i-use-gwtp-with-ginjector-extensions.
from gwt-jackson.
That stackoverflow isn't quite the same as my issue. But appreciate you taking the time to help me out here. What do you mean by try one simple rest service first?
from gwt-jackson.
You said you "created some GWTP rest "services"". Did you try with only one simple rest service ? Like a service with only a get method returning a "Hello World!" ?
I didn't use a lot GWTP so I'm not sure how you should configure it. It's working on my current project and I simply followed their wiki.
i see you have <set-configuration-property name="gin.ginjector.modules" value="nz.co.doltech.ims.client.gin.ClientModule" />
. From their wiki :
If you are using a generated GINjector and have something similar to
<set-configuration-property name="gin.ginjector.modules"
value="com.gwtplatform.carstore.client.gin.SharedModule"/>
You need to change set-configuration-property to extend-configuration-property
from gwt-jackson.
I just deleted my services to just get it compiling and it still throws 100s of the same error message above. Same with extend-configuration-property, still not working.
[WARN] Unknown type 'com.github.nmorel.gwtjackson.client.ObjectWriter' specified in deferred binding rule
I don't understand this at all. I have the sources and never had troubles compiling like this before.
.. other tasks ..
<!--
================================
Build Application Binaries
================================
-->
<target name="javac" depends="tests" description="Compile java source">
<mkdir dir="war/WEB-INF/classes" />
<javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.7" target="1.7"
nowarn="true" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath refid="project.class.path" />
<classpath refid="tomcat.libs"/>
</javac>
<copy todir="war/WEB-INF/classes">
<fileset dir="src" excludes="**/*.java" />
<fileset dir="resources" excludes="**/*.java" />
<fileset dir="database" excludes="**/*.java" />
</copy>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler" maxmemory="512m">
<classpath>
<pathelement location="src"/>
<path refid="project.class.path"/>
</classpath>
<arg value="-war"/>
<arg value="war"/>
<!--arg value="-strict" /-->
<!-- Logging level arguments -->
<!--arg value="-logLevel" />
<arg value="ERROR" /-->
<!-- Optimization arguments -->
<!--arg value="-XenableClosureCompiler"/>
<arg value="-XdisableClassMetadata"/-->
<!-- add jvmarg -Xss16M or similar if you see a StackOverflowError -->
<jvmarg value="-Xmx512M"/>
<!-- Additional arguments like -style PRETTY or -logLevel DEBUG -->
<arg value="nz.co.doltech.framework.module.Framework"/>
<arg value="nz.co.doltech.framework.login.Login"/>
<arg value="nz.co.doltech.ims.Ims"/>
</java>
</target>
<target name="build" depends="gwtc" description="Build web application entry point"/>
.. other tasks ..
This is my build command
from gwt-jackson.
Were you using GWTP rpc dispatcher and mvp module with success before ?
If you remove the rest dispatcher module, your project compile ?
You should definitely ask to gwtp team.
It seems you are using their ginjector generation seeing your bootstraper configuration.
I only used the rest dispatcher module so I don't really know what's going on.
from gwt-jackson.
Kk thanks for the help, I have contacted them and will hopefully get this sorted out :D
from gwt-jackson.
Never resolved this in my old environment, but I recently moved to maven and its working fine now. No idea what was going on here.
from gwt-jackson.
Maybe you had some dependencies missing if it is resolved with Maven.
Did you have jackson-annotations.jar and jackson-annotations-sources.jar in your classpath before ?
The later is needed by the GWT compiler.
Thanks for the report :)
from gwt-jackson.
Yeah I did have them in my class path, triple checked it when I was trying to resolve the issue. But it is possible that Ivy was messing up the dependencies on the build process. Not really sure though!
from gwt-jackson.
Related Issues (20)
- No source code is available for type com.fasterxml.jackson.databind.ObjectMapper; did you forget to inherit a required module? HOT 3
- Support for java.util.Optional HOT 1
- Expected a string but was BEGIN_OBJECT at line 1 column 2 HOT 1
- Please REVERT the dependency on Jackson 2.9.*, Jackson 2.9.* is NOT compatible with GWT. HOT 2
- Support for @JsonCreator(mode = Mode.DELEGATING)
- Custom deserializer compilation error
- Getter returning Optional<T> of nullable T causing compilation error HOT 2
- GWT 2.6.1 + GwtJackson 0.15.3 HOT 3
- JsonSerializationContext.Builder override not working as expected
- Error:GWT Compiler: No source code is available for type com.fasterxml.jackson.annotation.JsonTypeInfo.As; did you forget to inherit a required module?
- JsonTypeInfo defaultImpl attribute not working HOT 1
- Update jackson dependency to 2.9.8
- Update javapoet dependency to 1.11.1
- Support for JsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE
- Annotations on Java8 default interface are ignored HOT 1
- Can't figure out the stackoverflow I am getting
- More (de)serialization customization (JsonFilter or equivalent)
- Double.NaN / NEGATIVE_INFINITY / POSITIVE_INFINITY - Numeric values must be finite, but was
- Many compile problems
- I want to deserialize a property with any type of value.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-jackson.