question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jpeek fails to run

See original GitHub issue

I fail to run jpeek. I end up in exceptions when runnnig the maven repository jar and compiled sources.

When running the repository jar, given in the readme, some class is reported missing:

$ java -jar ~/tools/jpeek/jpeek-0.1-jar-with-dependencies.jar . /tmp/jpeek
Exception in thread "main" java.io.IOException: java.io.UncheckedIOException: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.scalar.IoCheckedScalar.value(IoCheckedScalar.java:60)
        at org.jpeek.App.analyze(App.java:96)
        at org.jpeek.Main.main(Main.java:61)
Caused by: java.io.UncheckedIOException: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
        at org.cactoos.iterator.Mapped.next(Mapped.java:70)
        at org.jpeek.metrics.cohesion.CAMC.metrics(CAMC.java:118)
        at org.jpeek.metrics.cohesion.CAMC.xembly(CAMC.java:91)
        at org.jpeek.App.lambda$analyze$0(App.java:85)
        at org.cactoos.func.FuncOf.lambda$new$3(FuncOf.java:88)
        at org.cactoos.func.FuncOf.apply(FuncOf.java:104)
        at org.cactoos.scalar.And.lambda$null$0(And.java:101)
        at org.cactoos.scalar.And.value(And.java:127)
        at org.cactoos.scalar.And.value(And.java:52)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 3 more
Caused by: java.io.IOException: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
        ... 13 more
Caused by: java.lang.IllegalStateException: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at org.jpeek.metrics.cohesion.CAMC.metric(CAMC.java:146)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 14 more
Caused by: javassist.NotFoundException: com.company.releng.tools.deploy.locations.DeployLocations
        at javassist.ClassPool.get(ClassPool.java:445)
        at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:592)
        at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:439)
        at javassist.CtBehavior.getParameterTypes(CtBehavior.java:298)
        at org.jpeek.metrics.cohesion.CAMC.methods(CAMC.java:196)
        at org.jpeek.metrics.cohesion.CAMC.cohesion(CAMC.java:157)
        at org.jpeek.metrics.cohesion.CAMC.metric(CAMC.java:142)
        ... 15 more

When trying to build the tool from source using mvn clean package , the build fails due to errors in tests:

# Build tests fail

Tests in error: 
  AppTest.createsXmlReports:50 » IO java.lang.IllegalArgumentException: 40 error...
  MainTest.createsXmlReports:47 » IO java.lang.IllegalArgumentException: 40 erro...

Tests run: 11, Failures: 4, Errors: 2, Skipped: 0

Building with mvn clean package -DskipTests produces the desired jar.

However when running this file, another exception occurs:

~/git/master$ java -jar ~/source/jpeek/target/jpeek-1.0-SNAPSHOT-jar-with-dependencies.jar . /tmp/jpeek
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.io.IOException: java.io.UncheckedIOException: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.cactoos.scalar.IoCheckedScalar.value(IoCheckedScalar.java:60)
        at org.jpeek.App.analyze(App.java:114)
        at org.jpeek.Main.main(Main.java:61)
Caused by: java.io.UncheckedIOException: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:61)
        at org.cactoos.iterator.Mapped.next(Mapped.java:70)
        at org.jpeek.metrics.JavassistClasses.metrics(JavassistClasses.java:129)
        at org.jpeek.metrics.JavassistClasses.xembly(JavassistClasses.java:101)
        at org.jpeek.metrics.cohesion.CAMC.xembly(CAMC.java:76)
        at org.jpeek.App.xml(App.java:134)
        at org.jpeek.App.lambda$analyze$0(App.java:102)
        at org.cactoos.func.FuncOf.lambda$new$3(FuncOf.java:88)
        at org.cactoos.func.FuncOf.apply(FuncOf.java:104)
        at org.cactoos.scalar.And.lambda$null$0(And.java:101)
        at org.cactoos.scalar.And.value(And.java:127)
        at org.cactoos.scalar.And.value(And.java:52)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 3 more
Caused by: java.io.IOException: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:74)
        at org.jpeek.metrics.JavassistClasses.metric(JavassistClasses.java:147)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        at org.cactoos.func.UncheckedFunc.apply(UncheckedFunc.java:59)
        ... 15 more
Caused by: javassist.NotFoundException: org.apache.commons.cli.CommandLine
        at javassist.ClassPool.get(ClassPool.java:445)
        at javassist.bytecode.Descriptor.toCtClass(Descriptor.java:592)
        at javassist.bytecode.Descriptor.getParameterTypes(Descriptor.java:439)
        at javassist.CtBehavior.getParameterTypes(CtBehavior.java:298)
        at org.jpeek.metrics.cohesion.CAMC.methods(CAMC.java:139)
        at org.jpeek.metrics.cohesion.CAMC.cohesion(CAMC.java:86)
        at org.cactoos.func.IoCheckedFunc.apply(IoCheckedFunc.java:66)
        ... 18 more

Am I missing something or did I catch the project in an unfortunate state?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
wolkenschiebercommented, Oct 24, 2017

Pulled the latest source and the project builds fine now.

0reactions
0cratcommented, Oct 25, 2017

Oops! Job gh:yegor256/jpeek#20 is not in scope.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cqfn/jpeek: Hosted and command-line calculator of ... - GitHub
jPeek is a static collector of Java code metrics. ... Just compile it with mvn clean package --settings settings.xml and then run, as...
Read more >
Validating New Method for Measuring Cohesion in Object
The jPeek tool with its library for inspecting objects in Java was developed by Huawei Technologies Co. Ltd. to achieve these goals [1]....
Read more >
There's a Lot in the Dot: Filesystem Permissions and Pathnames ...
Example: if your current directory is /home/jpeek , two relative pathnames you might type ... A: It fails because he doesn't have execute...
Read more >
[Chapter 13] 13.5 Redirection in C Shell: Capture Errors, Too?
If you're logged in and can see any messages written to standard error, that's okay: ... you'll never see those errors unless you...
Read more >
jpeek vs Error Prone - compare differences and reviews? | LibHunt
While at it you could also point them to static code analyzers such as error_prone, spotbugs and pmd (use all 3 at once...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found