• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoSuchMethodError.

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm completely stumped on the cause of this error. Well not completely, I'm on to it but very confused.
I've got to daisy chain two services.
someclient->>ServiceA->>ServiceB->>Oracle

SeviceB is up and working. I write clients to it all day long no problem. Junit tested the crap out of it and it's behaving.

When I deployed ServiceA, whose only purpose is to pass the message along, that's where I run into trouble. The problem I believe is with ServiceA.

Service A is a client of serviceB. ServiceA is also a web service itself. I can invoke the ServiceA's client code (client code to serviceB) with a MAIN method on serviceA and get back successful messages. However when I deploy ServiceA and write a test client to serviceA I'm getting the following error.


ServiceA is dying when it tries to get the port so it can communicate with serviceB. I checked the logs for serviceB and nothing shows so the request isn't making it there.

Here's what I know, the missing method, messageName(), is indeed not there. The question I have is why?
I check the library inside of netbeans and the method is not there. I'm using the metro library. However, when I browse to that jar (C:\Program Files\NetBeans 6.9.1\enterprise\modules\ext\metro\webservices-api.jar) and decompile the class, the method is there. My question is how can Netbeans 6.9.1 be pulling the incorrect jar into my application?

I'm running tomcat 6.0. I searched my entire hard drive and found the jar here, C:\Sun\AppServer\lib\endorsed\webservices-api.jar, which doesn't have that method either so I renamed it with a .old extension and put what I believed the correct version would be in its place but I"m having the same issue.

Suggestions?



 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, whatever is part of the NetBeans installation has no impact on Tomcat at runtime.

And "C:\Sun\AppServer" doesn't sound like it has anything to do with Tomcat, either.

If you're using Java 6, then that comes with its own version of JAX-WS (and thus javax.xml.ws.WebFault), which in all likelihood is older than the Metro version you're using, and possibly incompatible. See "Running latest JAXWS RI on JDK6" in http://weblogs.java.net/blog/vivekp/archive/2006/12/webservices_in.html for how to fix that.
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Well, whatever is part of the NetBeans installation has no impact on Tomcat at runtime.



I guess that means Tomcat is giving me the jdk version of the jar and not the one I packaged with the war file?
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's a possibility; the JRE version would take precedence over the war file unless the described fix was applied.
 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lester,

I went through the information on that link. The Endorsed Directory Mechanism link is broken however
I looked at a few other pages that talked about this and although not directly related to this specific jar, they all seemed to suggest that the new version of the jar needs to be placed in the following directory.
C:\Program Files\Java\jdk1.6.0_16\jre\lib\endorsed
So as per what I read, I gave that the ole college try. I'm experiencing the exact same issue. You wouldn't happen to have another link to the Endorsed Directory Mechanism would you?

 
Kevin Eddy
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
YAY!! I got it going. I needed to put the lib in the tomcat endorsed directory! Thanks Lester for getting me pointed in the right direction! Most appreciated.

Kevin.
 
Ranch Hand
Posts: 701
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people,

I'm facing the same problem, but the folder "jdk1.6.0_26\jre\lib" has no "endorsed" folder inside. Should I create one?
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rogerio, Never put anything in the jdk/jre libs. One of more updates and you're toast.

The poster referred to tomcat/lib/endorsed (JBoss has something similar too).

That's where you would place trusted jars for access by all webapps.

Pat.
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic