facebook

NoSuchMethodError

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #251651 Reply

    Curt King
    Participant

    I’ve got an EAR project that references a Java project. That Java project is packaged as a JAR file with the EAR when I export it.

    The JAR file contains common classes that I use in my web app.

    I made a change to one of these common classes — I added a method. The name of the method is public BigDecimal getTotalPaidForCourtByType(String, String).

    When I attempt to call the method in a JSP, I get a java.lang.NoSuchMethodError.

    [Servlet Error]-[<init> (I)V  ]: java.lang.NoSuchMethodError: <init> (I)V 
    java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:85)                                      
    java/lang/Error.<init>(Ljava/lang/String;)V+1 (Error.java:41)                                              
    java/lang/IncompatibleClassChangeError.<init>(Ljava/lang/String;)V+1 (IncompatibleClassChangeError.java:34)             
    java/lang/NoSuchMethodError.<init>(Ljava/lang/String;)V+1 (NoSuchMethodError.java:37)                                         
    net/hctx/jp/jcisobjects/RemotePaymentList.getTotalPaidForCourtByType(Ljava/lang/String;Ljava/lang/String;)Ljava/math/BigDecimal
    org/apache/jsp/_ECommerceSummary._jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)

    I have cleaned all of my projects, I have rebuilt all of my projects, but to no avail.

    I have opened up the EAR file and examined the enclosed JAR. The enclosed JAR does contain the updated method in the source.

    What am I doing wrong?? Where should I begin to look?

    Thanks,
    Curt

    #251652

    Riyad Kalla
    Member

    Curt,
    What app server are you using? Some app servers require you to navigate to the administration console, and then install or deploy the EAR that MyEclipse places in the deployment dir. This step is where you create the deployment plan and the app server generates all necessary resources around the project and then “deploys” it into the running app server.

    If your app server was like this, chances are you need to redeploy your project from the admin console to get the classes updated.

    #251661

    Curt King
    Participant

    I’m on Websphere 5 for iSeries.

    I’m not using the MyEclipse deployment tool — I’m exporting as an EAR file, FTPing it to my server, then running the console to update the app.

    I have updated the app two different ways — web console and command line console. When that didn’t work, I tried completely uninstalling and reinstalling the app. That didn’t work, either.

    Curt

    #251668

    Riyad Kalla
    Member

    Curt,
    I’m sorry I can’t be more helpful. This is a web server issue as you said the class is infact in the archive and the archive is created by MyEclipse, past that, it’s up to the app server.

    Try uninstalling the app and restarting your app server, then reinstalling it I suppose. I’m not that versed in WebSphere.

    #251669

    Curt King
    Participant

    No problem. I thought you might have seen this kind of thing before.

    Thanks anyway,
    Curt

    #251673

    Curt King
    Participant

    A couple of things:

    1) I’ve got an EAR project that references a Java project. That Java project is packaged as a JAR file with the EAR when I export it. Should there be a manifest file inside of my EAR project?
    2) Should there also be a manifest file inside of my web module?
    3) Which manifests should contain the Class-Path header that points to the JAR file?

    Thanks,
    Curt

    #251679

    Riyad Kalla
    Member

    I don’t know off hand, I’ve asked another person to have a look.

    #251687

    Riyad Kalla
    Member

    As it turns out, the only manifests you need MyEclipse will generate for you using the MyEclipse > New Module Manifests command.

    #251692

    Curt King
    Participant

    Great — thanks!

    Curt

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: NoSuchMethodError

You must be logged in to post in the forum log in