I am unable to deploy grails war in tomcat .
Copied all 55 jars to $CATALINA_HOME/shared/lib/grails-jars/
Added shared.loader= ${catalina.home}/shared/lib/grails-jars/*.jar
And started tomcat successfully. Now deployed grails war in deploy folder (war is ~572.4KB).
The console shows these errors :
log4j:ERROR Could not instantiate appender named "CONSOLE".
28 Jan, 2010 11:35:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2010-01-28 11:36:06,294 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed;
nested exception is org.hibernate.MappingException: Could not get constructor for org.codehaus.groovy.grails.orm.hibernate.persister.entity.GroovyAwareSingleTableEntityPersister
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
My application contains 4 plugins :
hibernate-1.1.2
liferay-exploded-0.8
portlets-0.7
portlets-liferay-0.1
Could any one please help me .
thanks in advance .
Sounds like this might be a Hibernate version problem, as described here.
Related
I need to deploy a web with jboss and it appears an ERROR :
[/WEB-INF/spring/persistence-beans.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource';
16:44:33,079 WARN [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 122) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/persistence-beans.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring/persistence-beans.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: datasources/nhwebDSPostGreSQL [Root exception is java.lang.IllegalStateException]
I tried to reinstall the jboss but the message continues. Help pls 😢
I have test Alfresco Community 7.1 with Keycloak.
My Keycloak use https (self signed certificate)
My alfresco-global.properties (Alfresco Repository)
authentication.chain=identity-service1:identity-service,alfrescoNtlm1:alfrescoNtlm
identity-service.enable-basic-auth=true
identity-service.authentication.validation.failure.silent=false
identity-service.auth-server-url=https://192.168.10.25/auth
identity-service.realm=guru
identity-service.resource=alfresco-client
identity-service.public-client=true
identity-service.ssl-required=none
csrf.filter.referer=https://192.168.11.22:443
csrf.filter.origin=https://192.168.11.22:443/*
aims.enabled=true
aims.realm=guru
aims.resource=alfresco-client
aims.authServerUrl=https://192.168.10.25/auth
aims.publicClient=true
My share-config-custom.xml (Alfresco Share)
<alfresco-config>
<config evaluator="string-compare" condition="Users" replace="true">
<users>
<username-min-length>2</username-min-length>
<password-min-length>3</password-min-length>
<show-authorization-status>false</show-authorization-status>
</users>
<enable-external-users-panel>false</enable-external-users-panel>
</config>
<config evaluator="string-compare" condition="AIMS">
<enabled>true</enabled>
<realm>guru</realm>
<resource>alfresco-client</resource>
<authServerUrl>https://192.168.10.25/auth</authServerUrl>
<sslRequired>none</sslRequired>
<publicClient>true</publicClient>
</config>
</alfresco-config>
When I start alfresco with docker compose command. It show error like this
alfresco_1 | 2022-03-01 06:41:33,478 WARN [context.support.XmlWebApplicationContext] [main] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationComponent' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/subsystems/Authentication/identity-service/identity-service-authentication-context.xml]: Cannot resolve reference to bean 'authenticatorAuthzClient' while setting bean property 'authenticatorAuthzClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticatorAuthzClient': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not obtain configuration from server [https://192.168.10.25/auth/realms/guru/.well-known/uma2-configuration].
alfresco_1 | 2022-03-01 06:41:33,854 INFO [management.subsystems.ChildApplicationContextFactory] [main] Stopping 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
alfresco_1 | 2022-03-01 06:41:33,856 INFO [management.subsystems.ChildApplicationContextFactory] [main] Stopped 'Authentication' subsystem, ID: [Authentication, managed, alfrescoNtlm1]
alfresco_1 | 2022-03-01 06:41:33,866 ERROR [web.context.ContextLoader] [main] Context initialization failed
alfresco_1 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'patch.updateAdminUserWhenDefault' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/patch/patch-services-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationComponent' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/alfresco-repository-12.23.jar!/alfresco/subsystems/Authentication/identity-service/identity-service-authentication-context.xml]: Cannot resolve reference to bean 'authenticatorAuthzClient' while setting bean property 'authenticatorAuthzClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticatorAuthzClient': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not obtain configuration from server [https://192.168.10.25/auth/realms/guru/.well-known/uma2-configuration].
[Alfresco Repository Error]
: https://i.stack.imgur.com/4yHl4.jpg
[Alfreso Share Error][1]
: https://i.stack.imgur.com/FePSJ.jpg
But if I use another Keycloak Server on Public Cloud with Valid Certificate (Lets Encrypt) It can work without problem.
My Question is, How to configure alfresco to use with Keycloak Internal Server which use Self Sign Certificate.
Thank you
I am trying to run local grails app in terminal (well, in Pycharm) and it fails with this:
[WARN] 2017-11-28 13:16:26,836 (springframework.jdbc.datasource.LazyConnectionDataSourceProxy:warn:189) | Could not retrieve default auto-commit and transaction isolation settings
org.postgresql.util.PSQLException: This ResultSet is closed.
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkClosed(AbstractJdbc2ResultSet.java:2852)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.setFetchSize(AbstractJdbc2ResultSet.java:1875)
at org.postgresql.jdbc4.Jdbc4Statement.createResultSet(Jdbc4Statement.java:37)
at org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandler.handleResultRows(AbstractJdbc2Statement.java:219)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1816)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
at org.postgresql.jdbc2.AbstractJdbc2Connection.execSQLUpdate(AbstractJdbc2Connection.java:376)
at org.postgresql.jdbc2.AbstractJdbc2Connection.getTransactionIsolation(AbstractJdbc2Connection.java:898)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:233)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1214)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:261)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.grails.jetty.JettyServer.startServer(JettyServer.groovy:134)
at org.grails.jetty.JettyServer.start(JettyServer.groovy:99)
at _GrailsRun$_run_closure1.doCall(_GrailsRun.groovy:60)
at RunApp$_run_closure1.doCall(RunApp.groovy:33)
[WARN] 2017-11-28 13:16:27,152 (engine.jdbc.internal.JdbcServicesImpl:configure:195) | HHH000341: Could not obtain connection metadata : This ResultSet is closed.
[WARN] 2017-11-28 13:16:27,165 (grails.commons.spring.GrailsWebApplicationContext:warn:189) | Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:733)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:233)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1214)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:676)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:455)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:261)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.grails.jetty.JettyServer.startServer(JettyServer.groovy:134)
at org.grails.jetty.JettyServer.start(JettyServer.groovy:99)
at _GrailsRun$_run_closure1.doCall(_GrailsRun.groovy:60)
at RunApp$_run_closure1.doCall(RunApp.groovy:33)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException
... 13 more
I have postgres instance running in docker.
Version of grails is 2.4.5.
I have Mac OS. I am behind proxy.
The grails was compiled successfully before and also some tests passed.
Unfortunately I have no idea what could be wrong and what should I try. I have no clue what to look for.
I will be very glad for any suggestion which direction to look for!
Thanks! :)
This question already has answers here:
javax.persistence.PersistenceException : [PersistenceUnit: vodPersistenceUnit] class or package not found
(4 answers)
Closed 5 years ago.
Error creating bean with name
'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in URL [file:/E:/source-files-healthentic/securityadmin/build/test/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/E:/source-files-healthentic/securityadmin/build/test/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in URL [file:/E:/source-files-healthentic/securityadmin/build/test/classes/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/E:/source-files-healthentic/securityadmin/build/test/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:411)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:271)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:268)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:597)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:366)
at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
at org.apache.struts2.StrutsSpringTestCase.setupBeforeInitDispatcher(StrutsSpringTestCase.java:39)
at org.apache.struts2.StrutsTestCase.setUp(StrutsTestCase.java:208)
at healthentic.admin.action.StrutsSpringBase2Setup.setUp(StrutsSpringBase2Setup.java:128)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/E:/source-files-healthentic/securityadmin/build/test/classes/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:411)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:382)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:271)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:268)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:174)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:309)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:266)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:122)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:78)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:97)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1318)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:475)
Caused by: java.lang.IllegalStateException: Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation.
at org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver.addTransformer(InstrumentationLoadTimeWeaver.java:88)
at org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.addTransformer(SpringPersistenceUnitInfo.java:80)
at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:225)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1361)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1327)
I'm getting this error when running my application(using Struts2 spring3 integrated and jpa eclipse link ) junit test.... how can i resolve this problem................ kindly check ans suggest me....
To help others with this issue,
I have he same problem after including some of the APIS thst uses later Spring (3.x.) versions to the existing project.
My application was started up successfully in one machine but failed on another machine. After investigating carefully we found this,
On the machine it was failing, the PersistenceExceptionTranslationPostProcessor was loaded from spring-dao-2.0.8.jar
[Loaded org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor from file:/lib/spring-dao-2.0.8.jar]
Where as on the other machine it was loaded from spring-tx-3.1.1.RELEASE.jar
[Loaded org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor from file:/lib/spring-tx-3.1.1.RELEASE.jar]
Then I tried removing the spring-dao-2.0.8.jar from the class-path and tried, it worked.
spring-dao-2.0.8.jar was an unnecessary dependency.
Regards
Lyju
The error states,
"Must start with Java agent to use InstrumentationLoadTimeWeaver. See Spring documentation."
so, you either need to use the Spring Java agent to start your JVM, or need to disable the InstrumentationLoadTimeWeaver.
See,
How to configure EclipseLink 2.0 and Spring 3.0.5 and Tomcat 6?
For JPA weaving with EclipseLink, you can also use the static weaver, then no agent or instrumentation is required.
o.s.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productfeedSvc':
Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field:
private com.dealwallet.productFeed.repository.ProductFeedRepository
com.dealwallet.productFeed.svc.impl.ProductSvcImpl.productFeedRepository;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productFeedRepository': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: **org.springframework.transaction.interceptor.TransactionInterceptor.setTransactionManagerBeanName(Ljava/lang/String;)**V
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
I am using spring data jpa with spring batch admin,
i configured application-context.xml and persistance.xml,
when am running this in tomcat i got this error.
It says there is problem in auto-wiring.
So check these items:
- Make sure your class (the one which is using the other) has setter for that property.
- Make sure your class's property (the one which is using the other) has the exact name of the other class bean id.
- Make sure you have enabled annotations.