[jira] [Comment Edited] (OAK-3470) Utils.estimateMemoryUsage has a NoClassDefFoundError when Mongo is not being used
[ https://issues.apache.org/jira/browse/OAK-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064734#comment-15064734 ] Rajesh P edited comment on OAK-3470 at 12/18/15 8:47 PM: - your RDBDocumentStore is not initialized. if you change your code to below then it works : JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:mem:oak;DB_CLOSE_DELAY=-1"); ds.setUser("sa"); ds.setPassword("sa"); // Build the OAK Repository Instance RDBDocumentStore rdbDocumentStore=null; try { DocumentMK.Builder builder = new DocumentMK.Builder(); // Build the OAK Repository Instance rdbDocumentStore = new RDBDocumentStore(ds,builder); } finally { if (rdbDocumentStore != null) { rdbDocumentStore.dispose(); } } was (Author: rajeshp): your RDBDocumentStore is not initialized. if you change your code to below then it works : JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:tcp://localhost/~/oak;DB_CLOSE_DELAY=-1"); ds.setUser("sa"); ds.setPassword("sa"); // Build the OAK Repository Instance RDBDocumentStore rdbDocumentStore=null; try { DocumentMK.Builder builder = new DocumentMK.Builder(); // Build the OAK Repository Instance rdbDocumentStore = new RDBDocumentStore(ds,builder); } finally { if (rdbDocumentStore != null) { rdbDocumentStore.dispose(); } } > Utils.estimateMemoryUsage has a NoClassDefFoundError when Mongo is not being > used > - > > Key: OAK-3470 > URL: https://issues.apache.org/jira/browse/OAK-3470 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.2.6, 1.3.7 >Reporter: Jegadisan Sankar Kumar >Priority: Minor > > When create a repository without Mongo and just a RDBMS DocumentNodeStore, a > NoClassDefFoundError is encountered. > {code} > Exception in thread "main" java.lang.NoClassDefFoundError: > com/mongodb/BasicDBObject > at > org.apache.jackrabbit.oak.plugins.document.util.Utils.estimateMemoryUsage(Utils.java:160) > at > org.apache.jackrabbit.oak.plugins.document.Document.getMemory(Document.java:167) > at > org.apache.jackrabbit.oak.cache.EmpiricalWeigher.weigh(EmpiricalWeigher.java:33) > at > org.apache.jackrabbit.oak.cache.EmpiricalWeigher.weigh(EmpiricalWeigher.java:27) > at > com.google.common.cache.LocalCache$Segment.setValue(LocalCache.java:2158) > at > com.google.common.cache.LocalCache$Segment.storeLoadedValue(LocalCache.java:3140) > at > com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2349) > at > com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316) > at > com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278) > at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193) > at com.google.common.cache.LocalCache.get(LocalCache.java:3932) > at > com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.readDocumentCached(RDBDocumentStore.java:762) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:222) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:217) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.(DocumentNodeStore.java:448) > at > org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getNodeStore(DocumentMK.java:671) > {code} > The dependencies in pom.xml are as follows > {code:xml} > > > org.apache.jackrabbit > oak-jcr > 1.2.6 > > > com.h2database > h2 > 1.4.189 > > > ch.qos.logback > logback-classic > 1.1.3 > > > {code} > And the code to recreate the issue > {code:java} > // Build the Data Source to be used. > JdbcDataSource ds = new JdbcDataSource(); > ds.setURL("jdbc:h2:mem:oak;DB_CLOSE_DELAY=-1"); > ds.setUser("sa"); > ds.setPassword("sa"); > // Build the OAK Repository Instance > DocumentNodeStore ns = null; > try { > ns = new DocumentMK.Builder() > .setRDBConnection(ds) > .getNodeStore(); > } finally { > if (ns != null) { > ns.dispose(); > } >
[jira] [Commented] (OAK-3470) Utils.estimateMemoryUsage has a NoClassDefFoundError when Mongo is not being used
[ https://issues.apache.org/jira/browse/OAK-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064734#comment-15064734 ] Rajesh P commented on OAK-3470: --- your RDBDocumentStore is not initialized. if you change your code to below then it works : JdbcDataSource ds = new JdbcDataSource(); ds.setURL("jdbc:h2:tcp://localhost/~/oak;DB_CLOSE_DELAY=-1"); ds.setUser("sa"); ds.setPassword("sa"); // Build the OAK Repository Instance RDBDocumentStore rdbDocumentStore=null; try { DocumentMK.Builder builder = new DocumentMK.Builder(); // Build the OAK Repository Instance rdbDocumentStore = new RDBDocumentStore(ds,builder); } finally { if (rdbDocumentStore != null) { rdbDocumentStore.dispose(); } } > Utils.estimateMemoryUsage has a NoClassDefFoundError when Mongo is not being > used > - > > Key: OAK-3470 > URL: https://issues.apache.org/jira/browse/OAK-3470 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.2.6, 1.3.7 >Reporter: Jegadisan Sankar Kumar >Priority: Minor > > When create a repository without Mongo and just a RDBMS DocumentNodeStore, a > NoClassDefFoundError is encountered. > {code} > Exception in thread "main" java.lang.NoClassDefFoundError: > com/mongodb/BasicDBObject > at > org.apache.jackrabbit.oak.plugins.document.util.Utils.estimateMemoryUsage(Utils.java:160) > at > org.apache.jackrabbit.oak.plugins.document.Document.getMemory(Document.java:167) > at > org.apache.jackrabbit.oak.cache.EmpiricalWeigher.weigh(EmpiricalWeigher.java:33) > at > org.apache.jackrabbit.oak.cache.EmpiricalWeigher.weigh(EmpiricalWeigher.java:27) > at > com.google.common.cache.LocalCache$Segment.setValue(LocalCache.java:2158) > at > com.google.common.cache.LocalCache$Segment.storeLoadedValue(LocalCache.java:3140) > at > com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2349) > at > com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2316) > at > com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278) > at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193) > at com.google.common.cache.LocalCache.get(LocalCache.java:3932) > at > com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.readDocumentCached(RDBDocumentStore.java:762) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:222) > at > org.apache.jackrabbit.oak.plugins.document.rdb.RDBDocumentStore.find(RDBDocumentStore.java:217) > at > org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.(DocumentNodeStore.java:448) > at > org.apache.jackrabbit.oak.plugins.document.DocumentMK$Builder.getNodeStore(DocumentMK.java:671) > {code} > The dependencies in pom.xml are as follows > {code:xml} > > > org.apache.jackrabbit > oak-jcr > 1.2.6 > > > com.h2database > h2 > 1.4.189 > > > ch.qos.logback > logback-classic > 1.1.3 > > > {code} > And the code to recreate the issue > {code:java} > // Build the Data Source to be used. > JdbcDataSource ds = new JdbcDataSource(); > ds.setURL("jdbc:h2:mem:oak;DB_CLOSE_DELAY=-1"); > ds.setUser("sa"); > ds.setPassword("sa"); > // Build the OAK Repository Instance > DocumentNodeStore ns = null; > try { > ns = new DocumentMK.Builder() > .setRDBConnection(ds) > .getNodeStore(); > } finally { > if (ns != null) { > ns.dispose(); > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OAK-3658) Test failures: JackrabbitNodeTest#testRename and testRenameEventHandling
[ https://issues.apache.org/jira/browse/OAK-3658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064412#comment-15064412 ] Rajesh P commented on OAK-3658: --- I enabled the tests again and all tests are passing for me now. Is it dependent on anything else? > Test failures: JackrabbitNodeTest#testRename and testRenameEventHandling > > > Key: OAK-3658 > URL: https://issues.apache.org/jira/browse/OAK-3658 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr >Reporter: Amit Jain >Priority: Minor > Fix For: 1.3.13 > > > Tests fail regularly on trunk - {{JackrabbitNodeTest#testRename}} and > {{JackrabbitNodeTest#testRenameEventHandling}}. > {noformat} > Test set: org.apache.jackrabbit.oak.jcr.JackrabbitNodeTest > --- > Tests run: 8, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 0.106 sec <<< > FAILURE! > testRenameEventHandling(org.apache.jackrabbit.oak.jcr.JackrabbitNodeTest) > Time elapsed: 0.01 sec <<< ERROR! > javax.jcr.nodetype.ConstraintViolationException: Item is protected. > at > org.apache.jackrabbit.oak.jcr.session.ItemImpl$ItemWriteOperation.checkPreconditions(ItemImpl.java:98) > at > org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:614) > at > org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:270) > at > org.apache.jackrabbit.oak.jcr.session.NodeImpl.rename(NodeImpl.java:1485) > at > org.apache.jackrabbit.oak.jcr.JackrabbitNodeTest.testRenameEventHandling(JackrabbitNodeTest.java:124) > 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 junit.framework.TestCase.runTest(TestCase.java:176) > at junit.framework.TestCase.runBare(TestCase.java:141) > at junit.framework.TestResult$1.protect(TestResult.java:122) > at junit.framework.TestResult.runProtected(TestResult.java:142) > at junit.framework.TestResult.run(TestResult.java:125) > at junit.framework.TestCase.run(TestCase.java:129) > at > org.apache.jackrabbit.test.AbstractJCRTest.run(AbstractJCRTest.java:464) > at junit.framework.TestSuite.runTest(TestSuite.java:252) > at junit.framework.TestSuite.run(TestSuite.java:247) > at > org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) > 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) > at > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) > at > org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) > testRename(org.apache.jackrabbit.oak.jcr.JackrabbitNodeTest) Time elapsed: > 0.007 sec <<< FAILURE! > junit.framework.ComparisonFailure: expected:<[a]> but was:<[rep:policy]> > at junit.framework.Assert.assertEquals(Assert.java:100) > at junit.framework.Assert.assertEquals(Assert.java:107) > at junit.framework.TestCase.assertEquals(TestCase.java:269) > at > org.apache.jackrabbit.oak.jcr.JackrabbitNodeTest.testRename(JackrabbitNodeTest.java:74) > 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 junit.framework.TestCase.runTest(TestCase.java:176) > at junit.framework.TestCase.runBare(TestCase.java:141) > at junit.framework.TestResult$1.protect(TestResult.j