laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 187 forks source link

no feedback after at java.lang.Thread.run(Thread.java:695) #145

Closed seeliang closed 9 years ago

seeliang commented 9 years ago

Hi all,

this could be a issue related to OSX10.10.1

after < s3_website push >

i got " Exception in thread "main" java.lang.NullPointerException at scala.collection.mutable.ArrayOps$ofRef$.newBuilder$extension(ArrayOps.scala:190) at scala.collection.mutable.ArrayOps$ofRef.newBuilder(ArrayOps.scala:186) at scala.collection.TraversableLike$class.filterImpl(TraversableLike.scala:257) at scala.collection.TraversableLike$class.filter(TraversableLike.scala:270) at scala.collection.mutable.ArrayOps$ofRef.filter(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:131) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:131) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:131) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252) at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:131) at s3.website.model.Files$.listSiteFiles(push.scala:148) at s3.website.UploadHelper$.resolveDeletes(UploadHelper.scala:53) at s3.website.Push$$anonfun$9$$anonfun$10$$anonfun$apply$8.apply(Push.scala:103) at s3.website.Push$$anonfun$9$$anonfun$10$$anonfun$apply$8.apply(Push.scala:103) at scala.util.Either.fold(Either.scala:99) at s3.website.Push$$anonfun$9$$anonfun$10.apply(Push.scala:101) at s3.website.Push$$anonfun$9$$anonfun$10.apply(Push.scala:100) at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251) at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:249) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) "

and that is all,

did i miss something?

many thanks

laurilehmijoki commented 9 years ago

Hi @seeliang and thanks for reporting the problem. You have not missed anything. Instead, you spotted a bug! A piece of code in s3_website did not null-check the return value of File.listFiles. That caused your problem.

Your problem should be fixed in the version 2.7.6. Please try that version. Does it work for you?

seeliang commented 9 years ago

Cool, Thanks for the update

here is the new log, i got after update

Exception in thread "pool-1-thread-11" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572) at java.lang.StringBuilder.append(StringBuilder.java:203) at java.io.UnixFileSystem.resolve(UnixFileSystem.java:93) at java.io.File.(File.java:207) at java.io.File.listFiles(File.java:1056) at s3.website.model.Files$.recursiveListFiles(push.scala:130) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252) at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252) at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) Exception in thread "pool-1-thread-4" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOfRange(Arrays.java:3209) at java.lang.String.(String.java:215) at java.lang.StringBuilder.toString(StringBuilder.java:430) at java.io.UnixFileSystem.resolve(UnixFileSystem.java:93) at java.io.File.(File.java:207) at java.io.File.listFiles(File.java:1056) at s3.website.model.Files$.recursiveListFiles(push.scala:130) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252) at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252) at scala.collection.mutable.ArrayOps$ofRef.flatMap(ArrayOps.scala:186) at s3.website.model.Files$.recursiveListFiles(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at s3.website.model.Files$$anonfun$recursiveListFiles$2.apply(push.scala:132) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:252) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:252)

laurilehmijoki commented 9 years ago

How many files are under your site directory? The command find . -type f | wc -l can tell you that.

What does java -version tell you?

seeliang commented 9 years ago

i have < 35 > files and < java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) >

i am using OSX10.10.1

and my S3 has existing files (totally different from the local)

laurilehmijoki commented 9 years ago

Try installing the latest Java: https://www.java.com/en/download/. Does that solve the issue?

seeliang commented 9 years ago

i tried that on 31 Jan.

after i had found this http://stackoverflow.com/questions/19648229/java-applet-security-model-incompatibility-between-os-x-jres-6-and-7-any-workar

laurilehmijoki commented 9 years ago

Closing as inactive. Please reopen if needed.