Upgrading from gwt2.4.0 to gwt2.5.0 giving exceptions - gwt-2.4

I have a application for that i have updated from gwt2.4.0 to gwt2.5.0.
When i am running the application then seeing the following exception.
18:34:25.338 [ERROR] [OneViewUI] Errors in 'jar:file:/C:/Users/srapolu/.m2/repository/com/google/gwt/gwt-user/2.5.0/gwt-user-2.5.0.jar!/com/google/gwt/core/client/GWT.java'
18:34:25.391 [ERROR] [OneViewUI] Line 276: The method setBridge(GWTBridge) in the type GWT is not applicable for the
arguments (GWTBridge)
can you please help.

I experienced the same issue. it turns out i had some references to the 2.4 version of gwt-dev.jar. make sure you don't have any and try again.

Related

Symbol 'type akka.stream.scaladsl.Flow' is missing from the classpath

I'm learning Scala and following this video https://www.youtube.com/watch?v=yU85EowqhY4
But when I tried to run my AkkaHttpJson class I end up getting this error
Symbol 'type akka.stream.scaladsl.Flow' is missing from the classpath. This symbol is required by 'method akka.http.scaladsl.server.RouteResult.routeToFlow'. Make sure that type Flow is in your classpath and check for conflicting dependencies with `-Ylog-classpath`. A full rebuild may help if 'RouteResult.class' was compiled against an incompatible version of akka.stream.scaladsl. Http().newServerAt("localhost", 8081).bind(route)
Why am I getting this error? Everything is exactly as shown in the video.
Is it the dependencies that are causing these issues?
Also, If I make a project using Scala 2.* and then want to convert to Scala 3, would I always face issues?
I'm really new to Scala, so I appreciate all help!
Posted the question here and got the answer :)

Play 2.5.3: Cryptic error message: Exception caught in Netty java.lang.NoClassDefFoundError

[error] p.c.s.n.PlayRequestHandler - Exception caught in Netty
java.lang.NoClassDefFoundError: Could not initialize class play.api.http.DefaultHttpErrorHandler$
at
I get error message and my app doesn't start in dev mode.
The error doesn't give me any details about what went wrong. I changed log level in logback.xml to DEBUG, but it didn't help.
Any suggestions how to investigate the problem? A week ago it worked just fine and since then there was no any changes in sources and configuration. It stopped working for an unknown reason.
Edit1: How do I enable more verbose logging? Otherwise it's absolutely unclear where the error comes from.
Edit2: changed the title
(Server started, use Ctrl+D to stop and go back to the console...)
Warning: node.js detection failed, sbt will use the Rhino based Trireme JavaScript engine instead to run JavaScript assets compilation, which in some cases may be orders of magnitude slower than using no
de.js.
[error] p.c.s.n.PlayRequestHandler - Exception caught in Netty
java.lang.NoClassDefFoundError: Could not initialize class play.api.http.DefaultHttpErrorHandler$
at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala:45)
at play.core.server.Server$class.getHandlerFor(Server.scala:65)
at play.core.server.NettyServer.getHandlerFor(NettyServer.scala:47)
at play.core.server.netty.PlayRequestHandler.handle(PlayRequestHandler.scala:82)
at play.core.server.netty.PlayRequestHandler.channelRead(PlayRequestHandler.scala:163)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278)
at com.typesafe.netty.http.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:129)
at com.typesafe.netty.http.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:96)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
[error] p.c.s.n.PlayRequestHandler - Exception caught in Netty
java.lang.NoClassDefFoundError: Could not initialize class play.api.http.DefaultHttpErrorHandler$
at play.core.server.Server$class.logExceptionAndGetResult$1(Server.scala:45)
at play.core.server.Server$class.getHandlerFor(Server.scala:65)
at play.core.server.NettyServer.getHandlerFor(NettyServer.scala:47)
at play.core.server.netty.PlayRequestHandler.handle(PlayRequestHandler.scala:82)
at play.core.server.netty.PlayRequestHandler.channelRead(PlayRequestHandler.scala:163)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:278)
at com.typesafe.netty.http.HttpStreamsHandler.channelRead(HttpStreamsHandler.java:129)
at com.typesafe.netty.http.HttpStreamsServerHandler.channelRead(HttpStreamsServerHandler.java:96)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
I don't know exactly what your problem is, but I encountered this cryptic, unhelpful error when I discovered an error in my application.conf where I was attempting to set a configuration based on an environment variable that may or may not be there. Clearly, the cause of the exception and the place it becomes apparent are pretty far apart.
So I would suggest checking your application.conf for a misconfiguration. Consider also any dependencies that might have been built for Play versions < 2.5. Basically anything that might cause the application to be "mis-initalized" for lack of a better term.
EDIT: I just discovered another cause of this error that falls under the category of "mis-initialization." I changed the name of a route in my routes file but forgot to change the corresponding reverse route in my template. I feel this should be caught sooner and with a more intuitive error, but regardless, look out for this (or something similar) as well in application.conf or routes.
Oops.. java.lang.NoClassDefFoundError: Could not initialize class play.api.http.DefaultHttpErrorHandler$ tells nothing what went wrong.
One such reason I have encountered is when I had missing/typos in my configuration properties and use guice injectors.
You can run your app in prod mode to see more informative error message activator clean compile start.
....
[info] Done packaging.
(Starting server. Type Ctrl+D to exit logs, the server will remain in background)
Oops, cannot start the server.
Configuration error: Configuration error[storage.conf # file:/myproject/mymodule/target/universal/stage/conf/storage.conf: 16: Could not resolve substitution to a value: ${storage.cluster.name}]
at play.api.Configuration$.configError(Configuration.scala:154)
....
In my case the below dependency was what was causing the error
libraryDependencies += "com.google.cloud" % "gcloud-java-storage" % "0.2.5"
Source Getting ChannelException when adding Google cloud client library to Play 2.5
In my case it was a missed } in the application.conf file :( .

akka-kryo-serialization ClassNotFoundException: scala.Enumeration$Val

Sometimes when updating a dependency version for my project, when I would run the project I would get the following error:
ERROR 09:31:34:241 apply$mcV$sp - Class could not be loaded and/or registered: scala.Enumeration$Val
ERROR 09:31:34:247 apply$mcV$sp - exception caught during akka-kryo-serialization startup: java.lang.ClassNotFoundException: scala.Enumeration$Val
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
I usually got lucky and was able to fix this by tweaking the versions of my dependencies.
Until I updated my akka version from 2.3.6 to 2.3.12, specifically akka-contrib which contains akka-cluster, akka-remote and akka-peristance.
Turns out that the problem was actually occurring during the transition between akka 2.3.8 and 2.3.9. Looking at the change log, I found that between these two versions the Scala version was upgraded from 2.11.4 to 2.11.5.
My project was building on scala 2.11.4. Upgrading to 2.11.5 fixed the problem.
I couldn't find any help online for this, and lost a couple days trying to figure this out. I'm hoping that this will help someone else out.

Getting IncompatibleClassChangeError while running shark-0.9.0 with hadoop 2.2.0

I am getting the following error while running shark 0.9.0.
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class scala.collection.mutable.ArrayOps, but interface was expected
at shark.SharkCliDriver$.main(SharkCliDriver.scala:82)
at shark.SharkCliDriver.main(SharkCliDriver.scala)
Any solution regarding the problem is highly appreciable.
Its a backward compatibility issue.
This exception is raised when the version of scala-library.jar is different during compilation and execution. Make sure that you use the same library version during compiling and executing.
if you are using hadoop 2.x version, do the below steps
find path to shark installation folder -name hadoop-core-1.0.4.jar
remove all the hadoop-core-1.0.4.jar
check this
http://bigdataanalyze.blogspot.com/2014/03/issues-on-shark-with-cdh5-beta2-1.html

eclipse complain compilation error for play 2.0.1

The eclipse complain the following compilation error for play 2.0.1
The type play.api.templates.Html cannot be resolved. It is
indirectly referenced from required .class files
But in play console, it can successfully compile.
anything wrong with my environment ? has anyone encounter this issue ?
Got the solution, I need to put target/scala-2.9.1/src_managed/main to source folder