phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chang Chao <charleschung...@gmail.com>
Subject NoClassDefFoundError :...regionserver/ConstantSizeRegionSplitPolicy
Date Thu, 20 Nov 2014 04:06:06 GMT
Hi,All

I am facing the NoClassDefFoundError of
org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy class
problem in my junit executions under cdh5.2.1 + phoenix 4.1.0 env,

What I did is that I wrote a junit method rule,in the rule,a
datasource(phoenix on hbase) is retrieved through spring config,
the following exception happend when the connection is being created from
datasource.

Here is the stacktrace.java.lang.NoClassDefFoundError:
org/apache/hadoop/hbase/regionserver/ConstantSizeRegionSplitPolicy
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
     at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     at
org.apache.phoenix.query.QueryConstants.<clinit>(QueryConstants.java:171)
     at
org.apache.phoenix.jdbc.PhoenixStatement.<clinit>(PhoenixStatement.java:317)
     at
org.apache.phoenix.jdbc.PhoenixConnection.createStatement(PhoenixConnection.java:440)
     at
org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1522)
     at
org.apache.phoenix.query.ConnectionQueryServicesImpl$9.call(ConnectionQueryServicesImpl.java:1491)
     at
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
     at
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1491)
     at
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
     at
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:126)
     at
org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
     at java.sql.DriverManager.getConnection(DriverManager.java:664)
     at java.sql.DriverManager.getConnection(DriverManager.java:208)
     at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153)
     at
org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144)
     at
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:155)
     at
org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:120)
     at
myProjectPackage.junit.BaseRdbTestRule.loadInputDataToRdb(BaseRdbTestRule.java:114)
     at
myProjectPackage.junit.BaseRdbTestRule.prepareRdbData(BaseRdbTestRule.java:295)
     at
myProjectPackage.junit.SingleDataSourceRdbTestRule$1.evaluate(SingleDataSourceRdbTestRule.java:43)
     at
myProjectPackage.junit.YamlLoadInputDataRule$1.evaluate(YamlLoadInputDataRule.java:71)
     at org.junit.rules.RunRules.evaluate(RunRules.java:20)
     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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
     at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
     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:459)
     at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
     at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
     at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy
     at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     ... 50 more

Thanks.
chang

Mime
View raw message