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 Jonathan Melhuish <j....@signal.qinetiq.com> on 2004/04/19 15:24:47 UTC
Xindice 1.0 -> 1.1 upgrade problem
I've changed the driver references to
"org.apache.xindice.client.xmldb.embed.DatabaseImpl", as per the upgrade
notes on the Wiki:
http://wiki.apache.org/xindice/UpgradeTo11EmbedNotes
However, I get the following error when trying to run a JSP page (on
Tomcat) that tries to access the database:
"Could not locate Xindice driver class! Ensure the necessary jars are on
your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a good guess"
Aha, I think, that's because the JAR files in the project's
"WEB-INF/lib" directory are still those for 1.0, not for 1.1. So I
replace them with the contents of the "WEB-INF/lib" directory of the
xindice directory (unpacked from a WAR), but to no avail. I also tried
copying the JARs from a Xindice 1.1 source tarball, but with the same error.
Any ideas, anyone?
Cheers,
Jon
Re: Xindice 1.0 -> 1.1 upgrade problem
Posted by Jonathan Melhuish <j....@signal.qinetiq.com>.
Vadim Gritsenko wrote:
> Jonathan Melhuish wrote:
>
>> Vadim Gritsenko wrote:
>>
>>> Jonathan Melhuish wrote:
>>>
>>>> "Could not locate Xindice driver class! Ensure the necessary jars
>>>> are on your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a
>>>> good guess"
>>>
>>>
>>>
>>>
>>> Add to your JSP:
>>>
>>> <%= new org.apache.xindice.client.xmldb.embed.DatabaseImpl() %>
>>>
>>> If it fails you'll know that classpath is the problem. You have to
>>> have xindice-*.jar and all xmldb-*.jar's in WEB-INF/lib of your webapp.
>>
>>
>>
>> Thanks, that was indeed the problem. I didn't realise that, even if
>> you've already installed the WAR, you still have to:
>
>
>
> If you have installed WAR file, it means that you have an
> xindice-*.jar in the tomcat/webapps/xindice/WEB-INF/lib folder. If you
> are trying to write JSP connecting to this xindice server, and this
> JSP resides in *another* web application - then you have to copy
> xindice-*.jar file there too, so you have client classes.
>
> Hope it clears up the issue.
Yes, that makes sense, thanks!
As soon as I've actually got it working, I'll put a quick page up on the
Wiki...
Cheers,
Jon
Re: Xindice 1.0 -> 1.1 upgrade problem
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Jonathan Melhuish wrote:
> Vadim Gritsenko wrote:
>
>> Jonathan Melhuish wrote:
>>
>>> "Could not locate Xindice driver class! Ensure the necessary jars
>>> are on your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a
>>> good guess"
>>
>>
>>
>> Add to your JSP:
>>
>> <%= new org.apache.xindice.client.xmldb.embed.DatabaseImpl() %>
>>
>> If it fails you'll know that classpath is the problem. You have to
>> have xindice-*.jar and all xmldb-*.jar's in WEB-INF/lib of your webapp.
>
>
> Thanks, that was indeed the problem. I didn't realise that, even if
> you've already installed the WAR, you still have to:
If you have installed WAR file, it means that you have an xindice-*.jar
in the tomcat/webapps/xindice/WEB-INF/lib folder. If you are trying to
write JSP connecting to this xindice server, and this JSP resides in
*another* web application - then you have to copy xindice-*.jar file
there too, so you have client classes.
Hope it clears up the issue.
> * Download and extract the source tarball
> * Run "build"
> * Copy the resulting xindice.jar from "dist" to the webapp's "lib"
> directory
You can get xindice.jar from war dist also; no need to build new one.
> I don't quite understand why this is necessary.
>
> I think the current migration notes on the Wiki are a little confusing
> if you are trying to install a release version (from a WAR file, for
> example). Should I write a "migrating to a stable 1.1 release" how-to?
Go ahead. All help is welcome.
Vadim
Re: Xindice 1.0 -> 1.1 upgrade problem
Posted by Murray Altheim <m....@open.ac.uk>.
Jonathan Melhuish wrote:
> Vadim Gritsenko wrote:
>
>
>>Jonathan Melhuish wrote:
>>
>>
>>>"Could not locate Xindice driver class! Ensure the necessary jars are
>>>on your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a good
>>>guess"
>>
>>
>>Add to your JSP:
>>
>> <%= new org.apache.xindice.client.xmldb.embed.DatabaseImpl() %>
>>
>>If it fails you'll know that classpath is the problem. You have to
>>have xindice-*.jar and all xmldb-*.jar's in WEB-INF/lib of your webapp.
>
>
> Thanks, that was indeed the problem. I didn't realise that, even if
> you've already installed the WAR, you still have to:
>
> * Download and extract the source tarball
> * Run "build"
> * Copy the resulting xindice.jar from "dist" to the webapp's "lib"
> directory
>
> I don't quite understand why this is necessary.
>
> I think the current migration notes on the Wiki are a little confusing
> if you are trying to install a release version (from a WAR file, for
> example). Should I write a "migrating to a stable 1.1 release" how-to?
Jon,
Well, they were written explicitly for the embedded version, so it
would be great to have some documentation about using the WAR file.
Have at it! All improvements in the documentation are welcome...
Murray
......................................................................
Murray Altheim http://kmi.open.ac.uk/people/murray/
Knowledge Media Institute
The Open University, Milton Keynes, Bucks, MK7 6AA, UK .
Sonia, 6 yrs old, from Guatamala.
Talents: Singing. Favorite Pastime: Playing with dolls.
Languages spoken: Cakchiquel. Lives with parents.
Number of Siblings: 8 Family's Monthly Income: $61.00
How much have you spent on coffee in the past year?
http://www.children.org/childDetail.asp?id=874380&sid=624BF46E-FD31-44CA-9B34-69D60E313258
Re: Xindice 1.0 -> 1.1 upgrade problem
Posted by Jonathan Melhuish <j....@signal.qinetiq.com>.
Vadim Gritsenko wrote:
> Jonathan Melhuish wrote:
>
>> "Could not locate Xindice driver class! Ensure the necessary jars are
>> on your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a good
>> guess"
>
>
> Add to your JSP:
>
> <%= new org.apache.xindice.client.xmldb.embed.DatabaseImpl() %>
>
> If it fails you'll know that classpath is the problem. You have to
> have xindice-*.jar and all xmldb-*.jar's in WEB-INF/lib of your webapp.
Thanks, that was indeed the problem. I didn't realise that, even if
you've already installed the WAR, you still have to:
* Download and extract the source tarball
* Run "build"
* Copy the resulting xindice.jar from "dist" to the webapp's "lib"
directory
I don't quite understand why this is necessary.
I think the current migration notes on the Wiki are a little confusing
if you are trying to install a release version (from a WAR file, for
example). Should I write a "migrating to a stable 1.1 release" how-to?
Cheers,
Jon
Re: Xindice 1.0 -> 1.1 upgrade problem
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Jonathan Melhuish wrote:
> I've changed the driver references to
> "org.apache.xindice.client.xmldb.embed.DatabaseImpl", as per the
> upgrade notes on the Wiki:
>
> http://wiki.apache.org/xindice/UpgradeTo11EmbedNotes
>
> However, I get the following error when trying to run a JSP page (on
> Tomcat) that tries to access the database:
>
> "Could not locate Xindice driver class! Ensure the necessary jars are
> on your classpath: xindice.jar, xmldb.jar, xmldb-sdk.jar is a good guess"
>
> Aha, I think, that's because the JAR files in the project's
> "WEB-INF/lib" directory are still those for 1.0, not for 1.1. So I
> replace them with the contents of the "WEB-INF/lib" directory of the
> xindice directory (unpacked from a WAR), but to no avail. I also
> tried copying the JARs from a Xindice 1.1 source tarball, but with the
> same error.
>
> Any ideas, anyone?
Add to your JSP:
<%= new org.apache.xindice.client.xmldb.embed.DatabaseImpl() %>
If it fails you'll know that classpath is the problem. You have to have
xindice-*.jar and all xmldb-*.jar's in WEB-INF/lib of your webapp.
Vadim
Re: Exceptions
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Wojtek wrote:
>So I have to upgrade my Xindice to 1.1 . Where can I find some tips about
>upgrading from 1.0 to 1.1 ?
>
>
Try mail list archives
http://marc.theaimsgroup.com/?l=xindice-users
http://marc.theaimsgroup.com/?l=xindice-dev
And Wiki
http://wiki.apache.org/xindice/UpgradeTo11EmbedNotes
Vadim
Re: Exceptions
Posted by Wojtek <vi...@gazeta.pl>.
----- Original Message -----
From: "Vadim Gritsenko" <va...@reverycodes.com>
To: <xi...@xml.apache.org>
Sent: Tuesday, April 20, 2004 6:24 PM
Subject: Re: Exceptions
> Wojtek wrote:
>
> >Hello,
> >does anybody know what do the following exceptions mean? I have no idea
why
> >my Xindice 1.0 is falling down from time to time. It runs as a
standalone,
> >simultaneously runs Cocoon 2.1 on Tomcat.
> >
> >
>
> Check the source code. But even if you find the reason, 1.0 won't get
> patched, only 1.1 currently is maintained.
>
> Vadim
>
>
I don't know where to find the source code of following class. It comes from
openrb1.2.0.jar
org.openorb.net.ServerManagerImpl
So I have to upgrade my Xindice to 1.1 . Where can I find some tips about
upgrading from 1.0 to 1.1 ?
Regards,
Wojtek
Re: Exceptions
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Wojtek wrote:
>Hello,
>does anybody know what do the following exceptions mean? I have no idea why
>my Xindice 1.0 is falling down from time to time. It runs as a standalone,
>simultaneously runs Cocoon 2.1 on Tomcat.
>
>
Check the source code. But even if you find the reason, 1.0 won't get
patched, only 1.1 currently is maintained.
Vadim
>java.lang.NullPointerException
> at
>org.apache.xindice.core.DocumentCache$CacheKey.equals(DocumentCache.java:171
>)
> at java.util.WeakHashMap.eq(WeakHashMap.java:252)
> at java.util.WeakHashMap.get(WeakHashMap.java:344)
> at
>org.apache.xindice.core.DocumentCache.getDocument(DocumentCache.java:79)
> at
>org.apache.xindice.core.Collection.getDocument(Collection.java:711)
> at
>org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(X
>PathQueryResolver.java:1003)
> at
>org.apache.xindice.core.query.XPathQueryResolver$ResultSet.<init>(XPathQuery
>Resolver.java:995)
> at
>org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQue
>ryResolver.java:247)
> at
>org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.ja
>va:151)
> at
>org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
> at
>org.apache.xindice.core.Collection.queryCollection(Collection.java:847)
> at
>org.apache.xindice.client.corba.CollectionServant.queryCollection(Collection
>Servant.java:424)
> at
>org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
>332)
> 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
>)
>
>Regards,
>Wojtek
>
>
>
>
>
Exceptions
Posted by Wojtek <vi...@gazeta.pl>.
Hello,
does anybody know what do the following exceptions mean? I have no idea why
my Xindice 1.0 is falling down from time to time. It runs as a standalone,
simultaneously runs Cocoon 2.1 on Tomcat.
java.lang.NullPointerException
at
org.apache.xindice.core.DocumentCache$CacheKey.equals(DocumentCache.java:171
)
at java.util.WeakHashMap.eq(WeakHashMap.java:252)
at java.util.WeakHashMap.get(WeakHashMap.java:344)
at
org.apache.xindice.core.DocumentCache.getDocument(DocumentCache.java:79)
at
org.apache.xindice.core.Collection.getDocument(Collection.java:711)
at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(X
PathQueryResolver.java:1003)
at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.<init>(XPathQuery
Resolver.java:995)
at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQue
ryResolver.java:247)
at
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.ja
va:151)
at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
at
org.apache.xindice.core.Collection.queryCollection(Collection.java:847)
at
org.apache.xindice.client.corba.CollectionServant.queryCollection(Collection
Servant.java:424)
at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
332)
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
)
Regards,
Wojtek