You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "XiaoXiang Yu (JIRA)" <ji...@apache.org> on 2019/01/21 16:12:00 UTC
[jira] [Comment Edited] (KYLIN-3773) Using Mysql instead of Hive as
Data Source fails with LinkageError
[ https://issues.apache.org/jira/browse/KYLIN-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16748053#comment-16748053 ]
XiaoXiang Yu edited comment on KYLIN-3773 at 1/21/19 4:11 PM:
--------------------------------------------------------------
Data Source SDK is divided for two part, first part is framework-related code block, second part is concrete adaptor related code block. These two part are packaged into two jars XXX-lib.jar and XXX-framework.jar. This could be check by pom.xml under folder datasourcesdk.
The XXX-framework.jar should be packaged into kylin.war, so the class of framework should be loaded using WebApplicationClassLoader of Apache Tomcat. The XXX-lib.jar should be located in folder lib under KYLIN_HOME, so the class of concrete adaptor are loaded by ApplicationClassLoader(provided by JDK).
The question is that the framework-jar is missing in kylin.war, so the WebApplicationClassLoader delegate the class load task to its parent classloader, the ApplicationClassLoader, so trigger that error.
!image-2019-01-21-23-56-26-324.png!
was (Author: hit_lacus):
Data Source SDK is divided for two part, first part is framework-related code block, second part is concrete adaptor related code block. These two part are packaged into two jars XXX-lib.jar and XXX-framework.jar.
The XXX-framework.jar should be packaged into kylin.war, so the class of framework should be loaded using WebApplicationClassLoader of Apache Tomcat. The XXX-lib.jar should be located in folder lib under KYLIN_HOME, so the class of concrete adaptor are loaded by ApplicationClassLoader(provided by JDK).
!image-2019-01-21-23-56-26-324.png!
> Using Mysql instead of Hive as Data Source fails with LinkageError
> ------------------------------------------------------------------
>
> Key: KYLIN-3773
> URL: https://issues.apache.org/jira/browse/KYLIN-3773
> Project: Kylin
> Issue Type: Bug
> Components: RDBMS Source
> Affects Versions: v2.6.0
> Reporter: Hubert STEFANI
> Assignee: youcheng.zhang
> Priority: Critical
> Fix For: v2.6.1
>
> Attachments: image-2019-01-21-23-56-26-324.png
>
>
> we are currently trying to test the KYLIN-3552 feature to rely directly on Mysql for data source instead of Hive.
>
> (we tried as much as possible to add correct info in kylin.properties, add mysql jdbc drivers, create mysql.xml in ./conf/datasources ... as mentioned in [https://github.com/apache/kylin/pull/327/files] )
>
>
>
> the error we entountered is ( excerpt from kylin.log ) :
>
>
> 2019-01-14 09:48:16,223 WARN [http-bio-7070-exec-2] extensible.JdbcSource:50 : DataSource cannot be connected. This may not be required in a MapReduce job.
> java.lang.LinkageError: loader constraint violation: loader (instance of sun/misc/Launcher$AppClassLoader) previously initiated loading for a different type with name "org/apache/kylin/common/KylinConfig"
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
> at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at org.apache.kylin.sdk.datasource.framework.SourceConnectorFactory.getJdbcConnector(SourceConnectorFactory.java:27)
> with further trace :
> 2019-01-14 09:48:16,229 ERROR [http-bio-7070-exec-2] controller.TableController:197 :
> java.lang.NullPointerException
> at org.apache.kylin.source.jdbc.extensible.JdbcExplorer.listDatabases(JdbcExplorer.java:58)
> at org.apache.kylin.rest.service.TableService.getSourceDbNames(TableService.java:280)
> at org.apache.kylin.rest.controller.TableController.showHiveDatabases(TableController.java:195)
>
>
> the properties we use in kylin.properties are :
>
> # NOVAGEN -- CUSTOM CONFIGURATION FOR MYSQL AS SOURCE
> kylin.source.jdbc.connection-url=jdbc:mysql://ip-172-31-36-94.eu-west-1.compute.internal:3306/decat
> kylin.source.jdbc.driver=com.mysql.jdbc.Driver
> kylin.source.jdbc.dialect=mysql
> kylin.source.jdbc.user=root
> kylin.source.jdbc.pass=
> kylin.query.pushdown.runner-class-name=org.apache.kylin.query.pushdown.PushdownRunnerSDKImpl
> kylin.source.default=16
> kylin.source.jdbc.sqoop-home=/usr/bin
> kylin.source.jdbc.adaptor=org.apache.kylin.sdk.datasource.adaptor.MysqlAdaptor
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)