skadistats / clarity-examples

Example code for clarity
BSD 3-Clause "New" or "Revised" License
113 stars 37 forks source link

Building dumpbaselines builds combatlog #8

Closed Decoud closed 9 years ago

Decoud commented 9 years ago

Building the examples (I've done like 7 of them not all of them) have all worked fine with the exception of dumpbaselines. Example code for building and running a different example that works fine:

mvn -P tick package && java -jar target/tick.one-jar.jar "C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta\dota\replays\1782181262.dem"

The one issue I've had is trying to build dumpbaselines. Get the following warning message after running: mvn -P dumpbaselines package && java -jar target/dumpbaselines.one-jar.jar 28517 "C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta\dota\replays\1782181262.dem"

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.632 s [INFO] Finished at: 2015-09-19T12:35:20-08:00 [INFO] Final Memory: 11M/244M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "dumpbaselines" could not be activated because i t does not exist. Error: Unable to access jarfile target/dumpbaselines.one-jar.jar

In the clarity-examples\target directory, rather than a dumpbaselines and dumpbaselines.one-jar being built the corresponding one for combatlog is built. As a workaround I took the code in the dumpbaselines Main example, put it into dump and was able to build "dump" successfully and run the dumpbaseslines code under the jar name of dump and it had the desired results.

spheenik commented 9 years ago

plz check to see if it works now :)

Decoud commented 9 years ago

It builds successfully but getting a new error message when it runs. Same thing happens when I run the modified dump example (modified to have the dumpbaselines code). Might be something I did on my end.

writing baselines\1030\CWorld.txt
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.simontuffs.onejar.Boot.run(Boot.java:340)
        at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.NoClassDefFoundError: skadistats/clarity/decoder/BitStream
        at skadistats.clarity.examples.dumpbaselines.Main.run(Main.java:55)
        at skadistats.clarity.examples.dumpbaselines.Main.main(Main.java:73)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: skadistats.clarity.decoder.BitStrea
m
        at com.simontuffs.onejar.JarClassLoader.findClass(JarClassLoader.java:71
3)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at com.simontuffs.onejar.JarClassLoader.loadClass(JarClassLoader.java:63
0)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 8 more
spheenik commented 9 years ago

I moved the BitStream.class yesterday. I deployed a new snapshot. Plz check if it works with that...

Am 20.09.2015 um 22:52 schrieb Decoud:

|Caused by: java.lang.NoClassDefFoundError: skadistats/clarity/decoder/BitStream |

Decoud commented 9 years ago

Where do I get the new Snapshot? Tried downloading and reinstalling the newest clarity version but still getting the same error.

spheenik commented 9 years ago

|mvn --update-snapshots clean package (in the examples project) You should see it downloading a new snapshot. |

spheenik commented 9 years ago

Also you said, you have a custom example? Then, in your example, be sure the import of the BitStream reads:

import skadistats.clarity.decoder.bitstream.BitStream;

Decoud commented 9 years ago

All good, working now. Thanks.