You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Vijaya K Dasari <vj...@hotmail.com> on 2003/06/26 21:51:27 UTC

Starting xindice from a Swing Application

Hi All,

I am using xindice for a client (swing based) application. I have to start
the xindice server at the startup time of the swing application. I tried to
start the application by creating a new Instance of the Kernel object.

kernel = new Kernel(pathto_system.xml);

The database and htpp server are started properly and i am able to use all
the basic commands.
But i am getting a ClassCastException when trying to use any XUPDATE

DEBUG>
java.lang.ClassCastException
 at
org.apache.xindice.core.xupdate.XObjectImpl.nodeset(XObjectImpl.java:105)
 at
org.xmldb.xupdate.lexus.commands.CommandObject.selectNodes(CommandObject.jav
a:139)
 at
org.xmldb.xupdate.lexus.commands.UpdateCommand.execute(UpdateCommand.java:10
4)
 at
org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:153)
 at
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execute(XU
pdateQueryResolver.java:163)
 at
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResol
ver.java:106)
 at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
 at org.apache.xindice.core.Collection.queryDocument(Collection.java:867)
 at
org.apache.xindice.client.corba.CollectionServant.queryDocument(CollectionSe
rvant.java:451)
 at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
355)
 at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
 at
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75
0)
 at
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467)
 at
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14
10)
 at org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77)
 at
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557
)

Is there any other way to start the server from an application ..

Thanks in advance,
krishna.

Re: Starting xindice from a Swing Application

Posted by Krishna <vj...@hotmail.com>.
Hi,

That works fine.

Thanks,
Krishna.
----- Original Message -----
From: "onno" <on...@onnos.com>
To: <xi...@xml.apache.org>
Sent: Friday, June 27, 2003 12:46 AM
Subject: Re: Starting xindice from a Swing Application


> Seems you are using an old version...
>
> Look for this 'bug' in the archives it's been posted many times.
>
> It can easily be fixed.
>
> you can also download the updated jar from my site
>
> http://www.onnos.com/xindice.jar
>
> this is Xindice 1.0 jar with the bug fixed...
>
> ----- Original Message -----
> From: "Vijaya K Dasari" <vj...@hotmail.com>
> To: <xi...@xml.apache.org>
> Sent: Thursday, June 26, 2003 8:51 PM
> Subject: Starting xindice from a Swing Application
>
>
> > Hi All,
> >
> > I am using xindice for a client (swing based) application. I have to
start
> > the xindice server at the startup time of the swing application. I tried
> to
> > start the application by creating a new Instance of the Kernel object.
> >
> > kernel = new Kernel(pathto_system.xml);
> >
> > The database and htpp server are started properly and i am able to use
all
> > the basic commands.
> > But i am getting a ClassCastException when trying to use any XUPDATE
> >
> > DEBUG>
> > java.lang.ClassCastException
> >  at
> >
org.apache.xindice.core.xupdate.XObjectImpl.nodeset(XObjectImpl.java:105)
> >  at
> >
>
org.xmldb.xupdate.lexus.commands.CommandObject.selectNodes(CommandObject.jav
> > a:139)
> >  at
> >
>
org.xmldb.xupdate.lexus.commands.UpdateCommand.execute(UpdateCommand.java:10
> > 4)
> >  at
> >
org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:153)
> >  at
> >
>
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execute(XU
> > pdateQueryResolver.java:163)
> >  at
> >
>
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResol
> > ver.java:106)
> >  at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
> >  at
org.apache.xindice.core.Collection.queryDocument(Collection.java:867)
> >  at
> >
>
org.apache.xindice.client.corba.CollectionServant.queryDocument(CollectionSe
> > rvant.java:451)
> >  at
> >
>
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
> > 355)
> >  at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
> >  at
> >
>
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75
> > 0)
> >  at
> >
>
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467)
> >  at
> >
>
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14
> > 10)
> >  at
> org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77)
> >  at
> >
>
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557
> > )
> >
> > Is there any other way to start the server from an application ..
> >
> > Thanks in advance,
> > krishna.
>
>

Re: Starting xindice from a Swing Application

Posted by onno <on...@onnos.com>.
Seems you are using an old version...

Look for this 'bug' in the archives it's been posted many times.

It can easily be fixed.

you can also download the updated jar from my site

http://www.onnos.com/xindice.jar

this is Xindice 1.0 jar with the bug fixed...

----- Original Message -----
From: "Vijaya K Dasari" <vj...@hotmail.com>
To: <xi...@xml.apache.org>
Sent: Thursday, June 26, 2003 8:51 PM
Subject: Starting xindice from a Swing Application


> Hi All,
>
> I am using xindice for a client (swing based) application. I have to start
> the xindice server at the startup time of the swing application. I tried
to
> start the application by creating a new Instance of the Kernel object.
>
> kernel = new Kernel(pathto_system.xml);
>
> The database and htpp server are started properly and i am able to use all
> the basic commands.
> But i am getting a ClassCastException when trying to use any XUPDATE
>
> DEBUG>
> java.lang.ClassCastException
>  at
> org.apache.xindice.core.xupdate.XObjectImpl.nodeset(XObjectImpl.java:105)
>  at
>
org.xmldb.xupdate.lexus.commands.CommandObject.selectNodes(CommandObject.jav
> a:139)
>  at
>
org.xmldb.xupdate.lexus.commands.UpdateCommand.execute(UpdateCommand.java:10
> 4)
>  at
> org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:153)
>  at
>
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execute(XU
> pdateQueryResolver.java:163)
>  at
>
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResol
> ver.java:106)
>  at org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
>  at org.apache.xindice.core.Collection.queryDocument(Collection.java:867)
>  at
>
org.apache.xindice.client.corba.CollectionServant.queryDocument(CollectionSe
> rvant.java:451)
>  at
>
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
> 355)
>  at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
>  at
>
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75
> 0)
>  at
>
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467)
>  at
>
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14
> 10)
>  at
org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77)
>  at
>
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557
> )
>
> Is there any other way to start the server from an application ..
>
> Thanks in advance,
> krishna.