Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

NoSuchMethodError when using security api

Posted on 2009-07-07
4
Medium Priority
?
2,536 Views
Last Modified: 2013-12-29
Hi, I am getting this error:

java.lang.NoSuchMethodError: org.apache.xpath.compiler.FunctionTable.installFunction(Ljava/lang/String;Lorg/apache/xpath/Expre

ssion;)I

        at org.apache.xml.security.Init.init(Init.java:215)

        at org.apache.ws.security.WSSConfig.<init>(WSSConfig.java:72)

        at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:95)

        at org.apache.ws.security.WSSConfig.<clinit>(WSSConfig.java:47)

        at org.apache.ws.security.WSSecurityEngine.<clinit>(WSSecurityEngine.java:51)

        at org.apache.ws.security.handler.WSHandler.<clinit>(WSHandler.java:62)

       
********************************

I have xalan 2.6 in my classpath. Any idea how can I fix this error? I am working on Solaris.

Thanks
0
Comment
Question by:LeoKris
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 24799462
Check that you are passing correct parameters to installFunction:
http://xml.apache.org/xalan-j/apidocs/org/apache/xpath/compiler/FunctionTable.html

It's signature is: installFunction(java.lang.String name, java.lang.Class func)

As you can see it should be a string and then a class, not org.apache.xpath.Expression type.  You can try calling the .getClass() method of your org.apache.xpath.Expression variable.
0
 

Author Comment

by:LeoKris
ID: 24800013
Thanks mwvisa1. But Xalan-2.6.0 has over-ridden installFunction methods as :

1) installFunction(String, Expression). This one matches with the call we are making.

2) installFunction(Expression , int)

What you are talking about is in Xalan-2.7.1. I am working on 2.6.0.


0
 
LVL 26

Expert Comment

by:ksivananth
ID: 24801121
looks like a different version of the XPath library precedes the intended version in CLASSPATH!
how do you run the application?
0
 
LVL 6

Accepted Solution

by:
jwenting earned 1500 total points
ID: 24801548
If there's another version on your classpath that takes precedence the 2.6 will never be used.

And if you're running (for example) from an application server the system classpath will be completely ignored so it doesn't matter one bit what you put on it.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question