[
https://issues.apache.org/jira/browse/HBASE-13889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14583768#comment-14583768
]
Dmitry Minkovsky commented on HBASE-13889:
------------------------------------------
So without a fat jar this happens:
{{noformat}}
$ mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ my-app ---
log4j:WARN No appenders could be found for logger
(org.apache.hadoop.metrics2.lib.MutableMetricsFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
info.
[WARNING] thread
Thread[com.mycompany.app.App.main(localhost:2181),5,com.mycompany.app.App] was
interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread
Thread[com.mycompany.app.App.main(localhost:2181),5,com.mycompany.app.App] will
linger despite being asked to die via interruption
[WARNING] NOTE: 1 thread(s) did not finish despite being asked to via
interruption. This is not a problem with exec:java, it is a problem with the
running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup
org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=com.mycompany.app.App,maxpri=10]
java.lang.IllegalThreadStateException
at java.lang.ThreadGroup.destroy(ThreadGroup.java:775)
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:328)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.660 s
[INFO] Finished at: 2015-06-12T13:49:09-04:00
[INFO] Final Memory: 15M/184M
[INFO] ------------------------------------------------------------------------
{{noformat}}
HBase logs:
{{noformat}}
2015-06-12 13:48:54,038 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxnFactory: Accepted socket connection from /127.0.0.1:55118
2015-06-12 13:48:54,046 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.ZooKeeperServer: Client attempting to establish new session at
/127.0.0.1:55118
2015-06-12 13:48:54,047 INFO [SyncThread:0] server.ZooKeeperServer:
Established session 0x14de8e2dc900007 with negotiated timeout 40000 for client
/127.0.0.1:55118
2015-06-12 13:49:04,066 WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxn: caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid
0x14de8e2dc900007, likely client has closed socket
at
org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
at
org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
at java.lang.Thread.run(Thread.java:745)
2015-06-12 13:49:04,068 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:55118
which had sessionid 0x14de8e2dc900007
2015-06-12 13:49:04,520 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxnFactory: Accepted socket connection from
/0:0:0:0:0:0:0:1:55120
2015-06-12 13:49:04,521 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.ZooKeeperServer: Client attempting to renew session 0x14de8e2dc900007 at
/0:0:0:0:0:0:0:1:55120
2015-06-12 13:49:04,522 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.ZooKeeperServer: Established session 0x14de8e2dc900007 with negotiated
timeout 40000 for client /0:0:0:0:0:0:0:1:55120
2015-06-12 13:49:10,018 WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxn: caught end of stream exception
EndOfStreamException: Unable to read additional data from client sessionid
0x14de8e2dc900007, likely client has closed socket
at
org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228)
at
org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:208)
at java.lang.Thread.run(Thread.java:745)
2015-06-12 13:49:10,019 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181]
server.NIOServerCnxn: Closed socket connection for client
/0:0:0:0:0:0:0:1:55120 which had sessionid 0x14de8e2dc900007
2015-06-12 13:49:46,005 INFO [SessionTracker] server.ZooKeeperServer: Expiring
session 0x14de8e2dc900007, timeout of 40000ms exceeded
2015-06-12 13:49:46,005 INFO [ProcessThread(sid:0 cport:-1):]
server.PrepRequestProcessor: Processed session termination for sessionid:
0x14de8e2dc900007
{{noformat}}
> hbase-shaded-client artifact is missing dependency (therefore, does not work)
> -----------------------------------------------------------------------------
>
> Key: HBASE-13889
> URL: https://issues.apache.org/jira/browse/HBASE-13889
> Project: HBase
> Issue Type: Bug
> Components: Client
> Affects Versions: 1.1.0, 1.1.0.1
> Environment: N/A?
> Reporter: Dmitry Minkovsky
> Priority: Blocker
> Fix For: 2.0.0, 1.2.0, 1.1.1
>
> Attachments: Screen Shot 2015-06-11 at 10.59.55 AM.png
>
>
> The {{hbase-shaded-client}} artifact was introduced in
> [HBASE-13517|https://issues.apache.org/jira/browse/HBASE-13517]. Thank you
> very much for this, as I am new to Java building and was having a very
> slow-moving time resolving conflicts. However, the shaded client artifact
> seems to be missing {{javax.xml.transform.TransformerException}}. I examined
> the JAR, which does not have this package/class.
> Steps to reproduce:
> Java:
> {code}
> package com.mycompany.app;
>
>
>
>
>
> import org.apache.hadoop.conf.Configuration;
>
>
> import org.apache.hadoop.hbase.HBaseConfiguration;
>
>
> import org.apache.hadoop.hbase.client.Connection;
>
>
> import org.apache.hadoop.hbase.client.ConnectionFactory;
>
>
>
>
>
> public class App {
>
>
> public static void main( String[] args ) throws java.io.IOException {
>
>
>
> Configuration config = HBaseConfiguration.create();
>
>
> Connection connection = ConnectionFactory.createConnection(config);
>
>
> }
>
>
> }
> {code}
> POM:
> {code}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>
> <modelVersion>4.0.0</modelVersion>
>
>
>
>
>
> <groupId>com.mycompany.app</groupId>
>
>
> <artifactId>my-app</artifactId>
>
>
> <version>1.0-SNAPSHOT</version>
>
>
> <packaging>jar</packaging>
>
>
>
>
>
> <name>my-app</name>
>
>
> <url>http://maven.apache.org</url>
>
>
>
>
>
> <properties>
>
>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>
>
> </properties>
>
>
>
>
>
> <dependencies>
>
>
> <dependency>
>
>
> <groupId>junit</groupId>
>
>
> <artifactId>junit</artifactId>
>
>
> <version>3.8.1</version>
>
>
> <scope>test</scope>
>
>
> </dependency>
>
>
> <dependency>
>
>
> <groupId>org.apache.hbase</groupId>
>
>
> <artifactId>hbase-shaded-client</artifactId>
>
>
> <version>1.1.0</version>
>
>
> </dependency>
>
>
> </dependencies>
>
>
> </project>
> {code}
> Run:
> {noformat}
> $ mvn exec:java -Dexec.mainClass="com.mycompany.app.App"
> [INFO] Scanning for projects...
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building my-app 1.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ my-app ---
> [WARNING]
> java.lang.reflect.InvocationTargetException
> 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.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoClassDefFoundError:
> org/apache/hadoop/hbase/shaded/javax/xml/transform/TransformerException
> at com.mycompany.app.App.main(App.java:17)
> ... 6 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.hbase.shaded.javax.xml.transform.TransformerException
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> ... 7 more
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.388 s
> [INFO] Finished at: 2015-06-11T13:23:21-04:00
> [INFO] Final Memory: 10M/111M
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)