Play Dependency Injection Error - scala

I am trying to use DI to inject a webservice client in my application. I get runtime exception as i refer current application in the object being injected. Below is the skeletal of my code.
**import play.api.Play.Current**
#Singleton
class MicorServiceClient#Inject()(ws: WSclient) {
// References curret.configuraiton.getString(
....
}
class Application #Inject()(microServiceClient: MicorServiceClient) extends Controller {
def someMethod= Action {
//Calls the micorservicelient.getResponse()
}
}
I see following error when my api is called.
#709lj5bmd: Unexpected exception
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:170)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:126)
at scala.Option.map(Option.scala:146)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:126)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1.apply(DevServerStart.scala:124)
at scala.util.Success.flatMap(Try.scala:231)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:124)
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1.apply(DevServerStart.scala:116)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.RuntimeException: There is no started application

Ah, solved the issue, i need to pass play.api.Configuration to the Client and remove the references to current
so my MicroServiceClient definition looks like below
class MicroServiceClient(ws: WSclient, configuration: play.api.Configuration) {
}

Related

Play Scala Oauth Provider Error

I am building a Play Scala project and need an authentication for the apps.
I am using this one : https://github.com/nulab/scala-oauth2-provider as the Oauth Provider libs.
I have implement everything based on the docs. But when implement the Auth on the controller below :
object Token extends MainController with OAuth2Provider {
def accessToken = Action.async { implicit request =>
issueAccessToken(new MyDataHandler()
}
And here my router :
GET /test controllers.Token.test
POST /token controllers.Token.accessToken
When I access localhost/token, i got this error :
And here the error from console :
play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.IncompatibleClassChangeError: Found interface play.api.mvc.Headers, but class was expected]]
at play.api.Application$class.handleError(Application.scala:296) ~[play_2.10-2.3.7.jar:2.3.7]
at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.10-2.3.7.jar:2.3.7]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.7.jar:2.3.7]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.10-2.3.7.jar:2.3.7]
at scala.Option.map(Option.scala:145) [scala-library-2.10.5.jar:na]
Caused by: java.lang.RuntimeException: java.lang.IncompatibleClassChangeError: Found interface play.api.mvc.Headers, but class was expected
at play.api.mvc.ActionBuilder$$anon$1.apply(Action.scala:523) ~[play_2.10-2.3.7.jar:2.3.7]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130) ~[play_2.10-2.3.7.jar:2.3.7]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4$$anonfun$apply$5.apply(Action.scala:130) ~[play_2.10-2.3.7.jar:2.3.7]
at play.utils.Threads$.withContextClassLoader(Threads.scala:21) ~[play_2.10-2.3.7.jar:2.3.7]
at play.api.mvc.Action$$anonfun$apply$1$$anonfun$apply$4.apply(Action.scala:129) ~[play_2.10-2.3.7.jar:2.3.7]
Caused by: java.lang.IncompatibleClassChangeError: Found interface play.api.mvc.Headers, but class was expected
at scalaoauth2.provider.OAuth2BaseProvider$class.play2oauthRequest(OAuth2Provider.scala:24) ~[play2-oauth2-provider_2.10-0.15.1.jar:0.15.1]
at controllers.Token$.play2oauthRequest(Token.scala:14) ~[na:na]
at scalaoauth2.provider.OAuth2Provider$class.issueAccessToken(OAuth2Provider.scala:138) ~[play2-oauth2-provider_2.10-0.15.1.jar:0.15.1]
at controllers.Token$.issueAccessToken(Token.scala:14) ~[na:na]
at controllers.Token$$anonfun$accessToken$1.apply(Token.scala:25) ~[na:na]
I have implement everything what does docs said. Sorry I am actually new on Scala and on the Play it self.
What do you use Play and scala-oauth2-provider version?
The error looks Play version is different.
If you use Play 2.3, you should use 0.14.0 in scala-oauth2-provider.
See readme.

slick 3.0.0 with HikariCP driver not loaded - IllegalAccessException: AbstractHikariConfig can not access a member with modifiers "private"

I am trying to use tminglei/slick-pg v9.0.0 with slick 3.0.0 and am getting an IllegalAccessException:
akka.actor.ActorInitializationException: exception during creation
at akka.actor.ActorInitializationException$.apply(Actor.scala:166) ~[akka-actor_2.11-2.3.11.jar:na]
...
Caused by: java.lang.RuntimeException: driverClassName specified class 'com.github.tminglei.MyPostgresDriver$' could not be loaded
at com.zaxxer.hikari.AbstractHikariConfig.setDriverClassName(AbstractHikariConfig.java:370) ~[HikariCP-java6-2.3.8.jar:na]
at slick.jdbc.HikariCPJdbcDataSource$$anonfun$forConfig$18.apply(JdbcDataSource.scala:145) ~[slick_2.11-3.0.0.jar:na]
at slick.jdbc.HikariCPJdbcDataSource$$anonfun$forConfig$18.apply(JdbcDataSource.scala:145) ~[slick_2.11-3.0.0.jar:na]
at scala.Option.map(Option.scala:146) ~[scala-library-2.11.7.jar:na]
at slick.jdbc.HikariCPJdbcDataSource$.forConfig(JdbcDataSource.scala:145) ~[slick_2.11-3.0.0.jar:na]
at slick.jdbc.HikariCPJdbcDataSource$.forConfig(JdbcDataSource.scala:135) ~[slick_2.11-3.0.0.jar:na]
at slick.jdbc.JdbcDataSource$.forConfig(JdbcDataSource.scala:35) ~[slick_2.11-3.0.0.jar:na]
at slick.jdbc.JdbcBackend$DatabaseFactoryDef$class.forConfig(JdbcBackend.scala:223) ~[slick_2.11-3.0.0.jar:na]
at slick.jdbc.JdbcBackend$$anon$3.forConfig(JdbcBackend.scala:33) ~[slick_2.11-3.0.0.jar:na]
...
Caused by: java.lang.IllegalAccessException: Class com.zaxxer.hikari.AbstractHikariConfig can not access a member of class com.github.tminglei.MyPostgresDriver$ with modifiers "private"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:109) ~[na:1.7.0_79]
at java.lang.Class.newInstance(Class.java:373) ~[na:1.7.0_79]
at com.zaxxer.hikari.AbstractHikariConfig.setDriverClassName(AbstractHikariConfig.java:366) ~[HikariCP-java6-2.3.8.jar:na]
... 43 common frames omitted
HikariCP is the default connection pool in slick 3.0.0
I have defined the driver class much like in the example:
trait MyPostgresDriver extends ExPostgresDriver with PgArraySupport
with PgEnumSupport
with PgRangeSupport
with PgHStoreSupport
with PgSearchSupport{
override val api = new MyAPI {}
//////
trait MyAPI extends API
with ArrayImplicits
with RangeImplicits
with HStoreImplicits
with SearchImplicits
with SearchAssistants
}
object MyPostgresDriver extends MyPostgresDriver
My database config is pretty straightforward [excerpt of typesafe config follows]:
slick.dbs.default {
driver="com.github.tminglei.MyPostgresDriver$"
db {
driver="org.postgresql.Driver"
url="jdbc:postgresql://hostname:port/dbname"
user=user
password="pass"
}
}
It does not seem as if it should not work, and yet...
Should I change my driver class somehow? Is it something else?
Note: as can be seen in the stacktrace I am using
Java 1.7.0_79
Scala 2.11.7
akka 2.3.11 (I share the config instance for slick and akka)
slick 3.0.0
HikariCP-java6 2.3.8
tminglei's slick-pg_core 0.9.0
Lastly, when debugging thru the jdk code at Class.class (decompiled line 143)
Constructor tmpConstructor1 = this.cachedConstructor;
I get the following (toString'ed) value (as shown by intellij):
private com.github.tminglei.MyPostgresDriver$()
Could this be indicative of the problem? If so how should I fix it?
EDIT
I have replaced the custom driver configuration with the stock PostgresDriver like so:
slick.dbs.default {
driver="slick.driver.PostgresDriver$"
db {
driver="org.postgresql.Driver"
url="jdbc:postgresql://hostname:port/dbname"
user=user
password="pass"
}
}
The error is the same:
akka.actor.ActorInitializationException: exception during creation
...
Caused by: java.lang.RuntimeException: driverClassName specified class 'slick.driver.PostgresDriver$' could not be loaded
...
Caused by: java.lang.IllegalAccessException: Class com.zaxxer.hikari.AbstractHikariConfig can not access a member of class slick.driver.PostgresDriver$ with modifiers "private"
I had a similar problem.
I think you are using Database.forConfig("slick.dbs.default") but your config file is in DatabaseConfig format.
Instead, try using:
val dbConfig: DatabaseConfig[PostgresDriver] = DatabaseConfig.forConfig("slick.dbs.default")
val db = dbConfig.db

geting "No lifecycle class found!" in scalatra

I am trying to run scalatra with sbt using container:start command but i get "assertion failed: No lifecycle class found!" message , this is the full stack trace i got with "last container:start" :
Blockquote
last container:restart
java.lang.AssertionError: assertion failed: No lifecycle class found!
at scala.Predef$.assert(Predef.scala:179)
at org.scalatra.servlet.ScalatraListener.probeForCycleClass(ScalatraListener.scala:50)
at org.scalatra.servlet.ScalatraListener.configureCycleClass(ScalatraListener.scala:64)
at org.scalatra.servlet.ScalatraListener.contextInitialized(ScalatraListener.scala:23)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:792)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1359)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1352)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:744)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:497)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:125)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:154)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:125)
at org.eclipse.jetty.server.Server.start(Server.java:358)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:107)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
at org.eclipse.jetty.server.Server.doStart(Server.java:325)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.earldouglas.xsbtwebplugin.Jetty9Runner.start(Jetty9Runner.scala:122)
at com.earldouglas.xsbtwebplugin.Container$$anonfun$containerSettings$11.apply(Container.scala:77)
at com.earldouglas.xsbtwebplugin.Container$$anonfun$containerSettings$11.apply(Container.scala:74)
at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:35)
at scala.Function8$$anonfun$tupled$1.apply(Function8.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
[error] (container:restart) java.lang.AssertionError: assertion failed: No lifecycle class found!
Blockquote
This is my LifeCycle file is called :"ScalatraBootstrap.scala" and it's content is:
import org.Server.Controllers.Controller2
import org.scalatra.example.Server._
import org.scalatra.LifeCycle
import javax.servlet.ServletContext
class ScalatraBootstrap extends LifeCycle {
implicit val swagger = new FlowSwagger
override
def init(context: ServletContext) {
context.mount(new Controller1, "/*") context.mount(new Controller2, "/string1/*") context.mount(new Controller3, "/string2/*")
}
}
ScalatraBootstrap.scala should be in top package without any package name.
remove any package declerations you have in the ScalatraBootstrap.scala file.
You may put the bootstrap class in the top, nameless package or set the relevant context parameter like this:
context.setInitParameter(ScalatraListener.LifeCycleKey,
"my.package.MyScalatraBootstrap")
In scalatra you need to have a class extending LifeCycle. Here's an example from the docs
Note that there is also a file called Scalatra.scala in your src/main/scala directory. This is the Scalatra bootstrap config file, and it's where you should do most of your app configuration work.
The simplest version of this file, which gets generated when you make a new project using the giter8 template, looks something like this:
import org.scalatra.LifeCycle
import javax.servlet.ServletContext
import org.yourdomain.projectname._
class ScalatraBootstrap extends LifeCycle {
override def init(context: ServletContext) {
// mount servlets like this:
context mount (new ArticlesServlet, "/articles/*")
}
}
Old question, but as I just got the same issue No lifecycle class found and the previous responses didn't solve it, here's what did:
The solution for my case was simple. I had placed the ScalatraBootstrap.scala to src/main, no errors were given by IntelliJ. The correct path is src/main/scala. This is also shown in the Scalatra project structure page, but the formatting might cause one to place it in the wrong spot. src/main/scala/ScalatraBootstrap.scala works perfectly.

Endpoints API generation error when using Guava

We are using Appengine Endpoints Java with Guava and when Function is used inside an endpoint method the API generator returns an exception.
Function is NOT part of the method signature. Its just used inside the method to transform a list. Comment out this body part and it generates OK.
Guava sure is in the classpath, and other parts of the application uses it normally.
I'm not sure its related to Guava or any outside API would give the same error.
The method:
#ApiMethod(
httpMethod = "GET",
name = "ledgers.accountgroups.get",
path="ledgers/{ledgerId}/accountgroups")
public Collection<IAccountGroup> listAccountGroups(#Named("ledgerId") String ledgerId, User user) throws Exception {
collaboratorDAO.assertCollaboratorOn(ledgerId, user);
List<Group> groups = accountGroupsDAO.getAccountGroups(ledgerId);
List<IAccountGroup> transformedGroups = Lists.transform(groups, new Function<Group, IAccountGroup>() {
#Override
public IAccountGroup apply(Group group) {
return group.createClient();
}
});
return transformedGroups;
}
The exception:
INFO: Successfully processed ./war/WEB-INF/appengine-web.xml
interface com.google.api.server.spi.config.Api
interface com.google.api.server.spi.config.Api
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2436)
at java.lang.Class.getDeclaredMethods(Class.java:1793)
at com.google.api.server.spi.MethodHierarchyReader.addServiceMethods(MethodHierarchyReader.java:174)
at com.google.api.server.spi.MethodHierarchyReader.readMethodHierarchyIfNecessary(MethodHierarchyReader.java:44)
at com.google.api.server.spi.MethodHierarchyReader.getEndpointOverrides(MethodHierarchyReader.java:99)
at com.google.api.server.spi.config.annotationreader.ApiConfigAnnotationReader.readEndpointMethods(ApiConfigAnnotationReader.java:215)
at com.google.api.server.spi.config.annotationreader.ApiConfigAnnotationReader.loadEndpointMethods(ApiConfigAnnotationReader.java:92)
at com.google.api.server.spi.config.ApiConfigLoader.loadConfiguration(ApiConfigLoader.java:55)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfigObjects(AnnotationApiConfigGenerator.java:237)
at com.google.api.server.spi.tools.AnnotationApiConfigGenerator.generateConfig(AnnotationApiConfigGenerator.java:185)
at com.google.api.server.spi.tools.GenApiConfigAction.genApiConfig(GenApiConfigAction.java:78)
at com.google.api.server.spi.tools.GetClientLibAction.getClientLib(GetClientLibAction.java:66)
at com.google.api.server.spi.tools.GetClientLibAction.execute(GetClientLibAction.java:49)
at com.google.api.server.spi.tools.EndpointsTool.execute(EndpointsTool.java:66)
at com.google.api.server.spi.tools.EndpointsTool.main(EndpointsTool.java:92)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 16 more
It's very simple not to use Guava at this point, and it works. I just want to know why this is happening as I need a more have use of Guava in other parts.
Update:
I think it the same problem as:
Google Cloud Endpoints doesn't know about the Work class from Objectify 4 Transaction, causing ClassNotFoundException
Any tips?
Thanks!

GWT: RPC Failure (StatusCodeException)

in my project an RPC interface was implemented to communicate between GWT and a server as described here:
http://code.google.com/webtoolkit/doc/1.6/DevGuideServerCommunication.html
All the existing methods can be invoked fine, but lately i introduced a new method which when calling it results in an RPC failure:
com.google.gwt.user.client.rpc.StatusCodeException: The call failed on the server; see server log for details
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:192)
at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:254)
at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:226)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:217)
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:592)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.moz.MethodDispatch.invoke(MethodDispatch.java:80)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
(This excecption stacktrace is shown when running in hosted mode).
Here's the changes I made:
I extended my service interface with the new method:
#RemoteServiceRelativePath("myservice")
public interface MyService extends RemoteService {
// ...
Boolean isSomethingValid(String paramToCheck);
}
I implemented my method:
public class PMyServiceImpl extends GWTSpringController implements MyService {
// ...
public Boolean isSomethingValid(String paramToCheck) {
// do something ...
}
}
I added the method definition to the asynchronous interface:
public interface MyServiceAsync {
// ...
void isSomethingValid(String paramToCheck, AsyncCallback callback);
}
That's it. Am I missing anything? Any hints why the RPC failure occurs? In my server log, I can see the following exception:
[7/26/11 11:48:16:618 CEST] 0000004a WebApp A SRVE0181I: [myapplication.war] [/istoolset] [Servlet.LOG]: Exception while dispatching incoming RPC call: com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.Boolean com.ubs.istoolset.front.fet.gwt.businessmodel.client.service.MyService.isSomethingValid(java.lang.String)' threw an unexpected exception: java.lang.NullPointerException
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
at com.ubs.istoolset.gwt.framework.rpc.GWTSpringController.handleRequest(GWTSpringController.java:48)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:859)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:793)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:593)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:534)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
Caused by: java.lang.NullPointerException
at com.ubs.istoolset.front.fet.gwt.businessmodel.server.MyServiceImpl.isSomethingValid(MyServiceImpl.java:1906)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
... 27 more
Any help is very appreciated, thanks!
I'm not familiar with the com.ubs namespace (is that your code?), but this NullPointerException in your stack trace (server side) is a problem:
Caused by: java.lang.NullPointerException
at com.ubs.istoolset.front.fet.gwt.businessmodel.server.MyServiceImpl.isSomethingValid(MyServiceImpl.java:1906)
what is going on there?