Skip to content

Check XD compatibilty #847

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

Closed
philwebb opened this issue May 12, 2014 · 13 comments
Closed

Check XD compatibilty #847

philwebb opened this issue May 12, 2014 · 13 comments
Assignees
Milestone

Comments

@philwebb
Copy link
Member

No description provided.

@philwebb philwebb added this to the 1.1.0.M2 milestone May 12, 2014
@philwebb
Copy link
Member Author

Thomas Risberg: freemarker-2.3.15.jar is on the classpath via a dependency in spring-batch-admin-manager maybe an exclusion there would help if we don't need it

@dsyer
Copy link
Member

dsyer commented May 13, 2014

I think an exclusion in XD would be the best solution. Why is this in the Boot tracker?

@philwebb
Copy link
Member Author

I forgot to paste the stack trace. It seems the upgrade to 1.1 for XD causes this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot find template location: class path resource [templates/] (please add some templates or check your FreeMarker configuration)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:680)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:130)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:117)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:117)
at org.springframework.xd.dirt.server.SingleNodeApplication.run(SingleNodeApplication.java:60)
at org.springframework.xd.dirt.config.AbstractSingleNodeInitializationTests.setUp(AbstractSingleNodeInitializationTests.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalStateException: Cannot find template location: class path resource [templates/] (please add some templates or check your FreeMarker configuration)
at org.springframework.util.Assert.state(Assert.java:385)
at org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration.checkTemplateLocationExists(FreeMarkerAutoConfiguration.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
... 42 more

@philwebb
Copy link
Member Author

Perhaps Freemarker templates should not be part of the template folder check? or should we convert that exception to a warning?

@wilkinsona
Copy link
Member

Treating FreeMarker differently doesn't feel right to me. Instead, I'd recommend either disabling the check (spring.freemarker.checkTemplateLocation=false) or excluding its auto-configuration in XD

@philwebb
Copy link
Member Author

We could add that as a hint to the exception

@philwebb
Copy link
Member Author

/cc @dturanski

@dturanski
Copy link

Freemarker exclusions working. We seem to have lost the auto configured RedisConnectionFactory

@philwebb
Copy link
Member Author

Possibly the switch to Jedis? #745

@dsyer
Copy link
Member

dsyer commented May 20, 2014

Working OK now with snapshots https://github.com/dsyer/spring-xd/tree/feature/boot1.1. There's a pull request in for XD based on that branch.

@philwebb philwebb modified the milestones: 1.1.0.RC1, 1.1.0.M2, 1.1.0 May 26, 2014
@philwebb philwebb changed the title Restore XD compatibilty Ensure XD compatibilty with 1.1.0 Jun 9, 2014
@philwebb philwebb changed the title Ensure XD compatibilty with 1.1.0 Ensure XD compatibilty Jun 9, 2014
@philwebb philwebb modified the milestones: 1.1.1, 1.1.0 Jun 9, 2014
@philwebb
Copy link
Member Author

philwebb commented Jun 9, 2014

Moving to 1.1.1

dsyer pushed a commit that referenced this issue Jun 10, 2014
When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847
dsyer pushed a commit that referenced this issue Jun 10, 2014
When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847
dsyer pushed a commit that referenced this issue Jun 10, 2014
When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847

Support for Jmx (and Integration) autconfig in parent contexts

When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847
dsyer pushed a commit that referenced this issue Jun 10, 2014
When there are parent contexts we already had a strategy for registering
the actuator endpoints, but not the regular JMX or Integration MBeans.
This chnage makes the autoconfigs for JMX aware of the parent context.

Also adds a sample with a parent context.

See gh-847
@philwebb philwebb modified the milestones: 1.1.2, 1.1.1 Jun 11, 2014
@philwebb philwebb changed the title Ensure XD compatibilty Check XD compatibilty Jun 12, 2014
@dsyer
Copy link
Member

dsyer commented Jun 17, 2014

XD built OK today against commit b646231 (pre 1.1.2).

@dsyer
Copy link
Member

dsyer commented Jun 23, 2014

Tested again with commit 542896b and added support in XD for the latest Boot plugin features: spring-attic/spring-xd#971

@philwebb philwebb modified the milestones: 1.1.3, 1.1.2, 1.1.4 Jun 24, 2014
@dsyer dsyer closed this as completed Jun 27, 2014
@dsyer dsyer reopened this Jun 27, 2014
@philwebb philwebb modified the milestones: 1.1.5, 1.1.4 Jul 8, 2014
@philwebb philwebb closed this as completed Aug 6, 2014
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

4 participants