Menu

#13 ClassNotFoundException and NullPointerException

open
Checker (9)
5
2008-07-28
2008-07-16
No

java.lang.ClassNotFoundException: javax.servlet.Filter not found.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.bcel.classfile.JavaClass.getAllInterfaces(JavaClass.java:808)
at net.sf.clirr.core.internal.bcel.BcelJavaType.getAllInterfaces(BcelJavaType.java:78)
at net.sf.clirr.core.internal.checks.InterfaceSetCheck.check(InterfaceSetCheck.java:58)
at net.sf.clirr.core.Checker.runClassChecks(Checker.java:190)
at net.sf.clirr.core.Checker.reportDiffs(Checker.java:136)
at org.codehaus.mojo.clirr.AbstractClirrMojo.executeClirr(AbstractClirrMojo.java:227)
at org.codehaus.mojo.clirr.ClirrReport.doReport(ClirrReport.java:249)
at org.codehaus.mojo.clirr.ClirrReport.generate(ClirrReport.java:225)
at org.codehaus.mojo.clirr.ClirrReport.generate(ClirrReport.java:376)
at org.codehaus.mojo.clirr.ClirrReport.execute(ClirrReport.java:188)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

The problem is solved by upgrading bcel to version 5.2

Discussion

  • Lars Kühne

    Lars Kühne - 2008-07-17

    Logged In: YES
    user_id=401384
    Originator: NO

    The current code in CVS no longer uses BCEL at all - I've switched over to ASM.

    Is this error triggered by an open source project, so I acn check whether the current CVS code base can handle that project? If your project is not open source, could you test the current clirr CVS code and verify that clirr can handle your code now?

    Thanks,
    Lars

     
  • Arnaud Heritier

    Arnaud Heritier - 2008-07-17

    Logged In: YES
    user_id=1453823
    Originator: YES

    Hi Lars,

    It's good to know. Sadly, it's a proprietary development and I as able to create a simple testcase (http://jira.codehaus.org/browse/MCLIRR-14). I didn't have a look at clirr source code yet. If it's easy to build the code I can try to build your trunk, deploy it in my local repository and test my project with a modified version of the Maven Clirr plugin using your trunk.
    I'll try the next week.

     
  • Arnaud Heritier

    Arnaud Heritier - 2008-07-21

    Logged In: YES
    user_id=1453823
    Originator: YES

    Hi Lars,

    I tried to test the version 0.7 of clirr but I wasn't able to acheive it because :
    1) Building the trunk (maven 2) I have several unit tests in error. I installed the jar in my local repository bypassing tests.
    2) The code in the maven plugin uses some BCELs APIs :-( . I wasn't able to modify it. I don't know Clirr/BCEL/ASM APIs and I don't have the time have a look at them in detail today. Perhaps you can help me to modify the plugin to use the 0.7 API ? (http://svn.codehaus.org/mojo/trunk/mojo/clirr-maven-plugin/)

    cheers

    arnaud

     
  • Lars Kühne

    Lars Kühne - 2008-07-22

    Logged In: YES
    user_id=401384
    Originator: NO

    ad 1): That's strange, "mvn install" works fine for me, using Maven 2.0.8.
    ad 2): I can try to have a look in the next few days, but I have never developed a maven plugin, and the project doesn't have any tests, so I can't tell if I break anything.

     
  • Arnaud Heritier

    Arnaud Heritier - 2008-07-22

    Logged In: YES
    user_id=1453823
    Originator: YES

    1) I'm using maven 2.0.9. Did you change something recently ? I update the code and I tried to build it to send to you the errors but I have a missing dependencies :
    [INFO] Failed to resolve artifact.

    Missing:
    ----------
    1) sun.jdk:tools:jar:1.5

    Try downloading the file manually from the project website.

    Then, install it using the command:
    mvn install:install-file -DgroupId=sun.jdk -DartifactId=tools -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file

    Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=sun.jdk -DartifactId=tools -Dversion=1.5 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

    Path to dependency:
    1) org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1
    2) sun.jdk:tools:jar:1.5

    ----------
    1 required artifact is missing.

    for artifact:
    org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1

    At work it was fine some days ago. At home I'm on MacOS X.
    2) No tests ? right :-( We have to had some ntegration tests. Perhaps you can try it on the plugin itself (with mvn clirr:check).

     
  • Lars Kühne

    Lars Kühne - 2008-07-28

    Logged In: YES
    user_id=401384
    Originator: NO

    Hi Arnaud,

    I think I have fixed the test failures you reported, they were triggered when running the tests in a non-english locale (which I assume you have).

    Regarding your last question: No, I didn't change anything. The build now succeeds for me on a fresh checkout, using Maven 2.0.9 on a german version of Windows XP. The joy of Maven ;-)

    I'll try to look into the plugin code in the near future, I already saw an API design problem clirr has: It shouldn't be necessary to mess around with ASM related classes, that's an Implementation detail of clirr. I'll try to fix that along the way.

    Cheers,
    Lars

     
  • Lars Kühne

    Lars Kühne - 2008-07-28
    • assigned_to: nobody --> lkuehne
     
  • Lars Kühne

    Lars Kühne - 2008-09-23

    The API problem mentioned in the last comment has been fixed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.