I try to migrate my play 2.6.6 application to 2.7.0. I am using Hibernate 4.2.3-Final. Does anybody know the cause of those Exceptions?
GeneralDao.java:71 is:
#Inject
public GeneralDao(JPAApi jpaApi) {}
OnStartup.java:66 is similar to above.
CreationException: Unable to create injector, see the following errors
1) Error injecting constructor, javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
at play.db.jpa.DefaultJPAApi$JPAApiProvider.<init>(DefaultJPAApi.java:59)
at play.db.jpa.DefaultJPAApi$JPAApiProvider.class(DefaultJPAApi.java:50)
while locating play.db.jpa.JPAApi
for the 1st parameter of dao.GeneralDao.<init>(GeneralDao.java:71)
for the 2nd parameter of modules.OnStartup.<init>(OnStartup.java:66)
at modules.OnStartupModule.configure(OnStartupModule.java:10) (via modules: com.google.inject.util.Modules$OverrideModule -> modules.OnStartupModule)
while locating modules.OnStartup
Caused by: javax.persistence.PersistenceException: Unable to configure EntityManagerFactory
[cut]
Caused by: java.lang.RuntimeException: Error while reading file:/R:/appDir/target/scala-2.12/classes/
at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:131)
[cut]
Caused by: java.io.IOException: invalid constant type: 18
[cut]
Full Stacktrace: https://pastebin.com/nEt1iavu
Updating to Hibernate 4.2.8-Final resolved the errors.
Thank you Stephen C for the hint.
Related
I just upgraded spring boot version to : 2.7.0 & spring cloud to: 2021.0.3 and because it is a legacy system and got an error I added the dependency mentioned in :No spring.config.import property has been defined and got the following error
Caused by: java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.BootstrapRegistryInitializer : org.springframework.cloud.config.client.ConfigClientRetryBootstrapper
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:449)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:266)
at org.springframework.boot.builder.SpringApplicationBuilder.createSpringApplication(SpringApplicationBuilder.java:129)
at org.springframework.boot.builder.SpringApplicationBuilder.<init>(SpringApplicationBuilder.java:102)
at org.springframework.boot.builder.SpringApplicationBuilder.<init>(SpringApplicationBuilder.java:98)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createSpringApplicationBuilder(SpringBootServletInitializer.java:166)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:130)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5221)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 44 more
Caused by: java.lang.IllegalArgumentException: class org.springframework.cloud.config.client.ConfigClientRetryBootstrapper is not assignable to interface org.springframework.boot.BootstrapRegistryInitializer
at org.springframework.util.Assert.assignableCheckFailed(Assert.java:720)
at org.springframework.util.Assert.isAssignable(Assert.java:651)
at org.springframework.util.Assert.isAssignable(Assert.java:682)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:443)
... 56 more
Can someone help please ?
Thanks
Environment :
Tomcat8
Ignite 2.11.1
JDK 11 (corretto)
After some time on tomcat8 the web application user Ignite to handle http session do that kind of error. Always on the same type. But it works at the begining.
SequenceEditableList class inherite of Arraylist<>
Caused by: org.apache.ignite.IgniteCheckedException: Failed to deserialize object with given class loader: [clsLdr=ParallelWebappClassLoader
context: xxxxxx
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader#4277127c
, err=Failed to deserialize object [typeName=com.xxxx.web.common.list.SequenceEditableList]]
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:261)
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:225)
at org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller.unmarshal(AbstractNodeNameAwareMarshaller.java:92)
at org.apache.ignite.internal.binary.BinaryUtils.doReadOptimized(BinaryUtils.java:1816)
... 137 common frames omitted
Caused by: java.io.IOException: Failed to deserialize object [typeName=com.xxxx.web.common.list.SequenceEditableList]
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:357)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObjectOverride(OptimizedObjectInputStream.java:205)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:484)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:451)
at org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller.unmarshal0(OptimizedMarshaller.java:251)
... 140 common frames omitted
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:611)
at org.apache.ignite.internal.marshaller.optimized.OptimizedClassDescriptor.read(OptimizedClassDescriptor.java:985)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readObject0(OptimizedObjectInputStream.java:353)
... 144 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.ignite.internal.marshaller.optimized.OptimizedObjectInputStream.readSerializable(OptimizedObjectInputStream.java:608)
... 146 common frames omitted
Caused by: java.io.InvalidClassException: filter status: REJECTED
at java.base/java.io.ObjectInputStream.filterCheck(ObjectInputStream.java:1356)
at java.base/java.io.ObjectInputStream.checkArray(ObjectInputStream.java:1386)
at java.base/java.util.ArrayList.readObject(ArrayList.java:924)
... 150 common frames omitted
What happens is that your class loader rejects the class SequenceEditableList.
The class is rejected because of serialization filtering. This mechanism is there to protect from many serialization vulnerabilities that caused problems in Java since the dawn of time.
The fix would be to find if your application already sets jdk.serialFilter system property anywhere. Ignite doesn't do that but maybe the application code or Tomcat do. Judging from the error, there must be this property somewhere.
When you've found where the property is defined, add your class to the allowed patterns. Like:
-Djdk.serialFilter=...;com.xxxx.web.common.list.SequenceEditableList
There aren't many details in the question, so it's hard to tell why it works in the beginning but fails after some time. Most likely it's because the classes are being deserialized in a different route (by a different class loader), or there just isn't an instance of SequenceEditableList that you need to deserialize. You could analyze.
I'm getting the following exception while trying to deploy my camel-quartz application in fuse:
Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=test-quartz-impl, config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route371: Route(route371)[[From[quartz://test/testQuartzJob?c... because of Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1619)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:123)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)[174:org.apache.servicemix.bundles.spring-context:3.2.12.RELEASE_2]
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[178:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[179:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_121]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route371: Route(route371)[[From[quartz://test/testQuartzJob?c... because of Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:190)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:838)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:2897)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2620)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2469)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2465)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2488)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2465)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2434)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)[210:org.apache.camel.camel-spring:2.15.1.redhat-621117]
... 10 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: quartz://test/testQuartzJob?cron=0+0%2F15+*+1%2F1+*+%3F due to: Cannot auto create component: quartz
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:575)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:200)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:70)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:89)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1008)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:185)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 22 more
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: quartz
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:397)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:373)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:545)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 30 more
Caused by: org.quartz.SchedulerConfigException: Unable to instantiate class load helper class: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper [See nested exception: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper]
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:692)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1509)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
at org.apache.camel.component.quartz.QuartzComponent.createScheduler(QuartzComponent.java:555)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.component.quartz.QuartzComponent.getScheduler(QuartzComponent.java:407)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.component.quartz.QuartzComponent.doStart(QuartzComponent.java:228)[664:org.apache.camel.camel-quartz:2.15.1.redhat-621117]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2871)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:392)[205:org.apache.camel.camel-core:2.15.1.redhat-621117]
... 32 more
Caused by: java.lang.ClassCastException: org.quartz.simpl.CascadingClassLoadHelper cannot be cast to org.quartz.spi.ClassLoadHelper
at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:689)[662:org.apache.servicemix.bundles.quartz:1.8.6.1]
... 39 more
I am using camel-quartz (Quartz1 of camel).
I've seen this JBoss and Quartz but it is specific to JBoss server.
The camel-quartz dependency didn't have any scope.
After checking here http://camel.apache.org/how-to-use-extra-camel-componets-in-servicemix-camel.html, I've added provided and it started working.
Thank You #nmagerko and #ledniov.
server loading time it showing this error:
Caused by: org.springframework.beans.TypeMismatchException: Failed to
convert property value of type 'java.lang.String' to required type
'java.lang.Class[]' for property 'annotatedClasses'; nested exception
is java.lang.IllegalArgumentException: Cannot find class
[com.vcs.model.Student] Caused by: java.lang.ClassNotFoundException:
com.vcs.model.Student
I tried to deploy play framework 2.4 application on glassfish.
I used maven play2 plugin and made war file with the following instruction.
https://play2-maven-plugin.github.io/play2-maven-plugin/1.0.0-beta4/war-packaging.html
After that, I tried to deploy my war from glassfish console, but it returned the following error.
Error occurred during deployment: Exception while loading the app :
CDI deployment failure:Exception List with 3 exceptions:
Exception 0 : org.jboss.weld.exceptions.DeploymentException:
WELD-001408: Unsatisfied dependencies for type Environment with qualifiers #Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] #Inject public play.api.db.BoneConnectionPool(Environment)
at play.api.db.BoneConnectionPool.<init>(BoneConnectionPool.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:370)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:291)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:165)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:529)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:515)
at org.jboss.weld.bootst .... msg.seeServerLog
Error occurred during deployment: Exception while loading the app :
CDI deployment failure:
WELD-001408: Unsatisfied dependencies for type Database with qualifiers #Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] #Inject public modules.MyBatisModule$PlayDataSourceProvider(Database)
at modules.MyBatisModule$PlayDataSourceProvider.<init>(PlayDataSourceProvider.java:0) .
Please see server.log for more details.
And MyBatisModule is like this.
public class MyBatisModule extends org.mybatis.guice.MyBatisModule {
#Override
protected void initialize() {
environmentId("development");
bindConstant().annotatedWith(Names.named("mybatis.configuration.failFast")).to(true);
bindDataSourceProviderType(PlayDataSourceProvider.class);
bindTransactionFactoryType(JdbcTransactionFactory.class);
addMapperClasses();
}
#Singleton
public static class PlayDataSourceProvider implements Provider<DataSource> {
final Database db;
#Inject
public PlayDataSourceProvider(final Database db) {
this.db = db;
}
public DataSource get() {
return db.getDataSource();
}
}
I think the application can't read application.conf that containts DB setting. But I'm not sure.
Could you give me any advices?
Update 2015/01/13
I disabled "Implicit CDI" option on glassfish console when I deployed application.
I don't get the first error now, but I get another error...
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException:
ContainerBase.addChild: start: org.apache.catalina.LifecycleException: com.google.inject.CreationException:
Unable to create injector, see the following errors:
1) Error in custom provider, Configuration error: Configuration error
[Cannot connect to database [default]] while locating play.api.db.DBApiProvider while locating play.api.db.DBApi for parameter 0
at play.db.DefaultDBApi.<init>(DefaultDBApi.java:28)
at play.db.DefaultDBApi.class(DefaultDBApi.java:28) while locating play.db.DefaultDBApi while locating play.db.DBApi for field
at play.db.DBModule$NamedDatabaseProvider.dbApi(DBModule.java:61) while locating play.db.DBModule$NamedDatabaseProvider
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.db.DBModule.bindings(DBModule.java:40): Binding(interface play.db.Database qualified with QualifierInstanc .... msg.seeServerLog
My conf/application.conf is here:
db.default.driver=oracle.jdbc.driver.OracleDriver
db.default.url="jdbc:oracle:thin:#url..."
db.default.username=username
db.default.password=password
And it works on local environment.
I think glassfish can't read application.conf in war file.
I'm sorry. Could you give me the advice again?
Update 2015/01/14
The following is the part of full log.
Caused by: Configuration error: Configuration error[Exception during pool initialization]
at play.api.Configuration$.configError(Configuration.scala:178)
at play.api.PlayConfig.reportError(Configuration.scala:1048)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:69)
at play.api.db.PooledDatabase.createDataSource(Databases.scala:199)
at play.api.db.DefaultDatabase.dataSource$lzycompute(Databases.scala:124)
at play.api.db.DefaultDatabase.dataSource(Databases.scala:122)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:143)
at play.api.db.DefaultDatabase.getConnection(Databases.scala:139)
at play.api.db.DefaultDBApi$$anonfun$connect$1.apply(DefaultDBApi.scala:44)
... 130 more
Caused by: com.zaxxer.hikari.pool.PoolInitializationException: Exception during pool initialization
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:542)
at com.zaxxer.hikari.pool.BaseHikariPool.<init>(BaseHikariPool.java:171)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:60)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:48)
at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:80)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:58)
at play.api.db.HikariCPConnectionPool$$anonfun$1.apply(HikariCPModule.scala:54)
at scala.util.Try$.apply(Try.scala:191)
at play.api.db.HikariCPConnectionPool.create(HikariCPModule.scala:54)
... 136 more
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
at com.zaxxer.hikari.pool.BaseHikariPool.addConnection(BaseHikariPool.java:441)
at com.zaxxer.hikari.pool.BaseHikariPool.initializeConnections(BaseHikariPool.java:540)
... 144 more
3) Error in custom provider, java.lang.NullPointerException
at play.db.DBModule.bindings(DBModule.java:40):
Binding(interface play.db.Database qualified with QualifierInstance(#play.db.NamedDatabase(value=default)) to ProviderTarget(play.db.DBModule$NamedDatabaseProvider#34850279)) (vi
a modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1)
while locating play.db.Database annotated with #play.db.NamedDatabase(value=default)
Some thoughts (it should be comment, but I cannot write comments on SO yet).
If your application.conf file is inside WEB-INF/classes directory, it should be found (more info - https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Specifying-an-alternate-configuration-file).
Does war file contain JDBC driver?
Maybe you should configure JNDI - https://www.playframework.com/documentation/2.4.x/ScalaDatabaseOthers#Exposing-the-datasource-through-JNDI
My problem cause is that:
Caused by: java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured
https://www.playframework.com/documentation/2.4.x/Migration24#JDBC-connection-pool
After I add the following setting on application.conf, it works.
(This sql is for Oracle DB.)
db.default.hikaricp.connectionTestQuery="SELECT 1 FROM DUAL"
Thank you for your help!