File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Compilation error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compilation error" Watch "Compilation error" New topic
Author

Compilation error

Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Hi,
i am getting error "org.apache.xpath: cannot be resolved".
Even i added xalan-2.7.1.jar file in required location and it is not corrupted.
I could not find the reason for that.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Is it possible that you try to use a package name as a class name?
Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Ivan Jozsef Balazs wrote:Is it possible that you try to use a package name as a class name?

Thanks, i used as "org.apache.xpath.XPathAPI.selectNodeList() ".
Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Mani Raju wrote:
Ivan Jozsef Balazs wrote:Is it possible that you try to use a package name as a class name?

Thanks, i used as "org.apache.xpath.XPathAPI.selectNodeList() ".
In this case i am getting error.

Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Mani Raju wrote:
Mani Raju wrote:
Ivan Jozsef Balazs wrote:Is it possible that you try to use a package name as a class name?

Thanks, i used as "org.apache.xpath.XPathAPI.selectNodeList() ".
In this case i am getting error.


I could not find the reason for "org.apache.xpath : can not be resolved".
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Can you show us the exact line of code where the error happens? And the exact error message (copy & paste the output of the compiler)?

Are you sure the types of the arguments that you pass to the method match exactly what the method expects? Are you sure that you have the JAR file that contains the package / class / method in the classpath?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Mani Raju
Ranch Hand

Joined: Oct 09, 2012
Posts: 46
Jesper de Jong wrote:Can you show us the exact line of code where the error happens? And the exact error message (copy & paste the output of the compiler)?

Are you sure the types of the arguments that you pass to the method match exactly what the method expects? Are you sure that you have the JAR file that contains the package / class / method in the classpath?


Thanks, nodeLs = org.apache.xpath.XPathAPI.selectNodeList(document.getFirstChild(),xpath);
In this line i am getting error.
Arguments passed correctly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compilation error
 
Similar Threads
Tomcat & MS Active Directory
JDK 7 build fails
i have a Errors in Hibernate Query
ServletContext
File not found error