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 grenoml <gr...@yahoo.com> on 2002/11/06 09:33:59 UTC
XML:DB Exception occured 5 0
Does anyone know what this db exception is?:
XML:DB Exception occured 5 0
XML:DB API is refusing to establish a client
connection and I cannot decode this error.
Any help would be appreciated.
Thanks.
G.Reno
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
Re: XML:DB Exception occured 5 0
Posted by grenoml <gr...@yahoo.com>.
Terry,
Thanks. I'll try the CVS version. Also, is there
a list of the error codes somewhere? I checked the
ErrorCodes class javadoc and I see the defines, but
how do I know what they are defined as numerically?
Is this in a doc somewhere?
Thanks,
Gerry Reno
--- Terry Rosenbaum <Te...@amicas.com> wrote:
> 5 means INVALID_URI
>
> I presume that you are still using the 1.0 version
> of xindice.
>
> When connecting to the server on the localhost and
> using the default
> port (4080), you need not specify the host/port.
>
> Try "xmldb:xindice:///db/addressbook" which would be
> equivalent to
> "xmldb:xindice://localhost:4080/db/addressbook".
> This information is in the developer's guide that
> comes with
> Xindice 1.0. Look for DevelopersGuide.html in the
> docs directory.
>
> The URI "Xindice://localhost:4080/db/addressbook" is
> likely incorrect.
>
> Anyway, I strongly recommend that you try the latest
> CVS version instead --
> it works much better.
>
> -Terry
>
> grenoml wrote:
>
> >--- grenoml <gr...@yahoo.com> wrote:
> >
> >
> >>Does anyone know what this db exception is?:
> >>XML:DB Exception occured 5 0
> >>
> >>XML:DB API is refusing to establish a client
> >>connection and I cannot decode this error.
> >>
> >>Any help would be appreciated.
> >>
> >>Thanks.
> >>
> >>G.Reno
> >>
> >>
> >>
> >Here is the code section:
> >
> > try {
> > String driver =
> >"org.apache.xindice.client.xmldb.DatabaseImpl";
> > Class c = Class.forName(driver);
> >
> > Database database = (Database)
> >c.newInstance();
> >
> DatabaseManager.registerDatabase(database);
> > col =
>
>DatabaseManager.getCollection("Xindice://localhost:4080/db/addressbook");
> >
> > String xupdatedoc = "<xu:modifications
> >version=\"1.0\"" +
> > "
> >xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
> > " <xu:remove
> >select=\"/person/phone[@type = 'home']\"/>" +
> > " <xu:update
> >select=\"/person/phone[@type = 'work']\">" +
> > " 480-300-3003" +
> > " </xu:update>" +
> > "</xu:modifications>";
> >
> > XUpdateQueryService service =
> > (XUpdateQueryService)
> >col.getService("XUpdateQueryService", "1.0");
> > service.update(xupdatedoc);
> > }
> > catch(ClassNotFoundException e)
> > {
> >
> System.err.println("ClassNotFoundException
> >occured " + e);
> > e.printStackTrace();
> > } catch (XMLDBException e) {
> > System.err.println("XML:DB Exception
> occured
> >" + e.errorCode + " " + e.vendorErrorCode + " " +
> >e.getMessage() );
> > }
> > finally {
> > if (col != null) {
> > col.close();
> > }
> > }
> >
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >HotJobs - Search new jobs daily now
> >http://hotjobs.yahoo.com/
> >
> >
>
>
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
Re: XML:DB Exception occured 5 0
Posted by Terry Rosenbaum <Te...@amicas.com>.
5 means INVALID_URI
I presume that you are still using the 1.0 version of xindice.
When connecting to the server on the localhost and using the default
port (4080), you need not specify the host/port.
Try "xmldb:xindice:///db/addressbook" which would be
equivalent to "xmldb:xindice://localhost:4080/db/addressbook".
This information is in the developer's guide that comes with
Xindice 1.0. Look for DevelopersGuide.html in the docs directory.
The URI "Xindice://localhost:4080/db/addressbook" is likely incorrect.
Anyway, I strongly recommend that you try the latest CVS version instead --
it works much better.
-Terry
grenoml wrote:
>--- grenoml <gr...@yahoo.com> wrote:
>
>
>>Does anyone know what this db exception is?:
>>XML:DB Exception occured 5 0
>>
>>XML:DB API is refusing to establish a client
>>connection and I cannot decode this error.
>>
>>Any help would be appreciated.
>>
>>Thanks.
>>
>>G.Reno
>>
>>
>>
>Here is the code section:
>
> try {
> String driver =
>"org.apache.xindice.client.xmldb.DatabaseImpl";
> Class c = Class.forName(driver);
>
> Database database = (Database)
>c.newInstance();
> DatabaseManager.registerDatabase(database);
> col =
>DatabaseManager.getCollection("Xindice://localhost:4080/db/addressbook");
>
> String xupdatedoc = "<xu:modifications
>version=\"1.0\"" +
> "
>xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
> " <xu:remove
>select=\"/person/phone[@type = 'home']\"/>" +
> " <xu:update
>select=\"/person/phone[@type = 'work']\">" +
> " 480-300-3003" +
> " </xu:update>" +
> "</xu:modifications>";
>
> XUpdateQueryService service =
> (XUpdateQueryService)
>col.getService("XUpdateQueryService", "1.0");
> service.update(xupdatedoc);
> }
> catch(ClassNotFoundException e)
> {
> System.err.println("ClassNotFoundException
>occured " + e);
> e.printStackTrace();
> } catch (XMLDBException e) {
> System.err.println("XML:DB Exception occured
>" + e.errorCode + " " + e.vendorErrorCode + " " +
>e.getMessage() );
> }
> finally {
> if (col != null) {
> col.close();
> }
> }
>
>
>
>__________________________________________________
>Do you Yahoo!?
>HotJobs - Search new jobs daily now
>http://hotjobs.yahoo.com/
>
>
Re: XML:DB Exception occured 5 0
Posted by grenoml <gr...@yahoo.com>.
--- grenoml <gr...@yahoo.com> wrote:
> Does anyone know what this db exception is?:
> XML:DB Exception occured 5 0
>
> XML:DB API is refusing to establish a client
> connection and I cannot decode this error.
>
> Any help would be appreciated.
>
> Thanks.
>
> G.Reno
>
Here is the code section:
try {
String driver =
"org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
Database database = (Database)
c.newInstance();
DatabaseManager.registerDatabase(database);
col =
DatabaseManager.getCollection("Xindice://localhost:4080/db/addressbook");
String xupdatedoc = "<xu:modifications
version=\"1.0\"" +
"
xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
" <xu:remove
select=\"/person/phone[@type = 'home']\"/>" +
" <xu:update
select=\"/person/phone[@type = 'work']\">" +
" 480-300-3003" +
" </xu:update>" +
"</xu:modifications>";
XUpdateQueryService service =
(XUpdateQueryService)
col.getService("XUpdateQueryService", "1.0");
service.update(xupdatedoc);
}
catch(ClassNotFoundException e)
{
System.err.println("ClassNotFoundException
occured " + e);
e.printStackTrace();
} catch (XMLDBException e) {
System.err.println("XML:DB Exception occured
" + e.errorCode + " " + e.vendorErrorCode + " " +
e.getMessage() );
}
finally {
if (col != null) {
col.close();
}
}
__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/