Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when files are not readable #39

Closed
liar666 opened this issue Oct 13, 2014 · 2 comments
Closed

NullPointerException when files are not readable #39

liar666 opened this issue Oct 13, 2014 · 2 comments
Assignees
Milestone

Comments

@liar666
Copy link
Collaborator

liar666 commented Oct 13, 2014

Hi,

I just ran into a strange behaviour: when trying to access files in a dir (/tmp/ToTreat) that all belonged to another user, I ran into a not-really-explicatory-error: NullPointerException...

$ GROBID_HOME=/home/xxx/grobid/grobid-home/
$ DIR=/tmp/ToTreat/
$ java -Xmx1024m -Xms1024m
-jar ${GROBID_HOME}/../grobid-core/target/grobid-core-0.2.*.one-jar.jar
-gH ${GROBID_HOME}
-gP ${GROBID_HOME}/config/grobid.properties
-dIn ${DIR} -dOut ${DIR}
-exe processHeader
Exception in thread "main" 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:601)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: 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:601)
at org.grobid.core.utilities.Utilities.launchMethod(Utilities.java:359)
at org.grobid.core.main.batch.GrobidMain.main(GrobidMain.java:155)
... 6 more
Caused by: java.lang.NullPointerException
at org.grobid.core.engines.ProcessEngine.processHeader(ProcessEngine.java:56)
... 12 more

@kermitt2 kermitt2 self-assigned this Dec 9, 2014
@kermitt2 kermitt2 modified the milestones: 0.3.6, 0.3.9 Aug 20, 2015
@lfoppiano
Copy link
Collaborator

Seems to work fine when the directory is not accssible:

Oct 17, 2018 3:58:49 PM org.grobid.core.engines.ProcessEngine processHeader
WARNING: No files in directory: /tmp/bao

On the other hand I've found that if the -exe method is supplied we have a NPE and I've pushed a fix.

@lfoppiano
Copy link
Collaborator

Closing as outdated ;-)

de-code pushed a commit to elifesciences/grobid that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants