atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bogdan Sava <bogdan-mihail.s...@ing.com>
Subject Re: Review Request 67083: ATLAS-2665 - Add OMAG-API in Atlas
Date Mon, 14 May 2018 18:59:00 GMT


> On May 14, 2018, 9:59 a.m., David Radley wrote:
> > omrs/pom.xml
> > Line 42 (original)
> > <https://reviews.apache.org/r/67083/diff/1/?file=2019885#file2019885line42>
> >
> >     I applied the fix and build atlas using :
> >     mvn clean -DskipTests install -Pdist,embedded-hbase-solr
> >     
> >     Atlas startup gives Exception
> >     2018-05-14 10:50:04,477 INFO  - [main:] ~ GraphTransaction intercept for org.apache.atlas.glossary.GlossaryService.getTerm
(GraphTransactionAdvisor$1:41)
> >     2018-05-14 10:50:04,478 INFO  - [main:] ~ GraphTransaction intercept for org.apache.atlas.glossary.GlossaryService.getCategory
(GraphTransactionAdvisor$1:41)
> >     2018-05-14 10:50:04,497 INFO  - [main:] ~ Starting service org.apache.atlas.web.service.ActiveInstanceElectorService
(Services:65)
> >     2018-05-14 10:50:04,497 INFO  - [main:] ~ HA is not enabled, no need to start
leader election service (ActiveInstanceElectorService:96)
> >     2018-05-14 10:50:04,497 INFO  - [main:] ~ Starting service org.apache.atlas.kafka.EmbeddedKafkaServer
(Services:65)
> >     2018-05-14 10:50:04,497 INFO  - [main:] ~ ==> EmbeddedKafkaServer.start(isEmbedded=true)
(EmbeddedKafkaServer:76)
> >     2018-05-14 10:50:04,497 INFO  - [main:] ~ Starting zookeeper at localhost:9026
(EmbeddedKafkaServer:110)
> >     2018-05-14 10:50:04,500 WARN  - [main:] ~ unavailable (ContextHandler$Context:2177)
> >     org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'services': Invocation of init method failed; nested exception is java.lang.RuntimeException:
org.apache.atlas.AtlasException: Failed to start embedded kafka
> >             at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
> >             at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
> >             at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
> >             at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
> >             at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
> >             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:761)
> >             at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
> >             at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
> >             at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
> >             at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
> >             at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
> >             at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
> >             at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
> >             at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:138)
> >             at javax.servlet.GenericServlet.init(GenericServlet.java:244)
> >             at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:640)
> >             at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:419)
> >             at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:892)
> >             at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
> >             at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)
> >             at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)
> >             at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
> >             at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
> >             at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)
> >             at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
> >             at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)

The issue is that DispatcherServlet creates its own spring context which is child context
of root one.
Configuration for this child context was applicationContext.xml which scans all the classes,
and the bean "services" tries to initialize zookeeper and kafka again.

The fis is that I created another context configuration for DispatcherServlet called openMetadataContext.xml.
This context scanes only the packages:
org.apahe.atlas.omag
org.apahe.atlas.omas
org.apahe.atlas.omrs
org.apahe.atlas.ocf

patch available


- Bogdan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67083/#review202999
-----------------------------------------------------------


On May 14, 2018, 1:12 p.m., Bogdan Sava wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67083/
> -----------------------------------------------------------
> 
> (Updated May 14, 2018, 1:12 p.m.)
> 
> 
> Review request for atlas, Daniela Otelea, David Radley, Graham Wallis, Mandy Chessell,
and Ruxandra Rosu.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Create configuration for OMAG API in Atlas
> 
> 
> Diffs
> -----
> 
>   om-fwk-ocf/pom.xml 8b1cefd 
>   omag-api/pom.xml 2338286 
>   omag-api/src/main/java/org/apache/atlas/omag/admin/OMAGServerAdministration.java dd19018

>   omag-api/src/main/java/org/apache/atlas/omag/admin/OMAGServerCategory.java PRE-CREATION

>   omag-api/src/main/java/org/apache/atlas/omag/admin/server/OMAGServerAdminRESTServices.java
PRE-CREATION 
>   omag-api/src/main/java/org/apache/atlas/omag/admin/server/OMAGServerAdminResource.java
ebc9f2a 
>   omag-server/src/main/java/org/apache/atlas/omag/application/AssetConsumerOMASResource.java
PRE-CREATION 
>   omag-server/src/main/java/org/apache/atlas/omag/application/ConnectedAssetOMASResource.java
PRE-CREATION 
>   omag-server/src/main/java/org/apache/atlas/omag/application/OMAGApplication.java 88397de

>   omag-server/src/main/java/org/apache/atlas/omag/application/OMAGServerAdminResource.java
PRE-CREATION 
>   omag-server/src/main/java/org/apache/atlas/omag/application/OMRSRepositoryResource.java
PRE-CREATION 
>   omag-server/src/main/resources/application.properties PRE-CREATION 
>   omas-assetconsumer/pom.xml 29935e7 
>   omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/client/AssetConsumer.java
80a98f5 
>   omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/publisher/AssetConsumerPublisher.java
 
>   omas-assetconsumer/src/main/java/org/apache/atlas/omas/assetconsumer/server/AssetConsumerRESTServices.java
967be5a 
>   omas-connectedasset/README.md 2f431df 
>   omas-connectedasset/pom.xml 219c972 
>   omas-connectedasset/src/main/java/org/apache/atlas/omas/connectedasset/server/ConnectedAssetRESTServices.java
8ae6c37 
>   omrs/pom.xml 50b9898 
>   omrs/src/main/java/org/apache/atlas/omrs/admin/OMRSConfigurationFactory.java 7ae87c6

>   omrs/src/main/java/org/apache/atlas/omrs/rest/server/OMRSRepositoryRESTServices.java
5948482 
>   omrs/src/test/java/org/apache/atlas/omrs/archivemanager/opentypes/TestOpenMetadataTypesArchive.java
3f85317 
>   omrs/src/test/java/org/apache/atlas/omrs/archivemanager/store/TestOMRSArchiveBuilder.java
ccf0de6 
>   webapp/src/main/webapp/WEB-INF/applicationContext.xml 2ecd8d1 
>   webapp/src/main/webapp/WEB-INF/web.xml 23dc063 
> 
> 
> Diff: https://reviews.apache.org/r/67083/diff/1/
> 
> 
> Testing
> -------
> 
> Create configuration for OMAG API in Atlas using Spring MVC Dispatcher servlet.
> 
> 
> Change base URL for the API to "/open-metadata/access-services" 
> 
> 
> Clean maven unused dependenies
> 
> 
> File Attachments
> ----------------
> 
> Added apache licence to a properties file
>   https://reviews.apache.org/media/uploaded/files/2018/05/11/77fbc4f6-b16a-42f9-983c-261f70f3ca9f__0002-ATLAS-2665-Added-apache-licence-to-properties-file.patch
> 0003-ATLAS-2665-comments-fixed.patch
>   https://reviews.apache.org/media/uploaded/files/2018/05/11/004f018b-1ee5-4da1-91d4-b50f4913298d__0003-ATLAS-2665-comments-fixed.patch
> 
> 
> Thanks,
> 
> Bogdan Sava
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message