Error:
SEVERE: Exception sending context initialized event to listener instance
of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.context.weaving.AspectJWeavingEnabler#0':
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'loadTimeWeaver': Initialization of bean failed; nested
\exception is java.lang.IllegalStateException: ClassLoader
[org.apache.catalina.loader.WebappClassLoader] does NOT provide an
'addTransformer(ClassFileTransformer)' method. Specify a custom
LoadTimeWeaver or start your Java virtual machine with Spring's agent:
-javaagent:spring-agent.jar
But I have javaagent in my tomcat VM arguments
-Dext.prop.dir="/home/gopi/Desktop/REST_CONFIG" -javaagent:/home/gopi/.m2
/repository/org/springframework/spring-agent/2.5.6/spring-agent-
2.5.6.jar -Dcatalina.base="/opt/apache-tomcat-7.0.62"
-Dcatalina.home="/opt/apache-tomcat-7.0.62" -Dwtp.deploy="/opt/apache-
tomcat-7.0.62/wtpwebapps" -Djava.endorsed.dirs="/opt/apache-tomcat-
7.0.62/endorsed"
-Dext.prop.dir and -javaagent added by me and remaining are by default.. How do i solve this issue? Any ideas?
I guess you need to give below to specify which loadTimeWeaver to use. See here for details.
<context:load-time-weaver
weaver-class="org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver"/>
</beans>
Related
I am trying to run an application on tomcat server. The application was earlier running on Jboss EAP. All the configuration changes have been made in the tomcat context.xml and other application related configuration files like web.xml, etc. The only ERROR and SEVERE logs that I see when the application is being deployed are mentioned below:
[main] ERROR org.springframework.web.context.ContextLoader - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'redisCacheManager' defined in class path
resource [config/serviceContext.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.tcs.cdm.cache.CacheManager]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems: The type redis.clients.jedis.JedisPoolConfig cannot be
resolved. It is indirectly referenced from required .class files
. . .
SEVERE: Exception sending context initialized event to listener
instance of class
[org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'redisCacheManager' defined in class path
resource [config/serviceContext.xml]: Instantiation of bean failed;
nested exception is
org.springframework.beans.BeanInstantiationException: Failed to
instantiate [com.tcs.cdm.cache.CacheManager]: Constructor threw
exception; nested exception is java.lang.Error: Unresolved compilation
problems: The type redis.clients.jedis.JedisPoolConfig cannot be
resolved. It is indirectly referenced from required .class files
. . .
SEVERE: One or more listeners failed to start. Full details will be
found in the appropriate container log file
org.apache.catalina.core.StandardContext startInternal SEVERE: Context
[/AppName] startup failed due to previous errors
I have gone through several threads but did not find any solution working for me. I have tried making version changes to jsf related jars in my pom.xml but that also doesn't help. I am currently using tomcat version 9.0.36 but have also tried TomEE 8.0.8 for the same but facing the same issue in both the cases. It would be great if someone could guide as to why this error is coming or a possible solution for the same.
I am migrating my spring jsf project from ANT to maven, while deploying in jboss 5 server getting below error.
ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyLoaderJob' defined in ServletContext resource [/WEB-INF/property.xml]: Cannot resolve reference to bean 'propertyloader' while setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'propertyloader' defined in ServletContext resource [/WEB-INF/property.xml]: Cannot resolve reference to bean 'dataSource' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/DataSource.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: fsmDS not bound
The exception means that JDBC driver is missed.Please check if you have JDBC driver dependency in pom.xml.
I have a very big problem with my atomikos. I cant create bean because of below error:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authenticatingSignInAdapter': Unsatisfied dependency expressed through field 'userRepoAutowired': Error creating bean with name 'userRepo': Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: Error in init: Log already in use? tmlog in ./; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepo': Invocation of init method failed; nested exception is com.atomikos.icatch.SysException: Error in init: Log already in use? tmlog in ./
I read a link: solve error : log already in use with atomikos with multiple instances. but nothing helped me. Do you know what can be a problem? It is only one bean that cant be created.
It looks like you are starting multiple instances on the same log folder / log file.
<code>[ERROR] 2016-01-23 14:48:41,925 [main] org.springframework.web.context.ContextLoader {} - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.ConsumerEndpointFactoryBean#54': Cannot resolve reference to bean 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#10' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.file.config.FileWritingMessageHandlerFactoryBean#10': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanInitializationException: failed to initialize MessageHandler; nested exception is java.lang.IllegalArgumentException: Destination directory [./taust-ee] could not be created</code>
I have this strange problem when running Jetty 8 on Debian 8 Jessie... Don't know where to dig, apps seems to be okay, because on windows and deployed by Jenkins running well. Where can be problem?
I have developed portal based on Liferay Portal CE 6.1.1ga2 (bundled version with tomcat 7.0.27). It worked fine on my windows machine with java x64 version 1.6.0_31 and on linux server with Red Hat Enterprise Linux Server release 5.4 (Tikanga) and java x64 version 1.6.0_29. Now I have to install portal to HP Superdome 2 with HP-UX. I am not administrator of that server, but I know last version of java 6 from HP-UX repositories and HP-UX OS are installed. My portal doesn't start on server. I also tried to install clean bundled version of Liferay Portal 6.1.1ga2, 6.1.2ga3 (tomcat 7.0.40), 6.2.0ga1 (tomcat 7.0.42). The newest version 6.2.0 I tried to run with java 6 and java 7. I tried to install 6.1.1ga2 from WAR file to tomcat server from HP-UX repositories, but it didn't help. Everywhere I have the same error message.
The log file catalina.out has size 9.3 MB and contains 48000 lines after one start.
Main part
....
Jan 14, 2014 6:09:37 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
06:09:55,229 INFO [localhost-startStop-1][DialectDetector:71] Determine dialect for HSQL Database Engine 2
06:09:55,241 WARN [localhost-startStop-1][DialectDetector:86] Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal-ext.properties.
06:09:55,312 INFO [localhost-startStop-1][DialectDetector:136] Found dialect org.hibernate.dialect.HSQLDialect
06:10:40,958 ERROR [localhost-startStop-1][ContextLoader:206] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.security.permission.ResourceActionsUtil' defined in class path resource [META-INF/util-spring.xml]: Cannot create inner bean 'com.liferay.portal.security.permission.ResourceActionsImpl#2264e6' of type [com.liferay.portal.security.permission.ResourceActionsImpl] while setting bean property 'resourceActions'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.security.permission.ResourceActionsImpl#2264e6' defined in class path resource [META-INF/util-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.PortletLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.AccountLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.AccountService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.AddressLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.AddressService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.BackgroundTaskLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.BackgroundTaskService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.BrowserTrackerLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ClassNameLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ClassNameService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ClusterGroupLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CMISRepositoryLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CompanyLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CompanyService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ContactLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ContactService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.CountryService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.EmailAddressLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.EmailAddressService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.GroupLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.GroupService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ImageLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ImageService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.LayoutLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.impl.LayoutLocalServiceHelper' defined in class path resource [META-INF/util-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.ResourcePermissionLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.LayoutService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.LayoutBranchLocalService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.service.LayoutBranchService' defined in class path resource [META-INF/portal-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException:
...
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.counter.service.persistence.CounterPersistence' defined in class path resource [META-INF/counter-spring.xml]: Instantiation of bean failed; nested exception is java.lang.StackOverflowError
And many-many such messages with "error creating bean with name" ending with
Caused by: java.lang.StackOverflowError
I deployed to tomcat simple servlet application and spring "hello world" application, they work fine.
Can anybody help me?
The solution was obvious. Use -Xss512k in setenv.sh to increase thread stack size