How to suppress execution of post-jobs when using BuildBreaker plugin - plugins

I developed a plugin for my company. The main work is done and the plugin itself works also fine for now.
All i have is kind of "aesthetics problems".
When a build job is finished without failure the console output tells me the following thing:
(just for the protocol: I'm using Jenkins to execute build jobs)
[...]
[INFO] [16:12:08.270] <- Clean snapshot 574387
[INFO] [16:12:08.723] Executing post-job class org.sonar.plugins.projectkeychecker.ProjectKeyCheckerSensor
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
Do you know how i can suppress that last info output?
It comes up with the BuildBreaker Plugin. I don't do anything here so I don't want to show this message in my output.
(for more context please browse stackoverflow link)
Thank you again :)

As i already mentioned: It comes up with the BuildBreaker Plugin.
When i told my class to extend BuildBreaker
public class MySensor extends BuildBreaker implements Sensor {
i had to implement the method executeOn
#Override
public void executeOn(Project arg0, SensorContext arg1) { }
and the method executeOn is activated as a PostJop... So i need to delete this method to avoid my problem.
SOLUTION:
1) Do not extend BuildBreaker anymore -> don't implement the method executeOn anymore
2.) Instead of using the Method "fail (String message)", which came also up with BuildBreaker use directly the command "throw new SonarException(String message);"(you will need to import org.sonar.api.utils.SonarException as well)
Thanks everyone, who read this.

Related

Getting error log while previewing report from Jasper [duplicate]

I am getting a NoClassDefFoundError when I run my Java application. What is typically the cause of this?
While it's possible that this is due to a classpath mismatch between compile-time and run-time, it's not necessarily true.
It is important to keep two or three different exceptions straight in our head in this case:
java.lang.ClassNotFoundException This exception indicates that the class was not found on the classpath. This indicates that we were trying to load the class definition, and the class did not exist on the classpath.
java.lang.NoClassDefFoundError This exception indicates that the JVM looked in its internal class definition data structure for the definition of a class and did not find it. This is different than saying that it could not be loaded from the classpath. Usually this indicates that we previously attempted to load a class from the classpath, but it failed for some reason - now we're trying to use the class again (and thus need to load it, since it failed last time), but we're not even going to try to load it, because we failed loading it earlier (and reasonably suspect that we would fail again). The earlier failure could be a ClassNotFoundException or an ExceptionInInitializerError (indicating a failure in the static initialization block) or any number of other problems. The point is, a NoClassDefFoundError is not necessarily a classpath problem.
This is caused when there is a class file that your code depends on and it is present at compile time but not found at runtime. Look for differences in your build time and runtime classpaths.
Here is the code to illustrate java.lang.NoClassDefFoundError. Please see Jared's answer for detailed explanation.
NoClassDefFoundErrorDemo.java
public class NoClassDefFoundErrorDemo {
public static void main(String[] args) {
try {
// The following line would throw ExceptionInInitializerError
SimpleCalculator calculator1 = new SimpleCalculator();
} catch (Throwable t) {
System.out.println(t);
}
// The following line would cause NoClassDefFoundError
SimpleCalculator calculator2 = new SimpleCalculator();
}
}
SimpleCalculator.java
public class SimpleCalculator {
static int undefined = 1 / 0;
}
NoClassDefFoundError In Java
Definition:
Java Virtual Machine is not able to find a particular class at runtime which was available at compile time.
If a class was present during compile time but not available in java classpath during runtime.
Examples:
The class is not in Classpath, there is no sure shot way of knowing it but many times you can just have a look to print System.getproperty("java.classpath") and it will print the classpath from there you can at least get an idea of your actual runtime classpath.
A simple example of NoClassDefFoundError is class belongs to a missing JAR file or JAR was not added into classpath or sometimes jar's name has been changed by someone like in my case one of my colleagues has changed tibco.jar into tibco_v3.jar and the program is failing with java.lang.NoClassDefFoundError and I were wondering what's wrong.
Just try to run with explicitly -classpath option with the classpath you think will work and if it's working then it's a sure short sign that someone is overriding java classpath.
Permission issue on JAR file can also cause NoClassDefFoundError in Java.
Typo on XML Configuration can also cause NoClassDefFoundError in Java.
when your compiled class which is defined in a package, doesn’t present in the same package while loading like in the case of JApplet it will throw NoClassDefFoundError in Java.
Possible Solutions:
The class is not available in Java Classpath.
If you are working in J2EE environment than the visibility of Class among multiple Classloader can also cause java.lang.NoClassDefFoundError, see examples and scenario section for detailed discussion.
Check for java.lang.ExceptionInInitializerError in your log file. NoClassDefFoundError due to the failure of static initialization is quite common.
Because NoClassDefFoundError is a subclass of java.lang.LinkageError it can also come if one of it dependency like native library may not available.
Any start-up script is overriding Classpath environment variable.
You might be running your program using jar command and class was not defined in manifest file's ClassPath attribute.
Resources:
3 ways to solve NoClassDefFoundError
java.lang.NoClassDefFoundError Problem patterns
I have found that sometimes I get a NoClassDefFound error when code is compiled with an incompatible version of the class found at runtime. The specific instance I recall is with the apache axis library. There were actually 2 versions on my runtime classpath and it was picking up the out of date and incompatible version and not the correct one, causing a NoClassDefFound error. This was in a command line app where I was using a command similar to this.
set classpath=%classpath%;axis.jar
I was able to get it to pick up the proper version by using:
set classpath=axis.jar;%classpath%;
One interesting case in which you might see a lot of NoClassDefFoundErrors is when you:
throw a RuntimeException in the static block of your class Example
Intercept it (or if it just doesn't matter like it is thrown in a test case)
Try to create an instance of this class Example
static class Example {
static {
thisThrowsRuntimeException();
}
}
static class OuterClazz {
OuterClazz() {
try {
new Example();
} catch (Throwable ignored) { //simulating catching RuntimeException from static block
// DO NOT DO THIS IN PRODUCTION CODE, THIS IS JUST AN EXAMPLE in StackOverflow
}
new Example(); //this throws NoClassDefFoundError
}
}
NoClassDefError will be thrown accompanied with ExceptionInInitializerError from the static block RuntimeException.
This is especially important case when you see NoClassDefFoundErrors in your UNIT TESTS.
In a way you're "sharing" the static block execution between tests, but the initial ExceptionInInitializerError will be just in one test case. The first one that uses the problematic Example class. Other test cases that use the Example class will just throw NoClassDefFoundErrors.
This is the best solution I found so far.
Suppose we have a package called org.mypackage containing the classes:
HelloWorld (main class)
SupportClass
UtilClass
and the files defining this package are stored physically under the directory D:\myprogram (on Windows) or /home/user/myprogram (on Linux).
The file structure will look like this:
When we invoke Java, we specify the name of the application to run: org.mypackage.HelloWorld. However we must also tell Java where to look for the files and directories defining our package. So to launch the program, we have to use the following command:
I was using Spring Framework with Maven and solved this error in my project.
There was a runtime error in the class. I was reading a property as integer, but when it read the value from the property file, its value was double.
Spring did not give me a full stack trace of on which line the runtime failed.
It simply said NoClassDefFoundError. But when I executed it as a native Java application (taking it out of MVC), it gave ExceptionInInitializerError which was the true cause and which is how I traced the error.
#xli's answer gave me insight into what may be wrong in my code.
I get NoClassFoundError when classes loaded by the runtime class loader cannot access classes already loaded by the java rootloader. Because the different class loaders are in different security domains (according to java) the jvm won't allow classes already loaded by the rootloader to be resolved in the runtime loader address space.
Run your program with 'java -javaagent:tracer.jar [YOUR java ARGS]'
It produces output showing the loaded class, and the loader env that loaded the class. It's very helpful tracing why a class cannot be resolved.
// ClassLoaderTracer.java
// From: https://blogs.oracle.com/sundararajan/entry/tracing_class_loading_1_5
import java.lang.instrument.*;
import java.security.*;
// manifest.mf
// Premain-Class: ClassLoadTracer
// jar -cvfm tracer.jar manifest.mf ClassLoaderTracer.class
// java -javaagent:tracer.jar [...]
public class ClassLoadTracer
{
public static void premain(String agentArgs, Instrumentation inst)
{
final java.io.PrintStream out = System.out;
inst.addTransformer(new ClassFileTransformer() {
public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException {
String pd = (null == protectionDomain) ? "null" : protectionDomain.getCodeSource().toString();
out.println(className + " loaded by " + loader + " at " + new java.util.Date() + " in " + pd);
// dump stack trace of the thread loading class
Thread.dumpStack();
// we just want the original .class bytes to be loaded!
// we are not instrumenting it...
return null;
}
});
}
}
The technique below helped me many times:
System.out.println(TheNoDefFoundClass.class.getProtectionDomain().getCodeSource().getLocation());
where the TheNoDefFoundClass is the class that might be "lost" due to a preference for an older version of the same library used by your program. This most frequently happens with the cases, when the client software is being deployed into a dominant container, armed with its own classloaders and tons of ancient versions of most popular libs.
Java ClassNotFoundException vs NoClassDefFoundError
[ClassLoader]
Static vs Dynamic class loading
Static(Implicit) class loading - result of reference, instantiation, or inheritance.
MyClass myClass = new MyClass();
Dynamic(Explicit) class loading is result of Class.forName(), loadClass(), findSystemClass()
MyClass myClass = (MyClass) Class.forName("MyClass").newInstance();
Every class has a ClassLoader which uses loadClass(String name); that is why
explicit class loader uses implicit class loader
NoClassDefFoundError is a part of explicit class loader. It is Error to guarantee that during compilation this class was presented but now (in run time) it is absent.
ClassNotFoundException is a part of implicit class loader. It is Exception to be elastic with scenarios where additionally it can be used - for example reflection.
In case you have generated-code (EMF, etc.) there can be too many static initialisers which consume all stack space.
See Stack Overflow question How to increase the Java stack size?.
Two different checkout copies of the same project
In my case, the problem was Eclipse's inability to differentiate between two different copies of the same project. I have one locked on trunk (SVN version control) and the other one working in one branch at a time. I tried out one change in the working copy as a JUnit test case, which included extracting a private inner class to be a public class on its own and while it was working, I open the other copy of the project to look around at some other part of the code that needed changes. At some point, the NoClassDefFoundError popped up complaining that the private inner class was not there; double-clicking in the stack trace brought me to the source file in the wrong project copy.
Closing the trunk copy of the project and running the test case again got rid of the problem.
I fixed my problem by disabling the preDexLibraries for all modules:
dexOptions {
preDexLibraries false
...
I got this error when I add Maven dependency of another module to my project, the issue was finally solved by add -Xss2m to my program's JVM option(It's one megabyte by default since JDK5.0). It's believed the program does not have enough stack to load class.
In my case I was getting this error due to a mismatch in the JDK versions. When I tried to run the application from Intelij it wasn't working but then running it from the command line worked. This is because Intelij was attempting to run it with the Java 11 JDK that was setup but on the command line it was running with the Java 8 JDK. After switching that setting under File > Project Structure > Project Settings > Project SDK, it worked for me.
Update [https://www.infoq.com/articles/single-file-execution-java11/]:
In Java SE 11, you get the option to launch a single source code file
directly, without intermediate compilation. Just for your convenience,
so that newbies like you don't have to run javac + java (of course,
leaving them confused why that is).
NoClassDefFoundError can also occur when a static initializer tries to load a resource bundle that is not available in runtime, for example a properties file that the affected class tries to load from the META-INF directory, but isn’t there. If you don’t catch NoClassDefFoundError, sometimes you won’t be able to see the full stack trace; to overcome this you can temporarily use a catch clause for Throwable:
try {
// Statement(s) that cause(s) the affected class to be loaded
} catch (Throwable t) {
Logger.getLogger("<logger-name>").info("Loading my class went wrong", t);
}
I was getting NoClassDefFoundError while trying to deploy application on Tomcat/JBOSS servers. I played with different dependencies to resolve the issue, but kept getting the same error. Marked all javax.* dependencies as provided in pom.xml, And war literally had no Dependency in it. Still the issue kept popping up.
Finally realized that src/main/webapps/WEB-INF/classes had classes folder which was getting copied into my war, so instead of compiled classes, this classes were getting copied, hence no dependency change was resolving the issue.
Hence be careful if any previously compiled data is getting copied, After deleting classes folder and fresh compilation, It worked!..
If someone comes here because of java.lang.NoClassDefFoundError: org/apache/log4j/Logger error, in my case it was produced because I used log4j 2 (but I didn't add all the files that come with it), and some dependency library used log4j 1. The solution was to add the Log4j 1.x bridge: the jar log4j-1.2-api-<version>.jar which comes with log4j 2. More info in the log4j 2 migration.
This error can be caused by unchecked Java version requirements.
In my case I was able to resolve this error, while building a high-profile open-source project, by switching from Java 9 to Java 8 using SDKMAN!.
sdk list java
sdk install java 8u152-zulu
sdk use java 8u152-zulu
Then doing a clean install as described below.
When using Maven as your build tool, it is sometimes helpful -- and usually gratifying, to do a clean 'install' build with testing disabled.
mvn clean install -DskipTests
Now that everything has been built and installed, you can go ahead and run the tests.
mvn test
I got NoClassDefFound errors when I didn't export a class on the "Order and Export" tab in the Java Build Path of my project. Make sure to put a checkmark in the "Order and Export" tab of any dependencies you add to the project's build path. See Eclipse warning: XXXXXXXXXXX.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.
It could also be because you copy the code file from an IDE with a certain package name and you want to try to run it using terminal. You will have to remove the package name from the code first.
This happens to me.
Everyone talks here about some Java configuration stuff, JVM problems etc., in my case the error was not related to these topics at all and had a very trivial and easy to solve reason: I had a wrong annotation at my endpoint in my Controller (Spring Boot application).
I have had an interesting issue wiht NoClassDefFoundError in JavaEE working with Liberty server. I was using IMS resource adapters and my server.xml had already resource adapter for imsudbJXA.rar.
When I added new adapter for imsudbXA.rar, I would start getting this error for instance objects for DLIException, IMSConnectionSpec or SQLInteractionSpec.
I could not figure why but I resolved it by creating new server.xml for my work using only imsudbXA.rar. I am sure using multiple resource adapters in server.xml is fine, I just had no time to look into that.
I had this error but could not figure out the solution based on this thread but solved it myself.
For my problem I was compiling this code:
package valentines;
import java.math.BigInteger;
import java.util.ArrayList;
public class StudentSolver {
public static ArrayList<Boolean> solve(ArrayList<ArrayList<BigInteger>> problems) {
//DOING WORK HERE
}
public static void main(String[] args){
//TESTING SOLVE FUNCTION
}
}
I was then compiling this code in a folder structure that was like /ProjectName/valentines
Compiling it worked fine but trying to execute: java StudentSolver
I was getting the NoClassDefError.
To fix this I simply removed: package valentines;
I'm not very well versed in java packages and such but this how I fixed my error so sorry if this was already answered by someone else but I couldn't interpret it to my problem.
My solution to this was to "avail" the classpath contents for the specific classes that were missing. In my case, I had 2 dependencies, and though I was able to compile successfully using javac ..., I was not able to run the resulting class file using java ..., because a Dynamic class in the BouncyCastle jar could not be loaded at runtime.
javac --classpath "ext/commons-io-2.11.0;ext/bc-fips-1.0.2.3" hello.java
So at compile time and by runtime, the JVM is aware of where to fetch Apache Commons and BouncyCastle dependencies, however, when running this, I got
Error: Unable to initialize main class hello
Caused by: java.lang.NoClassDefFoundError:
org/bouncycastle/jcajce/provider/BouncyCastleFipsProvider
And I therefore manually created a new folder named ext at the same location, as per the classpath, where I then placed the BouncyCastle jar to ensure it would be found at runtime. You can place the jar relative to the class file or the jar file as long as the resulting manifest has the location of the jar specified. Note I only need to avail the one jar containing the missing class file.
Java was unable to find the class A in runtime.
Class A was in maven project ArtClient from a different workspace.
So I imported ArtClient to my Eclipse project.
Two of my projects was using ArtClient as dependency.
I changed library reference to project reference for these ones (Build Path -> Configure Build Path).
And the problem gone away.
I had the same problem, and I was stock for many hours.
I found the solution. In my case, there was the static method defined due to that. The JVM can not create the another object of that class.
For example,
private static HttpHost proxy = new HttpHost(proxyHost, Integer.valueOf(proxyPort), "http");
I got this message after removing two files from the SRC library, and when I brought them back I kept seeing this error message.
My solution was: Restart Eclipse. Since then I haven't seen this message again :-)

Why did Grails 4.0.10 run-app behavior change overnight?

I am suddenly getting a conflict between a class in a Grails plugin and the same class in a Grails plugin.
Grails Notification plugin has a skeleton User class defined in order to provide
for stand-alone plugin testing. The User class is defined with the same package as
the real User class in the main app. The plugin User class is NOT published with
the plugin - it is excluded from the jar. In any case, the app class should predominate,
and there is no runtime warning about duplicate classes. The plugin User class is there in
the plugin sources jar, however. This has always worked fine - until now.
So, not only am I mystified, I'm also worried because we also include a number of duplicatively
defined utility classes that are also excluded from the plugin jars - will those also be a problem?
Important: this problem was not there yesterday! Overnight corporate security applied some
updates and forced a restart on our computers, so Intellij in particular had to be reopened.
A colleague can duplicate this same new behavior on his machine, so it's not a local cache
problem on my computer - pointing to a common code or build problem?
We are running run-app via the Intellij IDE, but invoking run-app from a cmdline exhibits the same problem.
// This Grails debug console code
import com.penbaymedia.jdeis5.notification.service.EmailService // just to check existence
def svc = ctx.getBean('emailService') // in Grails Notification plugin
def user = User.findByUsername('jphiloon') // User defined in main app and in plugin
svc.getEmail(user)
/* Responds with this result:
groovy.lang.MissingMethodException: No signature of method: com.penbaymedia.jdeis5.notification.service.EmailService.getEmail() is applicable for argument types: (com.penbaymedia.jdeis5.domainobject.User) values: [com.penbaymedia.jdeis5.domainobject.User : 5265]
Possible solutions: getEmail(com.penbaymedia.jdeis5.domainobject.User), getClass(), sendMail(groovy.lang.Closure)
The following classes appear as argument class and as parameter class, but are defined by different class loader:
com.penbaymedia.jdeis5.domainobject.User (defined by 'org.springframework.boot.devtools.restart.classloader.RestartClassLoader#1378323c' and 'sun.misc.Launcher$AppClassLoader#18b4aac2')
If one of the method suggestions matches the method you wanted to call,
then check your class loader setup.
*/
/* The error shown in the application run-app console is a bit different, but unproxying the User object does not help:
2022-03-02 11:20:00,270 ERROR com.penbaymedia.jdeis5.job.AssignmentNotificationIntervalJob - No signature of method: com.penbaymedia.jdeis5.notification.service.EmailService.getEmail() is applicable for argument types: (com.penbaymedia.jdeis5.domainobject.User$HibernateProxy$hgS4G0mO) values: [<com.penbaymedia.jdeis5.domainobject.User$HibernateProxy$hgS4G0mO#9c96547>]
Possible solutions: getEmail(com.penbaymedia.jdeis5.domainobject.User), getClass(), sendMail(groovy.lang.Closure)
*/

Error when compiling custom OpenDaylight API

I am trying to create a custom API based on an API tutorial on https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Startup_Project_Archetype
Tools: OpenDaylight Lithium, Eclipse, Maven 3.3.9
I am able to compile the folder in api but not in impl (FlowImpl.java).
This is the error message:
[INFO] Starting audit...
/home/shaoxu/Desktop/distribution-karaf-0.3.3-Lithium-SR3/flow/impl/src/main/java/org/opendaylight/flow/impl/FlowImpl.java:1: Line does not match expected header line of '^/[*]+$'.
Audit done.
[INFO] There is 1 error reported by Checkstyle 6.2 with check-license.xml ruleset.
[ERROR] src/main/java/org/opendaylight/flow/impl/FlowImpl.java[1] (header) RegexpHeader: Line does not match expected header line of '^/[*]+$'.
There is no error message in Eclipse.
This is the source code:
package org.opendaylight.flow.impl;
import java.util.concurrent.Future;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.flow.rev150105.FlowPathOutputBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
public class FlowImpl implements FlowService {
#Override
public Future<RpcResult<FlowPathOutput>> flowPath(FlowPathInput input) {
FlowPathOutputBuilder flowBuilder = new FlowPathOutputBuilder();
flowBuilder.setPath(input.getNodes());
return RpcResultBuilder.success(flowBuilder.build()).buildFuture();
}
}
What is the error?
The error you're getting is caused by an enforced format for a copyright/license header at the start of every file in OpenDaylight:
/*
* Copyright (c) 2016 ... and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
If you used the archetype, this header should have been generated for you. There are two ways of fixing the problem: either add the license header as above (if you're happy with the license), or disable the license check — if you want to do the latter, edit your question and add the POM you're using for impl so I can explain how to go about it.
You mention you're using Lithium, I'd strongly recommend switching to Beryllium or even Boron for new development. The wiki pages are currently mostly up-to-date for Beryllium.
In my Beryllium, I usually skip checkstyle tests when running my build. Add -Dcheckstyle.skip=true parameter to your command to do the maven build.

Strange cast exception in Groovy script

When I try to run my groovy script in Eclipse, I get a cast exception like:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'package.Config#6babd36b' with class 'package.Config' to class 'package.Config'
The exception occurs when I instantiate another object using the Config as parameter.
clazz.newInstance(config: config)
To me, this seems very odd. But perhaps someone out there can bring me an explanation?
I just want to add some information for this topic. Maybe somebody will find it useful.
I received same error then was trying to compile groovy script for using in multithread environment:
GroovyClassLoader groovyClassLoader = new GroovyClassLoader();
Class<? extends Script> clazz = groovyClassLoader.parseClass(groovyCode);
return clazz.newInstance();
But by default GroovyClassLoader are using ClassLoader of current thread:
Thread.currentThread().getContextClassLoader())
So, you can pickup one class loader and use it for all threads. Or avoid shared groovy stuff :)
Solved! :)
In the Eclipse run configuration, I looked at the argument tab and noticed that both source files and compiled class files was part of the classpath parameter:
--classpath "${workspace_loc:/groovyscripts}/src/main/groovy:...
...:${workspace_loc:/groovyscripts}/classes"
the above setting gives different classloaders for my config object (loaded from src/) and the target field (loaded from classes/)
groovy.lang.GroovyClassLoader$InnerLoader#7a06cf15
org.codehaus.groovy.tools.RootLoader#32728d
Removing the first reference to the source files resulted in a successful run. Classloaders after removal is ONLY RootLoader.
org.codehaus.groovy.tools.RootLoader#32728d
The answer is to remove the source from the classpath in arguments tab in Eclipse.

Failed to resolve class via deferred binding

// ...some imports
public class Menu {
final MenuMaker myClass = GWT.create(MenuMaker.class); // ERROR
My ...gwt.xml:
...
<generate-with class="com.gwt.rebind.MenuGenerator">
<when-type-assignable class="com.gwt.client.MenuMaker" />
</generate-with>
...
All work perfectly when I run compile in DevMode but when I "Build the project with the GWT compiler" I get this error:
[ERROR] Line 15: Failed to resolve 'com.gwt.client.MenuMaker' via deferred binding
Scanning for additional dependencies: jar:file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201208080121-rel-r42/gwt-2.4.0/gwt-user.jar!/com/google/gwt/dom/client/DOMImpl.java
[WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
[WARN] com.gwt.client.MenuMakerGen
[ERROR] Cannot proceed due to previous errors
At the end of com.gwt.rebind.MenuGenerator:
sourceWriter.commit(logger);
Check if all your client classes have default, zero-parameter constructor. I had the same "deferred binding" issue, and it turned out that one of my classes hadn't had default constructor. It was strange, because this class wasn't even mentioned in GWT compiler log.
Check for gwt-compile problems. The message
[ERROR] Line 15: Failed to resolve '...' via deferred binding
can result from compile problems in your gwt code. In my case it was a class, which was only available on the server side of the application, but was referenced in a class belonging to 'shared' part of the application.
In Java it compiled well, so I had no error in eclipse. The above error-message only showed up when building it with maven. Still it remained somewhat difficult to find the real problem, as the message text was not very helpful.
It turned out, that running the app on com.google.gwt.dev.DevMode would produce a more detailed logfile of the gwt-compilation (probably one could configure maven to do the same?).
Right at the beginning of this more detailed log, there were entries, which pointed me to the problem described above. After correcting these problems, the "Failed to resolve ... via deferred binding"-error was gone.
Check your model/ Pojo Class should implements Serializable
interface and also
Class have default constructor(No argument constructor).
In my case, some of the model classes were not implementing com.google.gwt.user.client.rpc.IsSerializable, that's why I got the error mentioned in the question.
In my case, a key in Resource Bundle properties file which corresponds the method name was missing and the problem resolved after adding it.