You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Dave Viner <dv...@yahoo-inc.com> on 2002/11/22 03:28:41 UTC

odd tomcat/xindice behavior

Hi,
	I'm trying to write a new XMLRPC handler for Xindice.  I made a simple test
to try it out.  Here's the class:

package org.apache.xindice.server.rpc.messages;
import org.apache.xindice.server.rpc.RPCDefaultMessage;
import java.util.Hashtable;
public class SimpleTest extends RPCDefaultMessage {
   public Hashtable execute(Hashtable message) throws Exception {
      Hashtable result = new Hashtable();
      result.put( RESULT, "hello there. I'm simple test." );
      return result;
   }
}

I added this to war file.  I verified it was in the war file by running:

%JAVA_HOME%\bin\jar -tf ..\webapps\xindice-1.1b.war

and sure enough, it eventually output:

WEB-INF/classes/org/apache/xindice/server/rpc/messages/SimpleTest.class

Then I made a short perl script to test it out:

#!/usr/local/bin/perl -w

use strict;
use Frontier::Client;
use Data::Dumper;

my($server,$result,$url);

$url = 'http://localhost:8080/xindice-1.1b';
print "Hello World!\n";
$server = Frontier::Client->new('url'=>$url,'debug'=>0);

$result = listColl($server,'/db');
print "\nresult returned:\n";
print Dumper($result);
#exit;

$result = tester($server);
print Dumper($result);
exit;

sub tester
{
	my($server) = @_;
	my $args = {};
	$args->{'message'} = 'SimpleTest';
	return $server->call('run',$args);
}

## list collections
sub listColl
{
	my($server,$name) = @_;
	my $args = {};
	$args->{'message'} = 'ListCollections';
	$args->{'collection'} = $name;
	return $server->call('run',$args);
}


This calls the ListCollections function perfectly, but the whole output
looks like:

D:\xindice>perl c:\xi.pl
Hello World!

result returned:
$VAR1 = {
          'result' => [
                        'firstmetatest',
                        'nometatest',
                        'system',
                        'meta'
                      ]
        };
Fault returned from XML RPC Server, fault code 0: java.lang.Exception:
java.lang
.ClassNotFoundException: org.apache.xindice.server.rpc.messages.SimpleTest

D:\xindice>

How is it that the SimpleTest class isn't found if it's in the war file?

I tried going to Tomcat's Web Application Manager and "Reload"-ing xindice.
And starting and stopping Tomcat.

Is there something that I'm missing?

thanks
dave viner


Re: Xindice latest version

Posted by "Vladimir R. Bossicard" <vl...@apache.org>.
> Can you make Xindice latest version available as a zip file so that users
> (like me) that can't access the CVS repository can use their browsers to
> download it ?

I put the version of today on <http://cvs.apache.org/~vladimir/>.  We 
hope to have a nightly build soon.

-Vladimir

-- 
Vladimir R. Bossicard
Apache Xindice - http://xml.apache.org/xindice



Xindice latest version

Posted by CANDAT Jerome <je...@c-s.fr>.
Hello,

I've tested and succesfully used the Xindice 1.0 version in a prototype and
I was wondering what has changed.
I'm then interested in testing Xindice with the new improvements you have
developed. I would like to participate but have no time for that. The only I
can do (and will do) is promote the technology in the prototype/products we
develop.

My problem is that I can't access the CVS repository since the
proxy/firewall of my company is blocking the port 2401 !! And of course
there are no ways that this will change.

Can you make Xindice latest version available as a zip file so that users
(like me) that can't access the CVS repository can use their browsers to
download it ?


Thanks in advance,
Jérôme.


PS : Sorry for my english ;-). Always try to make better.