Jump to content

Jasper Server and Java 1.8 - Error During Server Startup


varun.arbatti

Recommended Posts

Hello,

 

I ran into this issue while upgrading the version of Java from 7 to 8 on my test environment.

 

Firstly, My deployment environment looks like this -

Jasper Server 5.5 hosted by Apache tomcat 7.0.53 running on CentOS 6.4. with java version 1.8.0.

 

The issue I'm facing currently is that Jasper Server errors out during start up. This is becuase it cannot create two beans - SessionFactory and EmailInputValidator. Because of this, a host of beans fail throwing Spring's bean creation execption.

 

The stack trace that is logged by tomcat -

 

Email Input Validator -

Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultReportJobValidator': Injection of resource dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailInputValidator' defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: 10247
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
... 83 more

Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailInputValidator' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: 10247
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303)
... 91 more

Session Factory -
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulerService' defined in ServletContext
resource [/WEB-INF/applicationContext-web-services.xml]: Cannot resolve reference to bean 'reportSchedulerServiceImpl' while setting bean property 'target';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportSchedulerServiceImpl' defined in ServletContext
resource [/WEB-INF/applicationContext-web-services.xml]: Cannot resolve reference to bean 'jobsService' while setting bean property 'jobsService'; nested exception is
org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'jobsService': Injection of resource dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'reportSchedulingService' defined in ServletContext resource
[/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'reportJobsPersistenceService' while setting bean property 'persistenceService'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportJobsPersistenceService': FactoryBean threw exception on object creation; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reportJobSecurity' defined in ServletContext
resource [/WEB-INF/applicationContext-report-scheduling.xml]: Cannot resolve reference to bean 'authenticationManager' while setting bean property 'authenticationManager';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticationManager' defined in
ServletContext resource [/WEB-INF/applicationContext-security.xml]: Cannot resolve reference to bean 'daoAuthenticationProvider' while setting
bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoAuthenticationProvider' defined in ServletContext
resource [/WEB-INF/applicationContext-security.xml]: Cannot resolve reference to bean 'userAuthorityService' while setting bean property 'userDetailsService'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userAuthorityService' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is
currently in creation returned null from getObject

Caused by:
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sessionFactory': FactoryBean which is currently in creation returned null from getObjectat
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:156)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1441)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)...
214 more
[/code]
The same set up runs as expected, without any errors, when I switch the version back to Java 1.7. I have not been able to debug the issue on my machine yet.

I wanted to reach out to the community to check if JasperServer has been hosted successfully on a machine running Java 8. If so, can you please share your insights?

 

Any pointers appreciated.

 

Thanks in advance.

 

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...