Giter Site home page Giter Site logo

Comments (11)

matyb avatar matyb commented on September 23, 2024

i am on it. i will look into this when i get out of work. thanks for sharing, it sould be resolved soon.

from java-koans.

matyb avatar matyb commented on September 23, 2024

mis clicked on comment and close :)

from java-koans.

matyb avatar matyb commented on September 23, 2024

My apologies pbattisson, I'm trying to follow and having a bit of trouble forgive me :)

tldr;
I recommend:

  • make sure u saved the file
  • restart the app, maybe it is not detecting you saved the file
  • delete the data/file_hashes.dat file and restart the app (might run for a bit longer than usual)
  • delete the data and bin directories and restart from the run script. that should destroy your progress and fix any issues related to any of the run time compilation stuff; which might explain the symptoms. If you wish to resume, you can still run each remaning script passing the suite's class name to the run script. ex: /run.sh intermediate.AboutEquality

We can rule out java, but perhaps your behind on an OS update? Here's what I'm running to attempt reproducing:

werd-mbp:src matyb$ sw_vers & java -version
ProductName: Mac OS X
ProductVersion: 10.7.1
BuildVersion: 11B26
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)

I tried running just the AboutEquality suite:
./run.sh intermediate.AboutEquality

and:
./run.sh

both ran through the AboutEquality suite (fix + save in sequence, like a normal person running through the koans) without issue.

Please respond if that helps, and if not, respond anyway :P
I'd like to know if the line# and method name and code are 100% accurate, or if I'm missing any details.

PS - the program output is like an old teletype app, it uses line breaks to clear console. you can paste the entire playback into here (or in an email if it's too long).

Cheers,
Mat

from java-koans.

pbattisson avatar pbattisson commented on September 23, 2024

Okay tried all of those other than deleting everything and it fails still:

Ponder what's going wrong in the AboutEquality class's noObjectShouldbeEqualToNull method.

Line 26 may offer a clue as to how you may progress, now make haste!

What went wrong:
expected: but was:

Level: Intermediate
Progress: [XXXXXXXXXXX---------------------------------------] 2/9
Remaining Suites: AboutEquality

Edit & save a koan to reload or enter 'Q' to exit


The code on line 26 is 
@Koan 
public void noObjectShouldbeEqualToNull() {
    assertEquals(new Object().equals(null),false);
}

Will try doing the full reload at some point over the weekend. You have exactly the same Mac setup as me, which makes it weirder.

Thanks for your help

Paul

from java-koans.

pbattisson avatar pbattisson commented on September 23, 2024

I fact, just tried deleting that test and reloading the system and it doesn't recognise the test has gone. Curiouser ad curiouser....

from java-koans.

matyb avatar matyb commented on September 23, 2024

pbattisson, thanks for being patient. I think you may have deleted the source file and not the class. If your source contains the same code and you deleted the class file, you would see very different output.

Without the class file the system will recompile it. It works correctly when i copy and paste your code, so if it compiles with that code that's guarenteed to be what the app evaluates. Make sure your deleting the class file from the bin directory. If your using an ide you may have more than one copy of the class, so get rid of the one the app is using.

Let me know if that helps.

from java-koans.

pbattisson avatar pbattisson commented on September 23, 2024

Nope, still nothing. Next time I get a chance I am going to download the entire thing again and start fromt he beginning again.

Should be on Wednesday so let you know,

from java-koans.

matyb avatar matyb commented on September 23, 2024

hmmmm I'm convinced your not deleting the class. The app compiles it and runs the koan methods in it. If you did it would have compiled a new copy with your corrected code, or provided an exception. If you deleted it, there would be no way for the app to know what it used to be.

If your having trouble finding the class file in koans/bin, then copy your koans/src directory over a new install. If you still have this problem then I guarantee the problem is with the src file and in that case you can copy over it from the archive you got off github.

from java-koans.

pbattisson avatar pbattisson commented on September 23, 2024

[javac, -d, /Users/paulbattisson/Documents/Learning/java-koans/koans/bin, -classpath, /Users/paulbattisson/Documents/Learning/java-koans/koans/lib/koans.jar, /Users/paulbattisson/Documents/Learning/java-koans/koans/src/intermediate/AboutEquality.java]
/Users/paulbattisson/Documents/Learning/java-koans/koans/src/intermediate/AboutEquality.java does not compile. exit status was: 1


java.io.FileNotFoundException: /Users/paulbattisson/Documents/Learning/java-koans/koans/bin/intermediate/AboutEquality.class (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:120)
at java.io.FileInputStream.(FileInputStream.java:79)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at com.sandwich.util.io.DynamicClassLoader.loadClass(DynamicClassLoader.java:97)
at com.sandwich.util.io.DynamicClassLoader.loadClass(DynamicClassLoader.java:74)
at com.sandwich.koan.runner.RunKoans.constructSuite(RunKoans.java:115)
at com.sandwich.koan.runner.RunKoans.runKoans(RunKoans.java:56)
at com.sandwich.koan.runner.RunKoans.run(RunKoans.java:41)
at com.sandwich.koan.constant.ArgumentType.run(ArgumentType.java:73)
at com.sandwich.koan.cmdline.CommandLineArgument.run(CommandLineArgument.java:36)
at com.sandwich.koan.cmdline.CommandLineArgumentRunner.run(CommandLineArgumentRunner.java:26)
at com.sandwich.koan.runner.AppLauncher.main(AppLauncher.java:18)
Exception in thread "main" java.lang.RuntimeException: java.lang.ClassFormatError: Truncated class file
at com.sandwich.koan.constant.ArgumentType.run(ArgumentType.java:80)
at com.sandwich.koan.cmdline.CommandLineArgument.run(CommandLineArgument.java:36)
at com.sandwich.koan.cmdline.CommandLineArgumentRunner.run(CommandLineArgumentRunner.java:26)
at com.sandwich.koan.runner.AppLauncher.main(AppLauncher.java:18)
Caused by: java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
at com.sandwich.util.io.DynamicClassLoader.loadClass(DynamicClassLoader.java:109)
at com.sandwich.util.io.DynamicClassLoader.loadClass(DynamicClassLoader.java:74)
at com.sandwich.koan.runner.RunKoans.constructSuite(RunKoans.java:115)
at com.sandwich.koan.runner.RunKoans.runKoans(RunKoans.java:56)
at com.sandwich.koan.runner.RunKoans.run(RunKoans.java:41)
at com.sandwich.koan.constant.ArgumentType.run(ArgumentType.java:73)
... 3 more

from java-koans.

matyb avatar matyb commented on September 23, 2024

Awesome! Thats progress definitely. It looks like the AboutEquality java file has an error keeping it from compiling, replace the java file and rerun, it should work fine then.

Let me know.

from java-koans.

pbattisson avatar pbattisson commented on September 23, 2024

Yeah! Working like a treat, thanks for the help :-)

from java-koans.

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.