473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Xindice / Java problem

Hallo,

please excuse if I violate any group etiquette etc. but I am not very
experienced both regarding the usenet and your group.

I have installed Xindice, integrated into Tomcat, and can use it via the
command line tools provided without problems. Yet when I try to access
the database within a Java program I get the following error:

trying to register database
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xmlrpc/XmlRpcException
at
org.apache.xindice.client.xmldb.xmlrpc.DatabaseImp l.getCollection(DatabaseImpl.java:354)
at
org.apache.xindice.client.xmldb.DatabaseImpl.getCo llection(DatabaseImpl.java:137)
at org.xmldb.api.DatabaseManager.getCollection(Unknow n Source)
at org.xmldb.api.DatabaseManager.getCollection(Unknow n Source)
at
com.plaengine.repository.util.XmlDbBootstrap.creat eCollection(XmlDbBootstrap.java:55)
at
com.plaengine.repository.util.XmlDbBootstrap.main( XmlDbBootstrap.java:87)

The class XmlDbBootstrap uses code from the Xindice Website programming
tutorial which should create a new collection within the standard root
collection 'db'. The relevant piece of code is:

String driver = "org.apache.xindice.client.xmldb.DatabaseImpl" ;
Class c = Class.forName(driver);
Database database = (Database)
c.newInstance();DatabaseManager.registerDatabase(d atabase);
String uri = "xmldb:xindice://localhost:8080/db";
col = DatabaseManager.getCollection(uri);

The last line is exactly the point where I get the exception / crash and
I simply cannot figure out where the problem is. When I am using the
exact URI from the command line everything works out flawlessly.
Are there any known bugs or pitfalls regarding Xindice or the xml:db
interface, or can you think of anything I have done wrong?
Any help is more than welcome.

Thanks in advance,
Christian

For software versions, I have installed:
OS: Mac OS 10.3 (Panther)
Tomcat 5.0.27
Xindice 1.1b4

If you reply to me directly, please delete the 'NOSPAM.' from my adress.
Jul 20 '05 #1
1 2450
Christian W. Guenther wrote:
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/xmlrpc/XmlRpcException interface, or can you think of anything I have done wrong?
Any help is more than welcome.


Learn to interprete Error Messages ;o) Thats the only importend issue.

java.lang.NoClassDefFoundError => The Classloader was not able to find
one required class. In detail: he was not able to find
org.apache.xmlrpc.XmlRpcException

So just add the required class to the classpath. In most cases such
classes will be stored inside jar files. It is necessary to add such jar
files explicitly.

for example:
-cp ./xmlrpc.jar

hth
cybi
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ren, Ziheng | last post by:
Hi, i have already found a xindice based java gui. but it appears always a big problem from the xupdate functions. If i tip some commands in and try to execute them, it will appear an exception,...
0
by: toplure | last post by:
Hi, I have few days of experince with Xindice 1.1b and I am sure my problem is pretty much as basic as they come but I cannot work it out, so I hope someone will take pity on me - please! I have...
0
by: Richard | last post by:
Hello! I have 2 questions regarding Xindice (http://xml.apache.org/xindice/): 1) Does anyone know how to set the encoding??? Normaly im using encoding="iso-8859-1" in my xml-files, this...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.