minio / minio-java

MinIO Client SDK for Java
https://docs.min.io/docs/java-client-quickstart-guide.html
Apache License 2.0
1.12k stars 484 forks source link

Issues when running on linux. #541

Closed danyaljj closed 7 years ago

danyaljj commented 7 years ago

I have this software that is using minio-java. When using in Mac everything is fine, although I have issues when running in linux.

Here is the error I'm getting when running on linux:

screen shot 2017-04-04 at 9 58 46 pm

and it's pointing to this line.

Locale on Mac

Daniels-MacBook-Pro-2:illinois-cogcomp-nlp daniel$ locale 
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=

Locale on Linux:

khashab2@austen:~$ locale 
LANG=en_US.UTF-8
LANGUAGE=en_US:
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
harshavardhana commented 7 years ago

It looks like lastModified was null @danyaljj - we will take a look. Strange to have two different operating systems behave differently.

danyaljj commented 7 years ago

I don't know why we keep track of last modified time or why it is necessary, but let me know if you need more details.

harshavardhana commented 7 years ago

No last modified is part of S3 spec we read it through HTTP header and attempt to convert it . Which S3 server are you using here ?

danyaljj commented 7 years ago

I'm using minio server on another linux machine. No S3 involved.

balamurugana commented 7 years ago

@danyaljj Looks like a minio server bug.

Can you provide minio server version and setup type ie FS or XL? you can get it by running minio version command.

danyaljj commented 7 years ago
khashab2@austen:/shared/shelley/khashab2/minio$ ./minio version
Version: 2017-02-16T01:47:30Z
Release-Tag: RELEASE.2017-02-16T01-47-30Z
Commit-ID: 3d98311d9f4ceb78dba996dcdc0751253241e697
balamurugana commented 7 years ago

@danyaljj Its good to know how you ran minio server (full command line). That will tell the setup type.

danyaljj commented 7 years ago

./minio server files

balamurugana commented 7 years ago

@danyaljj I guess files is a single directory. Can you provide below information?

  1. Can you provide output of stat of the file you are accessing using minio-java eg. stat files/<PATH-TO-FILE-YOUR-ACCESS> ?
  2. Could you enable traceOn() in MinioClient object and provide the output?

I suspect your backend file system doesn't have modtime.

danyaljj commented 7 years ago

Yeah files is a single directory. Here are the stats:

khashab2@austen:/shared/shelley/khashab2/minio$ stat files/readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip 
  File: 'files/readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip'
  Size: 559541      Blocks: 1096       IO Block: 1048576 regular file
Device: 47h/71d Inode: 1929380877  Links: 1
Access: (0660/-rw-rw----)  Uid: (948914/khashab2)   Gid: (61236/ cs_danr)
Access: 2017-04-05 00:18:02.466811175 -0500
Modify: 2017-04-04 14:26:40.429500282 -0500
Change: 2017-04-04 14:26:40.429500282 -0500
 Birth: -

Enabling traceOn() requires me to do some work 😒

danyaljj commented 7 years ago

How can the problem be the minio-server? I mean, it works fine when accessing from Mac....

balamurugana commented 7 years ago

If minio-java library is working fine in macOS, it should work on linux as well (My devel is on Ubuntu). In both the cases, if the same server is accessed, then it could be minio-java problem.

If possible, can you run a sample java code on macOS and linux pointing to your minio server? Refer: https://github.com/minio/minio-java/blob/master/examples/StatObject.java

danyaljj commented 7 years ago

Same server is accessed in both cases. Once accessed from mac (works fine), second time accessed from linux (not fine).

balamurugana commented 7 years ago

@danyaljj I understood the problem completely. Could you run the example pointing to your server with traceOn() on macOS and linux boxes? The output will tell what's going on.

danyaljj commented 7 years ago

Here is an example.

Mac output:

Daniels-MacBook-Pro-2:cogcomp-datastore daniel$ mvn exec:java -Dexec.mainClass="cogcomp.Blah"
---------START-HTTP---------
HEAD /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (x86_64; x86_64) minio-java/dev
x-amz-date: 20170405T081144Z

HTTP/1.1 200
Accept-Ranges: bytes
Content-Length: 559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721F18331C5B
Date: Wed, 05 Apr 2017 08:11:44 GMT
OkHttp-Sent-Millis: 1491379904434
OkHttp-Received-Millis: 1491379904499

----------END-HTTP----------
ObjectStat{bucket='readonly.org.cogcomp.comma-srl', name='2.2/comma-srl-models.zip', contentType='application/octet-stream', createdTime=Tue Apr 04 14:26:40 CDT 2017, length=559541, etag='4efcf5af5a84b774b287d6594602987b'}
---------START-HTTP---------
HEAD /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (x86_64; x86_64) minio-java/dev
x-amz-date: 20170405T081144Z

HTTP/1.1 200
Accept-Ranges: bytes
Content-Length: 559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721F1BA1FA59
Date: Wed, 05 Apr 2017 08:11:44 GMT
OkHttp-Sent-Millis: 1491379904524
OkHttp-Received-Millis: 1491379904539

----------END-HTTP----------
---------START-HTTP---------
GET /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Range: bytes=0-
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (x86_64; x86_64) minio-java/dev
x-amz-date: 20170405T081144Z

HTTP/1.1 206
Accept-Ranges: bytes
Content-Length: 559541
Content-Range: bytes 0-559540/559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721F203F27AC
Date: Wed, 05 Apr 2017 08:11:44 GMT
OkHttp-Sent-Millis: 1491379904600
OkHttp-Received-Millis: 1491379904620

----------END-HTTP----------

And linux output:

khashab2@austen:/shared/shelley/khashab2/cogcomp-datastore$ mvn exec:java -Dexec.mainClass="cogcomp.Blah"
---------START-HTTP---------
HEAD /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (amd64; amd64) minio-java/dev
x-amz-date: 20170405T081134Z

HTTP/1.1 200
Accept-Ranges: bytes
Content-Length: 559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721CC81F38C3
Date: Wed, 05 Apr 2017 08:11:34 GMT
OkHttp-Sent-Millis: 1491379894544
OkHttp-Received-Millis: 1491379894557

----------END-HTTP----------
ObjectStat{bucket='readonly.org.cogcomp.comma-srl', name='2.2/comma-srl-models.zip', contentType='application/octet-stream', createdTime=Tue Apr 04 14:26:40 CDT 2017, length=559541, etag='4efcf5af5a84b774b287d6594602987b'}
---------START-HTTP---------
HEAD /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (amd64; amd64) minio-java/dev
x-amz-date: 20170405T081134Z

HTTP/1.1 200
Accept-Ranges: bytes
Content-Length: 559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721CCA0C8219
Date: Wed, 05 Apr 2017 08:11:34 GMT
OkHttp-Sent-Millis: 1491379894585
OkHttp-Received-Millis: 1491379894587

----------END-HTTP----------
---------START-HTTP---------
GET /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Range: bytes=167214-
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (amd64; amd64) minio-java/dev
x-amz-date: 20170405T081134Z

HTTP/1.1 206
Accept-Ranges: bytes
Content-Length: 392327
Content-Range: bytes 167214-559540/559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B2721CCAD3F1AA
Date: Wed, 05 Apr 2017 08:11:34 GMT
OkHttp-Sent-Millis: 1491379894597
OkHttp-Received-Millis: 1491379894600

----------END-HTTP----------

Looking at the output of the above two runs, looks like they are both fine. So I tried an example inside my code. to see what happens there. And indeed there is a difference between the two behaviors. Here is the sample code which internally makes calls to minio.

output in mac

Daniels-MacBook-Pro-2:illinois-cogcomp-nlp daniel$ mvn -pl pipeline  compile exec:java -Dexec.mainClass="edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory"
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Illinois NLP Pipeline 3.1.4
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ illinois-nlp-pipeline ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/daniel/ideaProjects/illinois-cogcomp-nlp/pipeline/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ illinois-nlp-pipeline ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 9 source files to /Users/daniel/ideaProjects/illinois-cogcomp-nlp/pipeline/target/classes
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ illinois-nlp-pipeline ---
Starting to run the dummy . . . 
http://smaug.cs.illinois.edu:8080
Reading config informtion from file . . . 

                Endpoint: http://smaug.cs.illinois.edu:8080
                AccessKey: 1I9SK88HMRAB9UWQ7URC
                SecretKey: IsN/zQ99128acQyZF88ZdtRy+pO1eGEpubd6EhV0
Downloading the folder from datastore . . . 
                GroupId: readonly.org.cogcomp.comma-srl
                ArtifactId: 2.2/comma-srl-models.zip
The target /Users/daniel/.cogcomp-datastore/readonly.org.cogcomp.comma-srl/2.2/comma-srl-models already exists. Skipping download from the datastore . . . 
[PARSE_STANFORD, SRL_VERB, PSEUDO_PARSE_STANFORD, POS, NER_CONLL, LEMMA, SHALLOW_PARSE, TOKENS, SENTENCE, PARSE_GOLD]
[PARSE_STANFORD, SRL_VERB, PSEUDO_PARSE_STANFORD, POS, NER_CONLL, LEMMA, SHALLOW_PARSE, SRL_COMMA, TOKENS, SENTENCE, PARSE_GOLD]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.611 s
[INFO] Finished at: 2017-04-05T03:31:32-05:00
[INFO] Final Memory: 49M/388M
[INFO] ------------------------------------------------------------------------

output in linux

khashab2@austen:/shared/shelley/khashab2/illinois-cogcomp-nlp2/illinois-cogcomp-nlp-1$ mvn -pl pipeline  compile exec:java -Dexec.mainClass="edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory"
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Illinois NLP Pipeline 3.1.4
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ illinois-nlp-pipeline ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /shared/shelley/khashab2/illinois-cogcomp-nlp2/illinois-cogcomp-nlp-1/pipeline/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ illinois-nlp-pipeline ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ illinois-nlp-pipeline ---
Starting to run the dummy . . . 
http://smaug.cs.illinois.edu:8080
Reading config informtion from file . . . 

        Endpoint: http://smaug.cs.illinois.edu:8080
        AccessKey: 1I9SK88HMRAB9UWQ7URC
        SecretKey: IsN/zQ99128acQyZF88ZdtRy+pO1eGEpubd6EhV0
Downloading the folder from datastore . . . 
        GroupId: readonly.org.cogcomp.comma-srl
        ArtifactId: 2.2/comma-srl-models.zip
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
    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:498)
    at io.minio.http.HeaderParser.set(HeaderParser.java:73)
    at io.minio.MinioClient.execute(MinioClient.java:841)
    at io.minio.MinioClient.executeHead(MinioClient.java:1018)
    at io.minio.MinioClient.statObject(MinioClient.java:1154)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:292)
    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:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Wed, 05 Apr 2017 08:33:08 GMT" is malformed at "GMT"
    at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
    at io.minio.ResponseHeader.setDate(ResponseHeader.java:89)
    ... 18 more

Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: setter: setDate
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: annotation: Date
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: value: Wed, 05 Apr 2017 08:33:08 GMT
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
    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:498)
    at io.minio.http.HeaderParser.set(HeaderParser.java:73)
    at io.minio.MinioClient.execute(MinioClient.java:841)
    at io.minio.MinioClient.executeHead(MinioClient.java:1018)
    at io.minio.MinioClient.statObject(MinioClient.java:1154)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:292)
    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:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Tue, 04 Apr 2017 19:26:40 GMT" is malformed at "GMT"
    at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
    at io.minio.ResponseHeader.setLastModified(ResponseHeader.java:121)
    ... 18 more

Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: setter: setLastModified
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: annotation: Last-Modified
Apr 05, 2017 3:33:08 AM io.minio.http.HeaderParser set
INFO: value: Tue, 04 Apr 2017 19:26:40 GMT
[WARNING] 
java.lang.reflect.InvocationTargetException
    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:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at io.minio.ResponseHeader.lastModified(ResponseHeader.java:129)
    at io.minio.MinioClient.statObject(MinioClient.java:1156)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:292)
    ... 6 more
[WARNING] thread Thread[OkHttp ConnectionPool,5,edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory] was interrupted but is still alive after waiting at least 15000msecs
[WARNING] thread Thread[OkHttp ConnectionPool,5,edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory] will linger despite being asked to die via interruption
[WARNING] thread Thread[Okio Watchdog,5,edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory] will linger despite being asked to die via interruption
[WARNING] NOTE: 2 thread(s) did not finish despite being asked to  via interruption. This is not a problem with exec:java, it is a problem with the running code. Although not serious, it should be remedied.
[WARNING] Couldn't destroy threadgroup org.codehaus.mojo.exec.ExecJavaMojo$IsolatedThreadGroup[name=edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory,maxpri=10]
java.lang.IllegalThreadStateException
    at java.lang.ThreadGroup.destroy(ThreadGroup.java:778)
    at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:328)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
danyaljj commented 7 years ago

It looks like it is relevant to (same as?) #531.

Could you try running my same script in the 2nd link and see what you observe?

nitisht commented 7 years ago

The root cause seems to be Caused by: java.lang.IllegalArgumentException: Invalid format: "Wed, 05 Apr 2017 08:33:08 GMT" is malformed at "GMT" --> similar to #531

Looks like org.joda.time.format.DateTimeFormatter.parseDateTime formatting fails on Linux. I will try to reproduce and let you know.

nitisht commented 7 years ago

@danyaljj in the above error output for mac I see that download is skipped as the file exists on filesystem.

The target /Users/daniel/.cogcomp-datastore/readonly.org.cogcomp.comma-srl/2.2/comma-srl-models already exists. Skipping download from the datastore . . .

While on Linux the download is actually attempted and then you get the error. Can you pls remove the file from mac locally and try to see if you can reproduce it on macas well?

Also, I see CogComp.DataStore() is a wrapper on top of minio-java, and commaLabeler.initialize(null); is the line that calls DataStore, further triggering minio-java. To further investigate, I could not find the source code for CommaLabeler - can you point me to it, if it is open source?

balamurugana commented 7 years ago

@danyaljj Can you try with locale change from Locale.US to Locale.ENGLISH in https://github.com/minio/minio-java/blob/master/api/src/main/java/io/minio/DateFormat.java#L28?

balamurugana commented 7 years ago

@danyaljj you could also modify in https://github.com/minio/minio-java/blob/master/api/src/main/java/io/minio/DateFormat.java#L41 zzz to 'GMT'.

danyaljj commented 7 years ago

So @NitishT 's point fair. There was a cache on my Mac which kept the issue hidden on Mac.There is indeed the same observation on Mac too. Here is the ouptput:

Starting to run the dummy . . . 
http://smaug.cs.illinois.edu:8080
Reading config informtion from file . . . 

        Endpoint: http://smaug.cs.illinois.edu:8080
        AccessKey: 1I9SK88HMRAB9UWQ7URC
        SecretKey: IsN/zQ99128acQyZF88ZdtRy+pO1eGEpubd6EhV0
Downloading the folder from datastore . . . 
        GroupId: readonly.org.cogcomp.comma-srl
        ArtifactId: 2.2/comma-srl-models.zip
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
    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:498)
    at io.minio.http.HeaderParser.set(HeaderParser.java:73)
    at io.minio.MinioClient.execute(MinioClient.java:841)
    at io.minio.MinioClient.executeHead(MinioClient.java:1018)
    at io.minio.MinioClient.statObject(MinioClient.java:1154)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:303)
    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:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Mon, 10 Apr 2017 15:59:12 GMT" is malformed at "GMT"
    at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
    at io.minio.ResponseHeader.setDate(ResponseHeader.java:89)
    ... 18 more

Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: setter: setDate
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: annotation: Date
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: value: Mon, 10 Apr 2017 15:59:12 GMT
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
    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:498)
    at io.minio.http.HeaderParser.set(HeaderParser.java:73)
    at io.minio.MinioClient.execute(MinioClient.java:841)
    at io.minio.MinioClient.executeHead(MinioClient.java:1018)
    at io.minio.MinioClient.statObject(MinioClient.java:1154)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:303)
    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:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Tue, 04 Apr 2017 19:26:40 GMT" is malformed at "GMT"
    at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
    at io.minio.ResponseHeader.setLastModified(ResponseHeader.java:121)
    ... 18 more

Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: setter: setLastModified
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: annotation: Last-Modified
Apr 10, 2017 10:59:12 AM io.minio.http.HeaderParser set
INFO: value: Tue, 04 Apr 2017 19:26:40 GMT
Exception in thread "main" java.lang.NullPointerException
    at io.minio.ResponseHeader.lastModified(ResponseHeader.java:129)
    at io.minio.MinioClient.statObject(MinioClient.java:1156)
    at io.minio.MinioClient.getObject(MinioClient.java:1343)
    at cogcomp.Datastore.getDirectory(Datastore.java:345)
    at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
    at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
    at edu.illinois.cs.cogcomp.pipeline.main.PipelineFactory.main(PipelineFactory.java:303)
    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:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
danyaljj commented 7 years ago

@balamurugana

/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7537 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/tools.jar:/Users/daniel/ideaProjects/cogcomp-datastore/target/test-classes:/Users/daniel/ideaProjects/cogcomp-datastore/target/classes:/Users/daniel/.m2/repository/io/minio/minio/3.0.4-SNAPSHOT2-DEV/minio-3.0.4-SNAPSHOT2-DEV.jar:/Users/daniel/.m2/repository/com/google/http-client/google-http-client-xml/1.20.0/google-http-client-xml-1.20.0.jar:/Users/daniel/.m2/repository/com/google/http-client/google-http-client/1.20.0/google-http-client-1.20.0.jar:/Users/daniel/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/daniel/.m2/repository/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar:/Users/daniel/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar:/Users/daniel/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar:/Users/daniel/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/Users/daniel/.m2/repository/com/squareup/okhttp/okhttp/2.7.2/okhttp-2.7.2.jar:/Users/daniel/.m2/repository/com/squareup/okio/okio/1.6.0/okio-1.6.0.jar:/Users/daniel/.m2/repository/joda-time/joda-time/2.7/joda-time-2.7.jar:/Users/daniel/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.8.4/jackson-annotations-2.8.4.jar:/Users/daniel/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.8.4/jackson-core-2.8.4.jar:/Users/daniel/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.8.4/jackson-databind-2.8.4.jar:/Users/daniel/.m2/repository/edu/illinois/cs/cogcomp/illinois-core-utilities/3.0.103/illinois-core-utilities-3.0.103.jar:/Users/daniel/.m2/repository/edu/illinois/cs/cogcomp/jwnl-prime/1.0.4/jwnl-prime-1.0.4.jar:/Users/daniel/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/daniel/.m2/repository/edu/illinois/cs/cogcomp/wordnet/1.0-binary/wordnet-1.0-binary.jar:/Users/daniel/.m2/repository/net/sf/trove4j/trove4j/3.0.3/trove4j-3.0.3.jar:/Users/daniel/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/daniel/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/daniel/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/Users/daniel/.m2/repository/commons-codec/commons-codec/1.8/commons-codec-1.8.jar:/Users/daniel/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar:/Users/daniel/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar:/Users/daniel/.m2/repository/net/sf/ehcache/ehcache/2.8.3/ehcache-2.8.3.jar:/Users/daniel/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar:/Users/daniel/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar:/Users/daniel/.m2/repository/edu/princeton/wordnet-dict/3.1/wordnet-dict-3.1.jar:/Users/daniel/.m2/repository/com/h2database/h2/1.4.191/h2-1.4.191.jar:/Users/daniel/.m2/repository/org/mapdb/mapdb/3.0.0-M5/mapdb-3.0.0-M5.jar:/Users/daniel/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.0.1/kotlin-stdlib-1.0.1.jar:/Users/daniel/.m2/repository/org/jetbrains/kotlin/kotlin-runtime/1.0.1/kotlin-runtime-1.0.1.jar:/Users/daniel/.m2/repository/org/jetbrains/kotlin/kotlin-test/1.0.1/kotlin-test-1.0.1.jar:/Users/daniel/.m2/repository/org/eclipse/collections/eclipse-collections-api/7.0.1/eclipse-collections-api-7.0.1.jar:/Users/daniel/.m2/repository/org/eclipse/collections/eclipse-collections/7.0.1/eclipse-collections-7.0.1.jar:/Users/daniel/.m2/repository/org/eclipse/collections/eclipse-collections-forkjoin/7.0.1/eclipse-collections-forkjoin-7.0.1.jar:/Users/daniel/.m2/repository/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar:/Users/daniel/.m2/repository/org/mapdb/elsa/3.0.0-M1/elsa-3.0.0-M1.jar:/Users/daniel/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/daniel/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 cogcomp.DatastoreTest
Downloading the file from datastore . . . 
        GroupId: readonly.edu.cogcomp
        ArtifactId: 1.0/pom

java.lang.ExceptionInInitializerError
    at io.minio.MinioClient.createRequest(MinioClient.java:867)
    at io.minio.MinioClient.execute(MinioClient.java:902)
    at io.minio.MinioClient.executeHead(MinioClient.java:1128)
    at io.minio.MinioClient.statObject(MinioClient.java:1255)
    at io.minio.MinioClient.getObject(MinioClient.java:1442)
    at cogcomp.Datastore.getFile(Datastore.java:154)
    at cogcomp.Datastore.getFile(Datastore.java:132)
    at cogcomp.DatastoreTest.test(DatastoreTest.java:21)
    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:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    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:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.IllegalArgumentException: Illegal pattern component: T
    at org.joda.time.format.DateTimeFormat.parsePatternTo(DateTimeFormat.java:566)
    at org.joda.time.format.DateTimeFormat.createFormatterForPattern(DateTimeFormat.java:687)
    at org.joda.time.format.DateTimeFormat.forPattern(DateTimeFormat.java:177)
    at io.minio.DateFormat.<clinit>(DateFormat.java:41)
    ... 35 more
balamurugana commented 7 years ago

@danyaljj Now it shows error in requestBuilder.header("x-amz-date", date.toString(DateFormat.AMZ_DATE_FORMAT));. This is not at a problem. I suspect you are using wrong depedencies of minio-java.

Below are dependencies and their versions

    dependencies {
        compile "com.google.http-client:google-http-client-xml:1.20.0"
        compile "com.google.guava:guava:18.0"
        compile "com.squareup.okhttp:okhttp:2.7.2"
        compile "com.squareup.okio:okio:1.6.0"
        compile "joda-time:joda-time:2.7"
    compile "com.fasterxml.jackson.core:jackson-annotations:2.8.4"
    compile "com.fasterxml.jackson.core:jackson-core:2.8.4"
    compile "com.fasterxml.jackson.core:jackson-databind:2.8.4"

        testCompile "com.squareup.okhttp:mockwebserver:2.7.2"
        testCompile "junit:junit:4.12"
    }

Please check and let me know if they are exactly same. If the problem continues, I need traceOn() output.

danyaljj commented 7 years ago

Here is the output with traceOn() and original settings:

Running edu.illinois.cs.cogcomp.comma.CommaLabelerTest
http://smaug.cs.illinois.edu:8080
Reading config informtion from file . . . 

                Endpoint: http://smaug.cs.illinois.edu:8080
                AccessKey: 1I9SK88HMRAB9UWQ7URC
                SecretKey: IsN/zQ99128acQyZF88ZdtRy+pO1eGEpubd6EhV0
Downloading the folder from datastore . . . 
                GroupId: readonly.org.cogcomp.comma-srl
                ArtifactId: 2.2/comma-srl-models.zip
augmentedGroupId: readonly.org.cogcomp.comma-srl
versionedFileName: 2.2/comma-srl-models.zip
zippedFileName: /Users/daniel/.cogcomp-datastore-tmp/comma-srl-models.zip
---------START-HTTP---------
GET /readonly.org.cogcomp.comma-srl?location= HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (x86_64; x86_64) minio-java/dev
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20170410T181713Z
Authorization: AWS4-HMAC-SHA256 Credential=1I9SK88HMRAB9UWQ7URC/20170410/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=*REDACTED*

HTTP/1.1 200
Accept-Ranges: bytes
Content-Type: application/xml
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B41C104347DB1D
Date: Mon, 10 Apr 2017 18:17:12 GMT
Transfer-Encoding: chunked
OkHttp-Sent-Millis: 1491848234434
OkHttp-Received-Millis: 1491848234451

Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
        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:498)
        at io.minio.http.HeaderParser.set(HeaderParser.java:73)
        at io.minio.MinioClient.execute(MinioClient.java:937)
        at io.minio.MinioClient.updateRegionCache(MinioClient.java:1035)
        at io.minio.MinioClient.getRegion(MinioClient.java:1081)
        at io.minio.MinioClient.executeHead(MinioClient.java:1128)
        at io.minio.MinioClient.statObject(MinioClient.java:1255)
        at io.minio.MinioClient.getObject(MinioClient.java:1442)
        at cogcomp.Datastore.getDirectory(Datastore.java:357)
        at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
        at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
        at edu.illinois.cs.cogcomp.annotation.Annotator.lazyAddView(Annotator.java:179)
        at edu.illinois.cs.cogcomp.annotation.Annotator.getView(Annotator.java:166)
        at edu.illinois.cs.cogcomp.comma.CommaLabelerTest.testGetCommaSRLFromTA(CommaLabelerTest.java:62)
        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:498)
        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:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Mon, 10 Apr 2017 18:17:12 GMT" is malformed at "GMT"
        at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
        at io.minio.ResponseHeader.setDate(ResponseHeader.java:90)
        ... 37 more

Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: setter: setDate
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: annotation: Date
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: value: Mon, 10 Apr 2017 18:17:12 GMT
----------END-HTTP----------
---------START-HTTP---------
HEAD /readonly.org.cogcomp.comma-srl/2.2/comma-srl-models.zip HTTP/1.1
Host: smaug.cs.illinois.edu:8080
User-Agent: Minio (x86_64; x86_64) minio-java/dev
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date: 20170410T181714Z
Authorization: AWS4-HMAC-SHA256 Credential=1I9SK88HMRAB9UWQ7URC/20170410/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=*REDACTED*

HTTP/1.1 200
Accept-Ranges: bytes
Content-Length: 559541
Content-Type: application/octet-stream
Etag: "4efcf5af5a84b774b287d6594602987b"
Last-Modified: Tue, 04 Apr 2017 19:26:40 GMT
Server: Minio/RELEASE.2017-02-16T01-47-30Z (linux; amd64)
Vary: Origin
X-Amz-Request-Id: 14B41C10465C1674
Date: Mon, 10 Apr 2017 18:17:12 GMT
OkHttp-Sent-Millis: 1491848234489
OkHttp-Received-Millis: 1491848234498

Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
        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:498)
        at io.minio.http.HeaderParser.set(HeaderParser.java:73)
        at io.minio.MinioClient.execute(MinioClient.java:937)
        at io.minio.MinioClient.executeHead(MinioClient.java:1128)
        at io.minio.MinioClient.statObject(MinioClient.java:1255)
        at io.minio.MinioClient.getObject(MinioClient.java:1442)
        at cogcomp.Datastore.getDirectory(Datastore.java:357)
        at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
        at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
        at edu.illinois.cs.cogcomp.annotation.Annotator.lazyAddView(Annotator.java:179)
        at edu.illinois.cs.cogcomp.annotation.Annotator.getView(Annotator.java:166)
        at edu.illinois.cs.cogcomp.comma.CommaLabelerTest.testGetCommaSRLFromTA(CommaLabelerTest.java:62)
        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:498)
        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:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Mon, 10 Apr 2017 18:17:12 GMT" is malformed at "GMT"
        at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
        at io.minio.ResponseHeader.setDate(ResponseHeader.java:90)
        ... 35 more

Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: setter: setDate
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: annotation: Date
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: value: Mon, 10 Apr 2017 18:17:12 GMT
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
SEVERE: exception occured: 
java.lang.reflect.InvocationTargetException
        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:498)
        at io.minio.http.HeaderParser.set(HeaderParser.java:73)
        at io.minio.MinioClient.execute(MinioClient.java:937)
        at io.minio.MinioClient.executeHead(MinioClient.java:1128)
        at io.minio.MinioClient.statObject(MinioClient.java:1255)
        at io.minio.MinioClient.getObject(MinioClient.java:1442)
        at cogcomp.Datastore.getDirectory(Datastore.java:357)
        at edu.illinois.cs.cogcomp.comma.CommaLabeler.initialize(CommaLabeler.java:46)
        at edu.illinois.cs.cogcomp.annotation.Annotator.doInitialize(Annotator.java:125)
        at edu.illinois.cs.cogcomp.annotation.Annotator.lazyAddView(Annotator.java:179)
        at edu.illinois.cs.cogcomp.annotation.Annotator.getView(Annotator.java:166)
        at edu.illinois.cs.cogcomp.comma.CommaLabelerTest.testGetCommaSRLFromTA(CommaLabelerTest.java:62)
        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:498)
        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:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.IllegalArgumentException: Invalid format: "Tue, 04 Apr 2017 19:26:40 GMT" is malformed at "GMT"
        at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
        at io.minio.ResponseHeader.setLastModified(ResponseHeader.java:122)
        ... 35 more

Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: setter: setLastModified
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: annotation: Last-Modified
Apr 10, 2017 1:17:14 PM io.minio.http.HeaderParser set
INFO: value: Tue, 04 Apr 2017 19:26:40 GMT
----------END-HTTP----------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.534 sec <<< FAILURE! - in edu.illinois.cs.cogcomp.comma.CommaLabelerTest
testGetCommaSRLFromTA(edu.illinois.cs.cogcomp.comma.CommaLabelerTest)  Time elapsed: 1.447 sec  <<< ERROR!
java.lang.NullPointerException
        at edu.illinois.cs.cogcomp.comma.CommaLabelerTest.testGetCommaSRLFromTA(CommaLabelerTest.java:62)
danyaljj commented 7 years ago

This is my current most recent observation: the issue is not OS (it happens in both Linux and Mac). However, on my Mac, retrieving file works fine, if being called from the same project, but it doesn't work fine on the other project.

harshavardhana commented 7 years ago

This is my current most recent observation: the issue is not OS (it happens in both Linux and Mac). However, on my Mac, retrieving file works fine, if being called from the same project, but it doesn't work fine on the other project.

are you using the latest master @danyaljj ?

danyaljj commented 7 years ago

Yeah I cloned from master.

danyaljj commented 7 years ago

3.0.4-DEV

danyaljj commented 7 years ago

Found it!

Somehow your joda-time-2.7 dependency was being ovewritten by an older version joda-time-2.1. Adding the version 2.7 explicitly to my project fixed the issue.

harshavardhana commented 7 years ago

Somehow your joda-time-2.7 dependency was being ovewritten by an older version joda-time-2.1. Adding the version 2.7 explicitly to my project fixed the issue.

Thanks @danyaljj glad to know.

balamurugana commented 7 years ago

Found it!

Somehow your joda-time-2.7 dependency was being ovewritten by an older version joda-time-2.1. Adding the version 2.7 explicitly to my project fixed the issue.

As expected. Glad you found it.