GithubHelp home page GithubHelp logo

Testing issues about cermine HOT 11 CLOSED

ydu-sci avatar ydu-sci commented on June 13, 2024 1
Testing issues

from cermine.

Comments (11)

dtkaczyk avatar dtkaczyk commented on June 13, 2024

Hi @ydu-sci thanks for reporting this.

About README and using the project: I've rewritten the README, hopefully it is more clear now. Try to use it again and if anything is still unclear, please explain in more detail which part is confusing. I will gladly clarify.

About Javadoc errors: I corrected the errors and warnings, it shouldn't happen again.

About test errors: Which Java and Maven versions do you use?

About building the project in general: In short, you don't need to build the project yourself to use it (more on this in the current README), unless you wish to make some changes in CERMINE code. Is that the case?

from cermine.

ydu-sci avatar ydu-sci commented on June 13, 2024

Hi @dtkaczyk , Sorry for my late reply.

java -version

java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

mvn -version

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00)
Maven home: /home/software/apache-maven-3.3.9
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: /home/software/jdk1.8.0_111/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "2.6.32-358.el6.x86_64", arch: "amd64", family: "unix"

Hope your project will be better with the extensive test from the world.

Yu

from cermine.

dtkaczyk avatar dtkaczyk commented on June 13, 2024

@ydu-sci In general, the code was written and tested using Java 7. It seems that indeed there was some ambiguity in the output produced by CERMINE, which caused problems with the tests in Java 8 (the affiliations in the resulting JATS file could be in any order). I corrected this, and it seems to work with both Java 7 and Java 8 now (I tested it using a simple "mvn clean install" command). You can try to test the newest code again and we will see if it works.

What about other issues? As I mentioned, if you wish to use CERMINE as a standalone application, you shouldn't have to compile the code and build the project yourself, it should be enough to use the JAR file downloaded from the repository (more details in the README). Please let me know if you still have problems with this approach.

from cermine.

ydu-sci avatar ydu-sci commented on June 13, 2024

Unzip the newest CERMINE and run mvn clean install in the folder, I get the same test failure as before:

Results :

Failed tests: metadataExtractionTest(pl.edu.icm.cermine.AltPdfNLMMetadataExtractorTest)
metadataExtractionTest(pl.edu.icm.cermine.bibref.KMeansBibReferenceExtractorTest): expected:<...98, 186:528-33.(..)
testAddFeatures(pl.edu.icm.cermine.metadata.affiliation.features.AffiliationDictionaryFeatureTest): Token: 18 W expected:<1> but was:<0>
getBxDocumentTest(pl.edu.icm.cermine.ContentExtractorTest)
getBxDocumentWithGeneralLabelsTest(pl.edu.icm.cermine.ContentExtractorTest)
getBxDocumentWithSpecificLabelsTest(pl.edu.icm.cermine.ContentExtractorTest)
textRawFullTextTest(pl.edu.icm.cermine.ContentExtractorTest): expected:<...nnerhagen(..)
getFullTextWithLabelsTest(pl.edu.icm.cermine.ContentExtractorTest)
getNLMBodyTest(pl.edu.icm.cermine.ContentExtractorTest)
getNLMReferencesTest(pl.edu.icm.cermine.ContentExtractorTest)
getNLMContentTest(pl.edu.icm.cermine.ContentExtractorTest)

Tests run: 118, Failures: 11, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] CERMINE Content Extractor and Miner ................ SUCCESS [ 5.290 s]
[INFO] CERMINE Engine Implementation - 1.12-SNAPSHOT ...... FAILURE [01:56 min]
[INFO] CERMINE Tools - 1.12-SNAPSHOT ...................... SKIPPED
[INFO] CERMINE Web Interface - 1.12-SNAPSHOT .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:01 min
[INFO] Finished at: 2016-12-26T09:47:13+08:00
[INFO] Final Memory: 39M/339M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project cermine-impl: There are test failures.
[ERROR]
[ERROR] Please refer to /home/src/CERMINE-master/cermine-impl/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :cermine-impl

from cermine.

dtkaczyk avatar dtkaczyk commented on June 13, 2024

@ydu-sci unfortunately, so far I wasn't able to reproduce these problems. I prepared a separate branch, where I added code for keeping the test data in a bunch of files for later debugging. It would be great if you could execute it in your environment and share the results.

More specifically, could you download the code from the new branch, try to build it again and send back the contents of two directories: cermine-impl/target/surefire-reports and cermine-impl/testdump? If you zip them, you should be able to attach them here. I hope this will give me more information on what might be the problem.

from cermine.

ydu-sci avatar ydu-sci commented on June 13, 2024

Thanks for your reply.
I downloaded the new test branch, mvn clean install and test failed like before.
The wanted zip files will be uploaded later on, because currently Github can't accept my zip files.

from cermine.

ydu-sci avatar ydu-sci commented on June 13, 2024

What is your email address?
The means Github gives to workaround is hard for me. I hope to send the wanted file to your email.

from cermine.

ydu-sci avatar ydu-sci commented on June 13, 2024

Thanks for the persistent work of @dtkaczyk
I got your email yesterday and finally the successful test is done.

[INFO] Reactor Summary:
[INFO]
[INFO] CERMINE Content Extractor and Miner ................ SUCCESS [ 1.162 s]
[INFO] CERMINE Engine Implementation - 1.12-SNAPSHOT ...... SUCCESS [02:23 min]
[INFO] CERMINE Tools - 1.12-SNAPSHOT ...................... SUCCESS [ 4.485 s]
[INFO] CERMINE Web Interface - 1.12-SNAPSHOT .............. SUCCESS [01:43 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:12 min
[INFO] Finished at: 2017-01-10T10:14:08+08:00
[INFO] Final Memory: 61M/364M
[INFO] ------------------------------------------------------------------------

Thought there is a minor error about host name, which I think could be improved.

10:12:27,687 |-ERROR in ch.qos.logback.core.util.ContextUtil@7cbd213e - Failed to get local hostname java.net.UnknownHostException: t5400: t5400: Name or service not known
at java.net.UnknownHostException: t5400: t5400: Name or service not known
at at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at at ch.qos.logback.core.util.ContextUtil.getLocalHostName(ContextUtil.java:32)
at at ch.qos.logback.core.util.ContextUtil.addHostNameAsProperty(ContextUtil.java:41)
at at ch.qos.logback.classic.joran.action.ConfigurationAction.begin(ConfigurationAction.java:56)
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:147)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:133)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:96)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:55)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:54)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:108)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:279)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:252)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:265)
at at pl.edu.icm.cermine.service.ArticleMeta.(ArticleMeta.java:36)
at at pl.edu.icm.cermine.service.ArticleMetaTest.testExtractNLM(ArticleMetaTest.java:61)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at at java.lang.reflect.Method.invoke(Method.java:498)
at at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.net.UnknownHostException: t5400: Name or service not known
at at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
at ... 55 common frames omitted

from cermine.

acz-icm avatar acz-icm commented on June 13, 2024

Hi @ydu-sci,
your problem seems to be similar to one described here:
http://stackoverflow.com/questions/1881546/inetaddress-getlocalhost-throws-unknownhostexception
Probably your /etc/hosts file does not contain the hostname `t5400'. Try to add it as described on stackoverflow.

from cermine.

dtkaczyk avatar dtkaczyk commented on June 13, 2024

@ydu-sci did you manage to solve this problem?

from cermine.

dtkaczyk avatar dtkaczyk commented on June 13, 2024

I am assuming this is fixed, please reopen this issue/open a new one if you still experience any problems.

from cermine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.