By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,761 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

Xindice / Java problem

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.