play framework unresolved dependency with mysql connector - jdbc

First of I am using the play framework (Java) version 2.38. I am trying to connect MySQL to my application and it is giving me an unresolved dependency error. I have looked at all threads here on this topic and nothing has worked, this is what I have...
Application.conf
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://127.0.0.1:3306/mydatabase"
db.default.user=root
db.default.password=""
plugins.sbt
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.8")
// web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.0.0")
addSbtPlugin("mysql" % "mysql-connector-java" % "5.6.24")
build.sbt
name := """TestApp"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.11.1"
libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache,
javaWs,
"mysql" % "mysql-connector-java" % "5.6.24"
)
libraryDependencies += "org.json" % "json" % "20141113"
fork in run := true
The error I am getting is the following
Error:Error while importing SBT project:
...
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:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency:
mysql#mysql-connector-java;5.6.24: not found
Invalid response.
Invalid response.
Invalid response.
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
See complete log in C:\Users\testingapp\.IntelliJIdea14
\system\log\sbt.last.log
I do not know if I am doing something wrong or if the SBT is failing somewhere, any suggestions?

MySQL java connector versions don't correlate to MySQL server versions.
See MySQL Connector/J compatibility chart for details.
The latest mysql-connector-java version for MySQL >= 4.0 as of writing is 5.1.35 (see Maven Central).
You should change your dependency declaration accordingly.
"mysql" % "mysql-connector-java" % "5.1.35"

Related

Ebean and H2 configuration issue with Play framework 2.5

I am trying to develop with Play Framework version 2.5, and I cannot get the database connection right. I am using H2 database with Ebean plugin 3.0.2 as an ORM. I tried several options for the entries in application.conf, based on the information found on Play Framework website and many of your posts. Please find below the entries to my configuration files and the error trace and help me :
**Application.conf**
play.db {
# The combination of these two settings results in "db.default" as the
#default JDBC pool:
config = "db"
default = "default"
prototype {
# Sets a fixed JDBC connection pool size of 50
#hikaricp.minimumIdle = 50
#hikaricp.maximumPoolSize = 50
}
}
db {
default.hikaricp.dataSourceClassName = org.h2.jdbcx.JdbcDataSource
default.driver = org.h2.Driver
default.url = "jdbc:h2:mem:play"
default.username = sa
default.password = ""
ebean.default = ["models.*"]
#play.ebean.default.dataSource = default
default.logSql=true
}
**Plugins.sbt**
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.10")
// Web plugins
addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.4")
addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.8")
addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")
addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.6")
addSbtPlugin("com.typesafe.sbt" % "sbt-play-enhancer" % "1.1.0")
enablePlugins(PlayEbean).
addSbtPlugin("com.typesafe.sbt" % "sbt-play-ebean" % "3.0.2")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" %
"5.0.1")
**Build.sbt**
name := """Institut"""
version := "1.0-SNAPSHOT"
lazy val Institut = (project in
file(".")).enablePlugins(PlayJava,PlayEbean)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
javaJdbc,
cache,
javaWs,
evolutions
)
**Console output**
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-1 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-2 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-3 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[info] application - Creating Pool for datasource 'ebean'
[error] c.z.h.HikariConfig - HikariPool-4 - dataSource or
dataSourceClassName
or jdbcUrl is required.
[error] application -
! #736eodoo7 - Internal server error, for (GET) [/] ->
play.api.Configuration$$anon$1: Configuration error[Cannot connect to
database [ebean]]
at play.api.Configuration$.configError(Configuration.scala:154)
at play.api.Configuration.reportError(Configuration.scala:806)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:48)
at playi.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
at scala.collection.immutable.List.foreach(List.scala:381)
at play.api.db.DefaultDBApi.connect(DefaultDBApi.scala:42)
at play.api.db.DBApiProvider.get$lzycompute(DBModule.scala:72)
at play.api.db.DBApiProvider.get(DBModule.scala:62)
at play.api.db.DBApiProvider.get(DBModule.scala:58)
at
Caused by: play.api.Configuration$$anon$1: Configuration
error[dataSource or
dataSourceClassName or jdbcUrl is required.]
at play.api.Configuration$.configError(Configuration.scala:154)
at play.api.PlayConfig.reportError(Configuration.scala:996)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:70)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at
play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:123)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:138)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
at
play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:42)
Caused by: java.lang.IllegalArgumentException: dataSource or
dataSourceClassName or jdbcUrl is required.
at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:786)
at play.api.db.HikariCPConfig.toHikariConfig(HikariCPModule.scala:141)
at
at scala.util.Try$.apply(Try.scala:192)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at
play.api.db.DefaultDatabase.dataSource$lazycompute(Databases.scala:123)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:121)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:142)
I had the same error message with H2 configuration , which was resolved be adding the dataSourceClassName, however I have tried to use default as datasource for Ebean without success.
Thank you !
ebean.default = ["models.*"] is not a member of the key db.default you have to place it outside of db.
According to your log ebean thinks that this key is another database
play.api.Configuration$$anon$1: Configuration error[Cannot connect to
database [ebean]]
More info here:
https://www.playframework.com/documentation/2.5.x/JavaDatabase#H2-database-engine-connection-properties

Spring migration from 3.x to 4.2.3 - issue

we almost done with migration of spring project from 3.2.2.Release to 4.2.3.Release successfully, but once we started testing we are facing below issue at multiple places in our application, i guess this some conflict i spent one day i didn't get any solution,
can any one please help to know what might be the issue?
E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause /WEB-INF/views/jsp/planning/individualPlanning.jsp: com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoSuchMethodError: org/springframework/web/servlet/tags/form/SelectTag.setDisabled(Ljava/lang/String;)V
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:693)
at com.ibm._jsp._individualPlanning._jspService(_individualPlanning.java:876)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1147)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:722)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:449)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1020)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1382)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:191)
below are the env details,
java 1.6, webshpere 8.0.0(meets jpa 2.0 servlet specs 3.0 sugggested by spring 4.2.3)
below are the jars list used in application,
activation-1.1.jar
aopalliance-1.0.jar
asm-4.2.jar
aspectjrt-1.8.6.jar
aspectjweaver-1.8.6.jar
avalon-framework-4.1.3.jar
biarengine-12.3.6.1006.jar
biplugins-12.3.6.1006.jar
boconfig-12.3.6.1006.jar
cafinstall-12.3.6.1006.jar
cecore-12.3.6.1006.jar
celib-12.3.6.1006.jar
ceplugins_client-12.3.6.1006.jar
ceplugins_core-12.3.6.1006.jar
ceplugins_cr-12.3.6.1006.jar
cereports-12.3.6.1006.jar
cesdk-12.3.6.1006.jar
cesearch-12.3.6.1006.jar
cesession-12.3.6.1006.jar
cglib-3.1.jar
classworlds-1.1.jar
clientplugins-12.3.6.1006.jar
com.ibm.ws.runtime.jar
commons_driver-12.3.6.1006.jar
commons-beanutils-1.8.3.jar
commons-cli-1.0.jar
commons-digester-1.8.jar
commons-fileupload-1.3.1.jar
commons-io-2.4.jar
commons-logging-1.1.jar
commons-validator-1.4.0.jar
corbaidl-12.3.6.1006.jar
crlov-12.3.6.1006.jar
crlovexternal-12.3.6.1006.jar
crlovmanifest-12.3.6.1006.jar
CrystalCommon2-12.3.6.1006.jar
cvom_chart_lib_en-12.3.6.1006.jar
cvom_chart_lib-12.3.6.1006.jar
cvom-12.3.6.1006.jar
dfc.jar
doxia-sink-api-1.0-alpha-7.jar
ebus405-12.3.6.1006.jar
ehcache-core-2.6.10.jar
elf-1.0.jar
i18n4j-12.3.6.1006.jar
itext-1.4.5-12.3.6.1006.jar
jackson-annotations-2.5.0.jar
jackson-core-2.5.1.jar
jackson-databind-2.5.1.jar
javax.inject-1.jar
jcl-over-slf4j-1.7.11.jar
jsch-0.1.27.jar
jsse.jar
jstl-1.2.jar
jtidy-4aug2000r7-dev.jar
jtools-12.3.6.1006.jar
jxl-2.6.jar
jxlib-12.3.6.1006.jar
log4j-1.2.15.jar
logging-12.3.6.1006.jar
logkit-1.0.1.jar
mail-1.4.jar
maven-artifact-2.0.6.jar
maven-artifact-manager-2.0.6.jar
maven-core-2.0.6.jar
maven-error-diagnostics-2.0.6.jar
maven-filtering-1.0.jar
maven-model-2.0.6.jar
maven-monitor-2.0.6.jar
maven-plugin-api-2.0.6.jar
maven-plugin-descriptor-2.0.6.jar
maven-plugin-parameter-documenter-2.0.6.jar
maven-plugin-registry-2.0.6.jar
maven-profile-2.0.6.jar
maven-project-2.0.6.jar
maven-reporting-api-2.0.6.jar
maven-repository-metadata-2.0.6.jar
maven-resources-plugin-2.5.jar
maven-settings-2.0.6.jar
mybatis-3.2.3.jar
mybatis-ehcache-1.0.3.jar
mybatis-spring-1.2.1.jar
ojdbc6-11.2.0.jar
plexus-build-api-0.0.4.jar
plexus-container-default-1.0-alpha-9-stable-1.jar
plexus-interactivity-api-1.0-alpha-4.jar
plexus-interpolation-1.13.jar
plexus-utils-2.0.5.jar
rasapp-12.3.6.1006.jar
rascore-12.3.6.1006.jar
rebean-12.3.6.1006.jar
rebean.fc-12.3.6.1006.jar
rebean.wi-12.3.6.1006.jar
ReportViewer-12.3.6.1006.jar
serialization-12.3.6.1006.jar
SL_plugins-12.3.6.1006.jar
slf4j-api-1.7.11.jar
slf4j-log4j12-1.7.11.jar
spring-aop-4.2.3.RELEASE.jar
spring-beans-4.2.3.RELEASE.jar
spring-context-4.2.3.RELEASE.jar
spring-context-support-4.2.3.RELEASE.jar
spring-core-4.2.3.RELEASE.jar
spring-expression-4.2.3.RELEASE.jar
spring-jdbc-4.2.3.RELEASE.jar
spring-jmx-2.0.8.jar
spring-orm-4.2.3.RELEASE.jar
spring-tx-4.2.3.RELEASE.jar
spring-web-4.2.3.RELEASE.jar
spring-webmvc-4.2.3.RELEASE.jar
sunjce_provider.jar
URIUtil-12.3.6.1006.jar
wagon-file-1.0-beta-2.jar
wagon-http-lightweight-1.0-beta-2.jar
wagon-http-shared-1.0-beta-2.jar
wagon-provider-api-1.0-beta-2.jar
wagon-ssh-1.0-beta-2.jar
wagon-ssh-common-1.0-beta-2.jar
wagon-ssh-external-1.0-beta-2.jar
webreporting-12.3.6.1006.jar
wilog-12.3.6.1006.jar
xml-apis-1.0.b2.jar
individualPlanning.jsp obviously uses the Spring MVC select tag and sets the disabled attribute. org.springframework.web.servlet.tags.form.SelectTag in version 4.2.3.RELEASE doesn't have a setDisabled(String) method (did it ever?). Instead it's got a setDisabled(boolean) inherited from AbstractHtmlInputElementTag.

Set up on Mac OS X - play framework2

I'm tried to set up playframe work on OSX and bumped into some troubles.
Download Typesafe Activator and set up as this procedure. https://www.playframework.com/documentation/2.4.x/
"activator new test" -> "cd test" -> "activator run"
Access localhost:9000 with Safari to get a message Failed to open page
Some error messages are there as below.
Is there any idea to solve the problem?
% activator run +[master]
[info] Loading project definition from /Users/w256/Library/Mobile Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project
[info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/project/}scala-getting-started-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Set current project to play-getting-started (in build file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/)
[info] Updating {file:/Users/w256/Library/Mobile%20Documents/com~apple~CloudDocs/000.now/vo/scala-getting-started/}root...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * io.netty:netty:3.10.1.Final -> 3.10.4.Final
[warn] Run 'evicted' to see detailed eviction warnings
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
[error] p.c.s.n.PlayDefaultUpstreamHandler - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:320) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:90) ~[play-netty-server_2.11-2.4.3.jar:2.4.3]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:455) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:538) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:437) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.5.7.Final.jar:na]
"activator ui" makes similar errors as below.
% activator ui +[master]
Found previous process id: 9525
Local repository: activator-launcher-local # file:/usr/local/Cellar/typesafe-activator/1.3.6/libexec/repository
Local repository: activator-local # file:/Users/w256/Downloads/activator-dist-1.3.7/repository
Play server process ID is 12608
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[error] p.nettyException - Exception caught in Netty
java.lang.NoSuchMethodError: org.jboss.netty.handler.codec.http.HttpRequest.headers()Lorg/jboss/netty/handler/codec/http/HttpHeaders;
at play.core.server.netty.PlayDefaultUpstreamHandler.getHeaders(PlayDefaultUpstreamHandler.scala:366) ~[play_2.11-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(PlayDefaultUpstreamHandler.scala:87) ~[play_2.11-2.3.9.jar:2.3.9]
at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:62) ~[netty-http-pipelining-1.1.2.jar:na]
at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:104) ~[netty-3.5.7.Final.jar:na]
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.5.7.Final.jar:na]
build.sbt is here.
name := """play-getting-started"""
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
jdbc,
cache,
"org.postgresql" % "postgresql" % "9.4-1201-jdbc41",
"org.jscience" % "jscience" % "4.3.1",
ws,
"com.typesafe.play" % "play-netty-server_2.11" % "2.4.3" force(),
"io.netty" % "netty" % "3.10.4.Final" force(),
"com.typesafe.netty" % "netty-http-pipelining" % "1.1.4" force()
)
libraryDependencies <+= scalaVersion("org.scala-lang" % "scala-compiler" % _ )

OSGI. Waiting for timeout during installation of bundle (tinybundles)

I have a problem running pax exam test under karaf.
During an installation of bundle
2015-05-20 14:16:42,644 | DEBUG | FelixStartLevel | BundleManager | 1 - org.apache.karaf.features.core - 3.0.0 | Checking file:/tmp/ops4j-store-anonymous-568188393605841387/tinybundles_c3beb06a2df3da75e08a1ae1a44c832cfbd034c0.bin
it hangs for some time in
org.apache.karaf.features.internal.BundleManager#waitForUrlHandler
looking for a
(&(objectClass=org.osgi.service.url.URLStreamHandlerService)(url.handler.protocol=file))
here is the thread dump:
at java.lang.Object.wait(Object.java:-1)
at org.osgi.util.tracker.ServiceTracker.waitForService(ServiceTracker.java:499)
at org.apache.karaf.features.internal.BundleManager.waitForUrlHandler(BundleManager.java:229)
at org.apache.karaf.features.internal.BundleManager.getInputStreamForBundle(BundleManager.java:186)
at org.apache.karaf.features.internal.BundleManager.doInstallBundleIfNeeded(BundleManager.java:99)
at org.apache.karaf.features.internal.BundleManager.installBundleIfNeeded(BundleManager.java:90)
at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:523)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:383)
at org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92)
at org.apache.karaf.features.internal.BootFeaturesInstaller.start(BootFeaturesInstaller.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)
at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)
at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:681)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:378)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
- locked <0xbb5> (a java.util.concurrent.atomic.AtomicBoolean)
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)
at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4403)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2092)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
at java.lang.Thread.run(Thread.java:745)
I didn't find any bundle that provides that service => so my test hangs for 30sec each time installing tinybundle's folder.
I've started a paxexam's karaf manually from the target folder and I ran service:list to see what bundles can provide URLStreamHandlerService service but there wasn't any with url.handler.protocol=file
service.id = 2
Provided by :
System Bundle (0)
Used by:
Apache Felix File Install (17)
Apache Aries JMX Core (225)
[org.osgi.service.url.URLStreamHandlerService]
service.id = 51
url.handler.protocol = feature
Provided by :
Apache Karaf :: Deployer :: Features (12)
[org.osgi.service.url.URLStreamHandlerService]
service.id = 15
url.handler.protocol = jardir
Provided by :
Apache Felix File Install (17)
[org.osgi.service.url.URLStreamHandlerService]
service.id = 42
url.handler.protocol = spring
Provided by :
Apache Karaf :: Deployer :: Spring (27)
[org.osgi.service.url.URLStreamHandlerService]
service.id = 45
url.handler.protocol = blueprint
Provided by :
Apache Karaf :: Deployer :: Blueprint (30)
[org.osgi.service.url.URLStreamHandlerService]
service.id = 4
url.handler.protocol = [wrap]
Provided by :
OPS4J Pax Url - wrap: (37)
[org.osgi.service.url.URLStreamHandlerService]
So the question is: how can I avoid waiting for a timeout. Do we really need URLStreamHandlerService service, if yes how can I provide it ?

Play 2.3.3 heroku deployment error

i'm trying to deploy a play! framework 2.3.3 application to heroku this is the response from deployment window
Initializing repository, done.
Counting objects: 814, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (786/786), done.
Writing objects: 100% (814/814), 5.80 MiB | 10.00 KiB/s, done.
Total 814 (delta 316), reused 0 (delta 0)
-----> Play 2.x - Java app detected
-----> Installing OpenJDK 1.8...done
-----> Downloading SBT...done
-----> Priming Ivy cache (Scala-2.11, Play-2.3)... done
-----> Running: sbt update
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512M; suppo
rt was removed in 8.0
[info] Loading project definition from /tmp/scala_buildpack_build_dir/pro
ject
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:3: object Proj
ect is not a member of package play
[error] import play.Project._
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:14: not found:
value filters
[error] filters,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:20: not found:
value javaCore
[error] javaCore,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:21: not found:
value javaJdbc
[error] javaJdbc,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:22: not found:
value javaEbean
[error] javaEbean,
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:23: not found:
value cache
[error] cache
[error] ^
[error] /tmp/scala_buildpack_build_dir/project/Build.scala:28: object Pro
ject is not a member of package play
[error] val main = play.Project(appName, appVersion, appDependencies)
.settings(
[error] ^
[error] 7 errors found
[error] (compile:compile) Compilation failed
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ! Fail
ed to run sbt task: update
! Push rejected, failed to compile Play 2.x - Java app
To git#heroku.com:obscure-scrubland-1026.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:obscure-scrubland-1026.git'
this is a what build.sbt looks like
import play.PlayJava
name := "schoolapp"
scalaVersion := "2.11.1"
version := "1.0-SNAPSHOT"
val appDependencies = Seq(
"be.objectify" %% "deadbolt-java" % "2.3.0-RC1",
// Comment the next line for local development of the Play Authentication core:
"com.feth" %% "play-authenticate" % "0.6.5-SNAPSHOT",
"postgresql" % "postgresql" % "9.1-901-1.jdbc4",
javaCore,
cache,
javaWs,
javaJdbc,
javaEbean
)
resolvers ++= Seq(
"Apache" at "http://repo1.maven.org/maven2/",
"jBCrypt Repository" at "http://repo1.maven.org/maven2/org/",
"play-easymail (release)" at "http://joscha.github.io/play-easymail/repo/releases/",
"play-easymail (snapshot)" at "http://joscha.github.io/play-easymail/repo/snapshots/",
Resolver.url("Objectify Play Repository", url("http://schaloner.github.io/releases/"))(Resolver.ivyStylePatterns),
"play-authenticate (release)" at "http://joscha.github.io/play-authenticate/repo/releases/",
"play-authenticate (snapshot)" at "http://joscha.github.io/play-authenticate/repo/snapshots/"
)
// Uncomment the next line for local development of the Play Authenticate core:
//lazy val playAuthenticate = project.in(file("modules/play-authenticate")).enablePlugins(PlayJava)
lazy val root = project.in(file("."))
.enablePlugins(PlayJava)
.settings(
libraryDependencies ++= appDependencies
)
// Uncomment the next lines for local development of the Play Authenticate core:
//.dependsOn(playAuthenticate)
//.aggregate(playAuthenticate)
i'm using the play authenticate module. what could be the problem?
Try to remove import play.Project._ and add import play.PlayImport._ in your project/Build.scala file.

Resources