Github user jjmeyer0 commented on the issue:

    https://github.com/apache/incubator-metron/pull/316
  
    @merrimanr Today I decided to run through the documentation to see how it 
works out. When trying to run the spring boot app through the `start.sh` script 
using an h2 database I got the error below. I did had h2 to my classpath 
instead of mysql. 
    
    I did some investigating and it seems like this is an issue with having 
multiple versions of guava. I used the following code to print which dependency 
guava is coming from.
    
    ```
    
System.out.println(FluentIterable.class.getProtectionDomain().getCodeSource().getLocation().toExternalForm());
    ```
    
    It prints out the line below. It looks like it is getting the dependency 
from metron-statistics which uses version `12.0`. I believe spring needs 
`16.01`.
    
    `
    
jar:file:/home/choosetwo/workspace/incubator-metron/metron-interface/metron-rest/target/lib/metron-rest-0.3.0.jar!/BOOT-INF/lib/metron-statistics-0.3.0.jar!/
    `
    
    After manually adding guava version `16.01` to the end of the classpath in 
`start.sh` the error below goes away, and everything works just fine. I think 
we may need to clean up the dependencies in `metron-rest`'s pom file.
    
    ```
    2017-01-31T07:13:11.909 ERROR [org.springframework.boot.SpringApplication] 
- Application startup failed
    org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'requestMappingHandlerAdapter' defined in class path resource 
[org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]:
 Initialization of bean failed; nested exception is 
java.lang.NoSuchMethodError: 
com.google.common.collect.FluentIterable.toList()Lcom/google/common/collect/ImmutableList;
            at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
            at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
            at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
            at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
            at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
            at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
            at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:751)
            at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)
            at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)
            at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
            at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
            at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
            at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
            at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
            at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
            at 
org.apache.metron.rest.MetronRestApplication.main(MetronRestApplication.java:32)
            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.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
            at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
            at 
org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:525)
    Caused by: java.lang.NoSuchMethodError: 
com.google.common.collect.FluentIterable.toList()Lcom/google/common/collect/ImmutableList;
            at 
springfox.documentation.spring.web.ObjectMapperConfigurer.jackson2Converters(ObjectMapperConfigurer.java:76)
            at 
springfox.documentation.spring.web.ObjectMapperConfigurer.configureMessageConverters(ObjectMapperConfigurer.java:63)
            at 
springfox.documentation.spring.web.ObjectMapperConfigurer.postProcessBeforeInitialization(ObjectMapperConfigurer.java:47)
            at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
            at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
            at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
            ... 23 more
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to