Problem with installing Team City 4.5.4 on CentOS 5.2: spring configuration NullPointerException
Hello. I have problems with basic installation of TeamCity. I tried two different installations which resulted in same error:
I. JEE distribution (installed according to avaliable information on page Installation and Upgrade->Installation->Installing and Configuring the TeamCity Server->war distribution)
- I added TeamCity war file as new JEE application (root-context=teamserver)
- I added custom properties for JEE container (Application servers > server1 > Custom properties):
a) log4j.configuration=file:../conf/teamcity-server-log4j.xml
b) teamcity_logs ../logs/
- I restarted WAS server for custom properties to take effect
- I tried to open application: https://iapetus:9443/teamcity/
- exception was thrown
Exception was thrown:
Unexpected Error
Error message: SRVE0207E: Uncaught initialization exception created by servlet
Show stacktraceTrace: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:378)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:165)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:631)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:444)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:325)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:564)
at com.ibm._jsp._index._jspService(_index.java:95)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1455)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1396)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:788)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:444)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:234)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:337)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:325)
at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.dispatch(FilterProxyServlet.java:79)
at com.ibm.ws.webcontainer.servlet.FilterProxyServlet.service(FilterProxyServlet.java:58)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1455)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1396)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:917)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:924)
at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:651)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3622)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:927)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1566)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:175)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1772)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customEditorConfigurer' defined in ServletContext resource [/WEB-INF/buildServerSpringWeb.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:217)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:534)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:363)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at jetbrains.buildServer.web.impl.ServerContextLoaderListener.contextInitialized(ServerContextLoaderListener.java:30)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1591)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:353)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:293)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:728)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:613)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1144)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:723)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2068)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:108)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:935)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
... 1 more
Caused by: java.lang.NullPointerException
at org.springframework.core.GenericTypeResolver.getTypeVariableMap(GenericTypeResolver.java:144)
at org.springframework.core.GenericTypeResolver.resolveReturnType(GenericTypeResolver.java:93)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:58)
at java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:111)
at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:77)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:47)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:380)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
... 37 more
II. tar.gz distribution (installed according to avaliable information on page Installation and Upgrade->Installation->Installing and Configuring the TeamCity Server->tar.gz distribution)
$ mkdir /opt/jetbrains
# copied TeamCity-4.5.4.tar.gz /opt/jetbrains
$ cd /opt/jetbrains
$ tar -zxvf TeamCity-4.5.4.tar.gz
$ mv TeamCity TeamCity-4.5.4
$ ln -s TeamCity-4.5.4.tar.gz TeamCity
$ mkdir -p /opt/jetbrains/TeamCity/data/config
# added data path to root user .bash_profile
JAVA_HOME=/opt/IBM/WebSphere/AppServer/java
TEAMCITY_DATA_PATH=/opt/jetbrains/TeamCity/data
export JAVA_HOME TEAMCITY_DATA_PATH
$ . ~/.bash_profile
# copied main-config.xml from /opt/jetbrains/TeamCity/data/config
$ cd /opt/jetbrains/TeamCity/bin
$ runAll.sh
Using CATALINA_BASE: /opt/jetbrains/TeamCity
Using CATALINA_HOME: /opt/jetbrains/TeamCity
Using CATALINA_TMPDIR: /opt/jetbrains/TeamCity/temp
Using JRE_HOME: /opt/IBM/WebSphere/AppServer/java
Starting TeamCity build agent...
Done [23020], see log at ../logs/teamcity-agent.log
When I look at the ../logs/teamcity-server.log, following exception is shown:
[root@iapetus bin]# less ../logs/teamcity-server.log
[2009-07-16 01:26:05,514] INFO - jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-07-16 01:26:11,543] ERROR - jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (en
able debug to see the whole stacktrace):
Error creating bean with name 'customEditorConfigurer' defined in ServletContext resource [/WEB-INF/buildServerSpringWeb.x
ml]: Initialization of bean failed;
java.lang.NullPointerException
[2009-07-16 10:45:16,547] INFO - jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-07-16 10:45:21,725] ERROR - jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (en
able debug to see the whole stacktrace):
Error creating bean with name 'customEditorConfigurer' defined in ServletContext resource [/WEB-INF/buildServerSpringWeb.x
ml]: Initialization of bean failed;
java.lang.NullPointerException
[2009-07-16 11:41:57,874] INFO - jetbrains.buildServer.SERVER - Starting TeamCity server
[2009-07-16 11:42:03,116] ERROR - jetbrains.buildServer.SERVER - Failed to initialize TeamCity server, due to error (en
able debug to see the whole stacktrace):
Error creating bean with name 'customEditorConfigurer' defined in ServletContext resource [/WEB-INF/buildServerSpringWeb.x
ml]: Initialization of bean failed;
java.lang.NullPointerException
Am I missing something?
Thanks for your help,
br
Please sign in to leave a comment.
Try to use Sun JRE instead of IBM. It seems NullPointerException is caused by strange JRE behavior.
Hello.
Thanks for your help. It solved my problem. Complete procedure, if anyone else will have the same problem:
- downlad latest jdk from sun: jdk-6u14-linux-i586-rpm.bin
$ ./jdk-6u14-linux-i586-rpm.bin
# add to java alternatives
$ alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_14/bin/java 120 \
--slave /usr/bin/keytool keytool /usr/java/jdk1.6.0_14/bin/keytool \
--slave /usr/bin/rmiregistry rmiregistry /usr/java/jdk1.6.0_14/bin/rmiregistry
$ alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_14/bin/javac 120 \
--slave /usr/bin/jar jar /usr/java/jdk1.6.0_14/bin/jar \
--slave /usr/bin/rmic rmic /usr/java/jdk1.6.0_14/bin/rmic
alternatives --config java
alternatives --config javac
Maybe it would be good to mention, that product supports only Sun JDK in installation notes or which JDK's does support.