Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when embedding CloudSlang in a Spring Application #1133

Open
ssrini opened this issue Dec 13, 2019 · 2 comments
Open

Exception when embedding CloudSlang in a Spring Application #1133

ssrini opened this issue Dec 13, 2019 · 2 comments

Comments

@ssrini
Copy link

ssrini commented Dec 13, 2019

I have a Spring/Hibernate Application with a MySQL data source. The App ear file is deployed in WlidFly.

I embedded CloudSlang, added the following to my springconfig.xml

<context:component-scan base-package="io.cloudslang**, all-other-packages"/>

<bean class="io.cloudslang.lang.api.configuration.SlangSpringConfiguration"/>
  <score:engine />
  <score:worker uuid="-1"/>

Note that for my app, I use persistence.xml with the different entities defined with MySQL

After working through a number of errors I finally got all dependencies etc resolved and now on startup when the beans get initialized the following exceptions are thrown:

 INFO  {} {} {} {} {} [io.cloudslang.schema.ScoreNamespaceHandler] (ServerService Thread Pool -- 55) Registering Score namespace handler
DEBUG {} {} {} {} {} [io.cloudslang.schema.ScoreNamespaceHandler] (ServerService Thread Pool -- 55) registered element <engine> with parser io.cloudslang.schema.EngineBeanDefinitionParser
DEBUG {} {} {} {} {} [io.cloudslang.schema.ScoreNamespaceHandler] (ServerService Thread Pool -- 55) registered element <worker> with parser io.cloudslang.schema.WorkerBeanDefinitionParser

--- other messages ---

17:27:34,499 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'slangCompilationServiceImpl': Unsatisfied dependency expressed through field 'slang'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'slang': Unsatisfied dependency expressed through field 'score'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreImpl#0': Unsatisfied dependency expressed through field 'scoreTriggering'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreTriggeringImpl#0': Unsatisfied dependency expressed through field 'runningExecutionPlanService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runningEP': Unsatisfied dependency expressed through field 'runningExecutionPlanRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,499 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
17:27:34,500 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
17:27:34,500 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
17:27:34,501 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
17:27:34,501 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
17:27:34,501 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,502 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,503 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,503 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,503 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
17:27:34,504 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
17:27:34,505 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
17:27:34,505 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
17:27:34,506 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
17:27:34,506 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at com.unvired@3.5.2//com.unvired.ump.hibernate.facades.UMPServiceLocator.<clinit>(UMPServiceLocator.java:26)
17:27:34,506 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 23 more
17:27:34,508 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'slang': Unsatisfied dependency expressed through field 'score'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreImpl#0': Unsatisfied dependency expressed through field 'scoreTriggering'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreTriggeringImpl#0': Unsatisfied dependency expressed through field 'runningExecutionPlanService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runningEP': Unsatisfied dependency expressed through field 'runningExecutionPlanRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,512 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
17:27:34,514 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
17:27:34,515 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
17:27:34,515 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
17:27:34,516 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
17:27:34,516 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,516 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,517 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,517 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,517 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
17:27:34,522 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
17:27:34,523 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
17:27:34,523 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
17:27:34,523 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
17:27:34,524 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 37 more
17:27:34,525 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreImpl#0': Unsatisfied dependency expressed through field 'scoreTriggering'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreTriggeringImpl#0': Unsatisfied dependency expressed through field 'runningExecutionPlanService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runningEP': Unsatisfied dependency expressed through field 'runningExecutionPlanRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,525 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
17:27:34,526 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
17:27:34,526 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
17:27:34,526 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
17:27:34,527 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
17:27:34,527 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,528 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,546 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,546 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,547 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
17:27:34,547 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
17:27:34,548 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
17:27:34,548 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
17:27:34,548 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
17:27:34,549 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 50 more
17:27:34,550 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'io.cloudslang.orchestrator.services.ScoreTriggeringImpl#0': Unsatisfied dependency expressed through field 'runningExecutionPlanService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runningEP': Unsatisfied dependency expressed through field 'runningExecutionPlanRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,551 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
17:27:34,551 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
17:27:34,557 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
17:27:34,558 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
17:27:34,559 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
17:27:34,560 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,561 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,565 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,566 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,566 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
17:27:34,567 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
17:27:34,567 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
17:27:34,571 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
17:27:34,571 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
17:27:34,572 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 63 more
17:27:34,573 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runningEP': Unsatisfied dependency expressed through field 'runningExecutionPlanRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,574 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
17:27:34,574 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
17:27:34,574 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
17:27:34,575 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
17:27:34,575 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
17:27:34,576 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,576 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,576 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,577 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,577 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
17:27:34,578 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
17:27:34,578 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
17:27:34,579 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
17:27:34,582 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
17:27:34,583 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 76 more
17:27:34,584 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runningExecutionPlanRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,584 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
17:27:34,585 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
17:27:34,586 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
17:27:34,586 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
17:27:34,587 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
17:27:34,589 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
17:27:34,590 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
17:27:34,590 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
17:27:34,591 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
17:27:34,594 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
17:27:34,598 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
17:27:34,600 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 89 more
17:27:34,610 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) Caused by: java.lang.IllegalArgumentException: Not an managed type: class io.cloudslang.score.facade.entities.RunningExecutionPlan
17:27:34,615 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.hibernate//org.hibernate.jpa.internal.metamodel.MetamodelImpl.managedType(MetamodelImpl.java:219)
17:27:34,616 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.<init>(JpaMetamodelEntityInformation.java:71)
17:27:34,616 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getEntityInformation(JpaEntityInformationSupport.java:68)
17:27:34,616 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:184)
17:27:34,616 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:117)
17:27:34,617 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getTargetRepository(JpaRepositoryFactory.java:99)
17:27:34,617 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:198)
17:27:34,617 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.initAndReturn(RepositoryFactoryBeanSupport.java:277)
17:27:34,617 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:263)
17:27:34,619 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:101)
17:27:34,620 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
17:27:34,620 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	at org.springframework.spring//org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
17:27:34,620 ERROR {} {} {} {} {} [stderr] (ServerService Thread Pool -- 48) 	... 99 more

@Bonczidai This is similar to issue #537 but I am not using SpringBoot. The app does use the SpringFramework and bean definition in the XML config.

Any assistance in resoiving this is appreciated.

@ssrini
Copy link
Author

ssrini commented Dec 16, 2019

Got it running after a lot of back and forth.

What finally worked:

  1. Use the default persistence unit
  2. Package scan also the io.cloudslang package for components and entities
  3. Use the following while embedding: <score:engine externalDatabase=true />
  4. Now tables get created in my App's datasource
  5. Existing App entityManagerFactory also needed primary="true" to get all bindings in App to work
  6. And liquibase had to be made a dependency to entityManagerFactory in existing App

Finally, one hack that I am not sure how to work around. In my App when the DS is created/available, I had to add a call to statically ini else dataSource was not initialized and resulted in a NullPointerException:

SimpleHiloIdentifierGenerator.setDataSource(ds);

@Bonczidai Any way I can work around this via Spring Config to initialize the datasource for SimpleHiLoIdentifierGenerator. In issue CloudSlang/score#190 its mentioned: "To set your dataSource change dataSource method from" io.cloudslang.schema.context.ScoreDefaultDatasourceContext
But since externalDatabase is true, this class is not even used.

Any hints on the last mile to init the dataSource?

@ssrini
Copy link
Author

ssrini commented Dec 19, 2019

Any help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant