Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
106048 posts
|
[ https://issues.apache.org/jira/browse/OFBIZ-8316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15756986#comment-15756986 ] Michael Brohl commented on OFBIZ-8316: -------------------------------------- [~caopengan], I tried your patch and found some issues: 1. the patch does not follow the suggested format described in https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices and contained a project name different from mine so it could not be applied automatically. 2. I have corrected the patch and changed a version dependency in SearchWorker. The patch is attached. I was not able to successfully run the tests, there seem to be a classloader issue, see stacktrace. Have you tested your patch against the lucene tests? {noformat} Exception in thread "DocumentIndexer_test-bW5S94ThgY_content" java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.codecs.PostingsFormat$Holder > Buildiat org.apache.lucene.codecs.PostingsFormat.forName(PostingsFormat.java:112) at org.apache.lucene.codecs.lucene62.Lucene62Codec.<init>(Lucene62Codec.java:167) at org.apache.lucene.codecs.lucene62.Lucene62Codec.<init>(Lucene62Codec.java:82) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang.Class.newInstance(Class.java:442) at org.apache.lucene.util.NamedSPILoader.reload(NamedSPILoader.java:72) at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:51) at org.apache.lucene.util.NamedSPILoader.<init>(NamedSPILoader.java:38) at org.apache.lucene.codecs.Codec$Holder.<clinit>(Codec.java:47) at org.apache.lucene.codecs.Codec.getDefault(Codec.java:143) at org.apache.lucene.index.LiveIndexWriterConfig.<init>(LiveIndexWriterConfig.java:115) at org.apache.lucene.index.IndexWriterConfig.<init>(IndexWriterConfig.java:149) at org.apache.ofbiz.content.search.DocumentIndexer.run(DocumentIndexer.java:103) 2016-12-17 13:03:45,528 |main |TestRunContainer |W| [JUNIT (error)] - testSearchTermHand : java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.codecs.Codec$Holder java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.codecs.Codec$Holder at org.apache.lucene.codecs.Codec.forName(Codec.java:116) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:417) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:349) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:284) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:57) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:54) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:685) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:77) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63) ~[lucene-core-6.2.1.jar:6.2.1 43ab70147eb494324a1410f7a9f16a896a59bc6f - shalin - 2016-09-15 05:15:20] at org.apache.ofbiz.content.test.LuceneTests.testSearchTermHand(LuceneTests.java:74) ~[ofbiz.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_45] at junit.framework.TestCase.runTest(TestCase.java:168) ~[junit-dep-4.10.jar:?] at junit.framework.TestCase.runBare(TestCase.java:134) ~[junit-dep-4.10.jar:?] at junit.framework.TestResult$1.protect(TestResult.java:110) ~[junit-dep-4.10.jar:?] at junit.framework.TestResult.runProtected(TestResult.java:128) [junit-dep-4.10.jar:?] at junit.framework.TestResult.run(TestResult.java:113) [junit-dep-4.10.jar:?] at junit.framework.TestCase.run(TestCase.java:124) [junit-dep-4.10.jar:?] at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?] at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?] at junit.framework.TestSuite.runTest(TestSuite.java:243) [junit-dep-4.10.jar:?] at junit.framework.TestSuite.run(TestSuite.java:238) [junit-dep-4.10.jar:?] at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:152) [ofbiz.jar:?] at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148) [ofbiz.jar:?] at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73) [ofbiz.jar:?] at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202) [ofbiz.jar:?] at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69) [ofbiz.jar:?] at org.apache.ofbiz.base.start.Start.main(Start.java:84) [ofbiz.jar:?] 2016-12-17 13:03:45,541 |main |TestRunContainer |I| [JUNIT] : testSearchTermHand finished. 2016-12-17 13:03:45,541 |main |GenericDelegator |I| Rolling back 0 entity operations 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] Results for test suite: lucenetests 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] Pass: false | # Tests: 1 | # Failed: 0 # Errors: 1 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] ----------------------------- ERRORS ----------------------------- [JUNIT] 2016-12-17 13:03:45,543 |main |TestRunContainer |I| --> testSearchTermHand(org.apache.ofbiz.content.test.LuceneTests): Could not initialize class org.apache.lucene.codecs.Codec$Holder 2016-12-17 13:03:45,543 |main |TestRunContainer |I| java.lang.NoClassDefFoundError: Could not initialize class org.apache.lucene.codecs.Codec$Holder at org.apache.lucene.codecs.Codec.forName(Codec.java:116) at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:417) at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:349) at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:284) at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:57) at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:54) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:685) at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:77) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63) at org.apache.ofbiz.content.test.LuceneTests.testSearchTermHand(LuceneTests.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:152) at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148) at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73) at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202) at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69) at org.apache.ofbiz.base.start.Start.main(Start.java:84) 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] ------------------------------------------------------------------ [JUNIT] 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] ---------------------------- FAILURES ---------------------------- [JUNIT] 2016-12-17 13:03:45,543 |main |TestRunContainer |I| None 2016-12-17 13:03:45,543 |main |TestRunContainer |I| [JUNIT] ------------------------------------------------------------------ [JUNIT] org.apache.ofbiz.base.start.StartupException: Cannot start() org.apache.ofbiz.testtools.TestRunContainer (Test run was unsuccessful) at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:150) at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:73) at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202) at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69) at org.apache.ofbiz.base.start.Start.main(Start.java:84) Caused by: org.apache.ofbiz.base.container.ContainerException: Test run was unsuccessful at org.apache.ofbiz.testtools.TestRunContainer.start(TestRunContainer.java:199) at org.apache.ofbiz.base.container.ContainerLoader.startLoadedContainers(ContainerLoader.java:148) ... 4 more :ofbiz --test component=lucene --test case=lucene-tests FAILED Trying to override old definition of datatype junitreport [ant:junitreport] the file /Users/mbrohl/Projects/apache-ofbiz/trunk/ofbiz/runtime/logs/test-results/TESTS-TestSuites.xml is not a valid testsuite XML document {noformat} > Update Apache Solr/Lucene to release 6.2.1 > ------------------------------------------ > > Key: OFBIZ-8316 > URL: https://issues.apache.org/jira/browse/OFBIZ-8316 > Project: OFBiz > Issue Type: Improvement > Components: specialpurpose/lucene, specialpurpose/solr > Affects Versions: Trunk > Reporter: Michael Brohl > Assignee: Michael Brohl > Priority: Minor > Attachments: OFBIZ-8316_corrected.patch, ofbiz-truck-lucene-6.2.1.patch, ofbiz-truck-solr-6.2.1.patch > > > According to the announcements in https://lists.apache.org/thread.html/5d2cb1ecbe04c6c40b8eeba3b7f8da586d1271af98c9b07ceee8ada2@%3Cannounce.apache.org%3E and https://lists.apache.org/thread.html/c1269b52229f6bce68399e813b7c6b79eb3f6283ae21bde11c82fc7c@%3Cannounce.apache.org%3E there is a new Solr/Lucene release available. > This issue takes care of the update. ... [show rest of quote] -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |