Java 9, Spring Framework 5.0, Spring boot 2.0 - spring-mvc

I am getting the following error when I upgrade from Java8 to Java9 Spring boot application. Is any annotation in the spring-web-5.0.0.RELEASE and spring-webmvc-5.0.0.RELEASE that are not supported by Java 9. I am unable to make out from the error received in the application.
2017-10-31 14:18:39.767 ERROR [org.springframework.boot.SpringApplication] [main] [] Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233)
at com.tsys.enterprise.issuing.account.application.Main.main(Main.java:30)
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at java.base/sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at java.base/sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at java.base/sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.base/java.lang.Class.createAnnotationData(Class.java:3730)
at java.base/java.lang.Class.annotationData(Class.java:3719)
at java.base/java.lang.Class.createAnnotationData(Class.java:3735)
at java.base/java.lang.Class.annotationData(Class.java:3719)
at java.base/java.lang.Class.getAnnotation(Class.java:3624)
at java.base/java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:262)
at java.base/java.lang.Class.isAnnotationPresent(Class.java:3634)
at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:610)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:177)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:217)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:188)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:129)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1763)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1700)

If you see this other ticket sun.reflect.annotation.TypeNotPresentExceptionProxy exception after adding EntityListeners
The exception that you´re having TypeNotPresentExceptionProxy it could be you have an annotation which a class that is not in the classPath.
On of the greatest/annoying features of Java 9 is the module system, where now you will have to specify in your module-info some package if you want to use it.
Your requestMappingHandlerMapping class contains any annotation that can prove my theory?

Related

java bean validation fails to run: java.io.NotSerializableException: com.sun.el.ExpressionFactoryImpl

I am running Jakarta Bean Validation 6.1.2 under Apache Flink and running into the included "Caused by: java.io.NotSerializableException: com.sun.el.ExpressionFactoryImpl" error.
Here are the gradle deps:
compile 'org.hibernate.validator:hibernate-validator:6.1.2.Final'
compile 'org.glassfish:jakarta.el:3.0.3'
compile 'org.apache.flink:flink-java:1.10.0'
compile 'org.apache.flink:flink-streaming-java_2.12:1.10.0'
compile 'org.apache.flink:flink-clients_2.12:1.10.0'
compile 'org.apache.flink:flink-connector-kafka-base_2.12:1.10.0'
compile 'org.apache.flink:flink-connector-kafka-0.10_2.12:1.10.0'
Thoughts?
thx in advance,
james
org.apache.flink.api.common.InvalidProgramException:
com.sun.el.ExpressionFactoryImpl#7ca33c24 is not serializable. The object probably contains
or references non serializable fields.
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:151)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:126)
at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:71)
at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.clean(StreamExecutionEnvironment.java:1821)
at org.apache.flink.streaming.api.datastream.DataStream.clean(DataStream.java:188)
at org.apache.flink.streaming.api.datastream.DataStream.map(DataStream.java:590)
at com.lacuna.data.mds.EventProcessor.main(EventProcessor.java:49)
Caused by: java.io.NotSerializableException: com.sun.el.ExpressionFactoryImpl
at java.base/java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1185)
at java.base/java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
WARNING: An illegal reflective access operation has occurred

Unable to request the metadata service Service-Id after upgrading to Artifactory 6.9.1 from 6.0.2

I have upgraded a few test instances of our Artifactory 6.0.2 Installation to version 6.9.1 using the provided instructions found at:
https://www.jfrog.com/confluence/display/RTF/Upgrading+Artifactory
I have tried both the yum upgrade and rpm installation pathways, and would like to end the installation with no error messages in the log files to minimize any potential issues from such errors.
After installation and many manual remediation steps I have reached an error "Unable to request the Metadata Service Service-Id" that I cannot find Google results for:
2019-04-09 16:22:13,409 [art-init] [ERROR] (o.a.m.s.s.ArtifactoryMetadataClientConfigStore:111) - Unable to request the Metadata Service Service-Id
2019-04-09 16:22:13,409 [art-init] [ERROR] (o.a.m.s.MetadataEventServiceImpl:188) - Unable to init the Metadata client. The Metadata Event pipeline will be disabled.
I have tried both the yum upgrade and rpm installation pathways.
After the upgrades, I noticed errors in the Catalina and Artifactory log files and followed the google search results regarding those error messages (added below my question for posterity):
(1) Created:
/var/opt/jfrog/artifactory/access/etc/bootstrap.creds
Containing:
access-admin#127.0.0.1=NEW_PASSWORD
(2) Removed access folder:
rm -rf /opt/jfrog/artifactory/tomcat/webapps/access
(3) Changed permissions of Artifactory directories:
cd /var/opt/jfrog/artifactory/
chown -R artifactory:artifactory .
(4) EDITED the artifactory.system.properties file adding:
artifactory.pathChecksum.migration.job.enabled=true
(5) Enabled sha 256 migration by adding this content to this same file:
##SHA2 Migration block
artifactory.sha2.migration.job.enabled=true
artifactory.sha2.migration.job.queue.workers=5
(5) Finally, Rebooted instance.
Yet the errors including The Metadata Event pipeline will be disabled persist.
I expect that the final state of the Artifactory server will be such that there are no error messages in the Artifactory nor Catalina log files.
Any assistance on remediating this error so that i can deploy the latest Artifactory build will be highly appreciated.
Thank you in advance.
======================
Here are some of the ERROR LOGS WHICH INITIATED CHANGES SHOWN ABOVE:
(1) 2019-03-27 05:03:22,872 [art-init] [WARN ] (o.j.a.c.AccessClientHttpException:41) - Unrecognized ErrorsModel by Access. Original message: Failed on executing /api/v1/system/ping, with response: Not Found
2019-03-27 05:03:22,872 [art-init] [ERROR] (o.a.s.a.AccessServiceImpl:364) - Could not ping access server: {}
org.jfrog.access.client.AccessClientHttpException: HTTP response status 404:Failed on executing /api/v1/system/ping, with response: Not Found.
(2)2019-03-27 05:06:53,235 [art-exec-3] [INFO ]
(o.a.s.j.m.s.Sha256MigrationJobDelegate:216) - SHA256 migration job (for existing artifacts) is disabled and will not run, there are 52496 artifacts without SHA256 values in the database.  Future versions of Artifactory may enforce this migration as a prerequisite for upgrades.
(3) 2019-04-04 16:20:10,951 [localhost-startStop-1] [JFrog-Access] [WARN ] (o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext:550) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jerseyConfig' defined in URL [jar:file:/opt/jfrog/artifactory/tomcat/webapps/access/WEB-INF/lib/access-application-4.2.0.jar!/org/jfrog/access/rest/config/JerseyConfig.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.jfrog.access.rest.config.JerseyConfig]: Constructor threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'systemResource' defined in URL [jar:file:/opt/jfrog/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-rest-4.2.0.jar!/org/jfrog/access/server/rest/resource/system/SystemResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'backupSubResource' defined in URL [jar:file:/opt/jfrog/artifactory/tomcat/webapps/access/WEB-INF/lib/access-server-rest-4.2.0.jar!/org/jfrog/access/server/rest/resource/system/backup/BackupSubResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'backupServiceImpl': Unsatisfied dependency expressed through field 'importerExporter'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessImporterExporterImpl': Unsatisfied dependency expressed through method 'setServerBootstrap' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accessServerBootstrapImpl': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Failed to bootstrap initial access credentials.
Thank you for the feedback #error404.
We ended up opening a ticket with Jfrog support (https://www.jfrog.com/jira/browse/RTFACT-18939) who was able to replicate the issue and subsequently marked the ticket as "Fix Version/s: 6.10.0"
Although not strictly stated, I assume this Fix Version update implies that the described issue will be remediated in the next release.

Corda: Cannot connect to server(s)

I have downloaded the corda example project: spring-observable-stream and try to run it from IntelliJ. While started the server, It gives error:
W 11:01:55 1 AnnotationConfigEmbeddedWebApplicationContext.refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nodeRPCConnection' defined in file [C:\Corda\spring-observable-stream\server\out\production\classes\net\corda\server\NodeRPCConnection.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.corda.server.NodeRPCConnection]: Constructor threw exception; nested exception is ActiveMQNotConnectedException[errorType=NOT_CONNECTED message=AMQ119007: Cannot connect to server(s). Tried with all available servers.]
You need to start the nodes before you start the servers. See the instructions here: https://docs.corda.net/tutorial-cordapp.html#running-the-example-cordapp.
I have had a similar issue with the cordapp-example on the Mac. I found that running the runnodes command in headless mode worked for me as per the instructions here: https://docs.corda.net/docs/corda-os/4.4/tutorial-cordapp.html#running-the-example-cordapp-2

Context initialization failed error while starting the kaa service

I am getting ERROR o.s.web.context.ContextLoader - Context initialization failed error while starting the kaa service. I am using the instructions in the following document. (version = kaa-node-0.10.0.deb)
http://kaaproject.github.io/kaa/docs/v0.10.0/Administration-guide/System-installation/Single-node-installation/
Any pointer to solve this?
ERROR
2016-12-10 05:13:31,499 [main] ERROR o.s.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: org.kaaproject.kaa.server.admin.services.messaging.MessagingService org.kaaproject.kaa.server.admin.services.AbstractAdminService.messagingService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messagingService' defined in class path resource [admin-web/WEB-INF/adminContext.xml]: Invocation of init method failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection
You have some trouble with sql database. You use MariaDb or PostgreSQL? Please check configurations in kaa/server/common/dao/src/main/resources/sql-dao.properties and kaa/server/node/src/main/resources/admin-dao.properties files.
If you use MariaDb, maybe you forgot to create user in database. Please use documentation, part where example about creation of user.

Not able to login to localhost:8080/share and getting error for localhost:8080/alfresco

I have been following tutorials and documentation from alfresco for development and deployment but not able to login.
I have all in one sdk and it works fine if I run the ./run.sh file followed with login and other screens popping as normal follow. Now when I take alfresco.war(repo.war) and share.war to alfresco community and placed them on tomcat (/Applications/alfresco-community/tomcat/webapps) folder.
Now I run the alfresco using command ./alfresco start and able to see the login screen but not able to login where else I tried to open localhost:8080/alfresco and getting error as below.
I have not changed any port or any config file and if I get back to original alfresco community files (alfresco and share wars file) then it opens both url followed with properly working.
*/**** UPDATE ****/*
Postgresql is running on port 5433.
Alfresco.log are below: -
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.beans.factory.config.PropertyPathFactoryBean#607cd510' defined in class path resource [alfresco/ibatis/ibatis-context.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean '&sessionFactory' while setting bean property 'localSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceCheck' defined in class path resource [alfresco/core-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.domain.schema.DataSourceCheck]: Constructor threw exception; nested exception is java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:276)
... 105 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialect' defined in class path resource [alfresco/hibernate-context.xml]: Cannot resolve reference to bean '&sessionFactory' while setting bean property 'localSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceCheck' defined in class path resource [alfresco/core-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.domain.schema.DataSourceCheck]: Constructor threw exception; nested exception is java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1418)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1159)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:412)
at org.springframework.beans.factory.config.PropertyPathFactoryBean.setBeanFactory(PropertyPathFactoryBean.java:184)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1533)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1501)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
... 107 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceCheck' defined in class path resource [alfresco/core-services-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.domain.schema.DataSourceCheck]: Constructor threw exception; nested exception is java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:285)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:980)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:283)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 121 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.alfresco.repo.domain.schema.DataSourceCheck]: Constructor threw exception; nested exception is java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:277)
... 132 more
Caused by: java.lang.RuntimeException: Database connection failed: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.alfresco.repo.domain.schema.DataSourceCheck.<init>(DataSourceCheck.java:59)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 134 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.h2.jdbcx.JdbcDataSource'
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.alfresco.repo.domain.schema.DataSourceCheck.<init>(DataSourceCheck.java:53)
... 139 more
Caused by: java.lang.ClassNotFoundException: org.h2.jdbcx.JdbcDataSource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
... 142 more
Postgresql.log is EMPTY.
Thanks in advance.
The issue is fixed, it was because of alfresco was looking for H2 database rather than postgresql (Thanks to #Akash & #Gagravarr). Also I have changed the version of alfresco community I was using (downgraded) and now its working fine.
Thank you all for the help!
Instead of localhost , can you try with IP address.

Resources