• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • Problem deploying OpenSpecimen v6.3

    #1

    When I deploy the war file to my tomcat, I am getting an error:

    05-Feb-2020 13:10:23.675 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/apache-tomcat-9.0.30/webapps/ROOT.war]
    05-Feb-2020 13:10:37.538 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = openspecimen Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "100" for "maxActive" property, which is being ignored.
    05-Feb-2020 13:10:37.539 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = openspecimen Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
    05-Feb-2020 13:10:37.853 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    log4j:WARN No appenders could be found for logger (com.krishagni.catissueplus.core.init.AppServletContextListener).
    log4j:WARN Please initialize the log4j system properly.
    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
    

    It seems that it could not get the retrieve all content for the app.

    Thanks for the help.
    Robert Reihs

    #2

    When I cp the webapps/ROOT/WEB-INF/classes/default-log4j.properties to webapps/ROOT/WEB-INF/classes/log4j.properties, I am getting a log file in /os.log with this errors:

    2020-02-05 13:19:46,987 [main] ERROR com.krishagni.catissueplus.core.init.AppServletContextListener- Error obtaining webapp context name
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at java.lang.String.substring(String.java:1931)
            at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:74)
            at com.krishagni.catissueplus.core.init.AppServletContextListener.contextInitialized(AppServletContextListener.java:46)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
            at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
            at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
            at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
            at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
    2020-02-05 13:19:46,993 [main] ERROR com.krishagni.catissueplus.core.init.AppServletContextListener- Error initializing app
    java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:77)
            at com.krishagni.catissueplus.core.init.AppServletContextListener.contextInitialized(AppServletContextListener.java:46)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
            at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
            at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
            at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
            at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
    Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            at java.lang.String.substring(String.java:1931)
            at com.krishagni.catissueplus.core.init.AppServletContextListener.getContextName(AppServletContextListener.java:74)
            ... 42 more
    2020-02-05 13:19:47,020 [main] INFO  org.springframework.web.context.ContextLoader- Root WebApplicationContext: initialization started
    2020-02-05 13:19:47,173 [main] INFO  org.springframework.web.context.support.XmlWebApplicationContext- Refreshing Root WebApplicationContext: startup date [Wed Feb 05 13:19:47 UTC 2020]; root of context hierarchy
    2020-02-05 13:19:47,276 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
    2020-02-05 13:19:48,241 [main] INFO  org.springframework.security.core.SpringSecurityCoreVersion- You are running with Spring Security Core 4.2.8.RELEASE
    2020-02-05 13:19:48,247 [main] INFO  org.springframework.security.config.SecurityNamespaceHandler- Spring Security 'config' module version is 4.2.8.RELEASE
    2020-02-05 13:19:49,067 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/migrationContext.xml]
    2020-02-05 13:19:49,098 [main] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader- Loading XML bean definitions from ServletContext resource [/WEB-INF/postInitContext.xml]
    2020-02-05 13:19:49,667 [main] WARN  org.springframework.web.context.support.XmlWebApplicationContext- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: null; nested exception is java.lang.NullPointerException
    2020-02-05 13:19:49,671 [main] ERROR org.springframework.web.context.ContextLoader- Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: null; nested exception is java.lang.NullPointerException
            at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:223)
            at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222)
            at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
            at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:283)
            at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:163)
            at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
            at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685)
            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
            at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
            at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
            at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
            at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
            at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
            at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
            at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
            at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
            at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
            at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
    Caused by: java.lang.NullPointerException
            at com.krishagni.catissueplus.core.init.AppPropertyPlaceholderConfigurer.resolvePlaceholder(AppPropertyPlaceholderConfigurer.java:9)
            at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)
            at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:277)
            at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
            at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
            at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258)
            at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
            at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
            at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
            at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
            at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:220)
            ... 50 more