[Fedora-users] oaiprovider service

14 views
Skip to first unread message

fe...@fedora-commons.org

unread,
Nov 17, 2013, 12:21:36 PM11/17/13
to fedora...@comm.nsdl.org
Hi all:
I´m trying to use the proai service in 2.1 . I set up the proai.properties configuration file. Actually without changes (only I replaced the proai.db.username and proai.db.password to the user root and password for the mysql DB).
I haven´t any problem when starting fedora up.
But when http://localhost:8080/oaiprovider/?verb=Identify Iget the following error:

Estado HTTP 500 -

--------------------------------------------------------------------------------

type Informe de Excepción

mensaje

descripción El servidor encontró un error interno () que hizo que no pudiera rellenar este requerimiento.

excepción

javax.servlet.ServletException: Unable to initialize ProviderServlet
proai.service.ProviderServlet.init(ProviderServlet.java:238)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:110)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)


causa raíz

proai.error.ServerException: Database connection problem
proai.cache.RecordCache.init(RecordCache.java:196)
proai.cache.RecordCache.<init>(RecordCache.java:155)
proai.service.Responder.<init>(Responder.java:45)
proai.service.ProviderServlet.init(ProviderServlet.java:243)
proai.service.ProviderServlet.init(ProviderServlet.java:236)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:110)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
java.lang.Thread.run(Thread.java:534)



The log generated for this get is:
127.0.0.1 - - [08/Feb/2006:21:22:13 +0100] "GET /oaiprovider/?verb=Identify HTTP/1.1" 500 4292

Any help willbe very appreciated.
Saludos
Luis Zorita

____________________________________________
Servicio WebMail de CiberUNED http://www.uned.es



Chris Wilper

unread,
Feb 8, 2006, 5:01:14 PM2/8/06
to lzo...@pas.uned.es, fedora...@comm.nsdl.org

Hi Luis,

This indicates that the proai service had some problem initializing its own connection to the mysql database.

Unfortunately this error doesn't give as much detail as I would expect (there should have been another "causa raíz" section in the stack trace).  If you deployed the oaiprovider on tomcat, you might see a more complete error report in tomcat's logs/catalina*.log  file.

Regardless, here are a few things to check:

1) Does the proai.db.url property point to the correct database?

For example, the following jdbc url points to the mysql instance on the localhost, within which exists a database called "proai".

jdbc:mysql://localhost/proai?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true

2) If so, can you manually use the proai.db.username/password values to log in to the database via some other application (like the mysql command-line)?

3) If so, can this user create a table in the database named in the JDBC url?  Try this manually and see if it works.


Hope this helps,
Chris

_______________________________________________
Fedora-users mailing list
Fedora...@comm.nsdl.org
http://comm.nsdl.org/mailman/listinfo/fedora-users

fe...@fedora-commons.org

unread,
Nov 17, 2013, 12:22:54 PM11/17/13
to cwi...@cs.cornell.edu, fedora...@comm.nsdl.org
Hello Chris:
First of all thanks for your interest.
I hadn´t the problem listed below when using 2.1b.(In fact oaiprovider works in 2,1b version.

Starting Fedora server...
Deploying API-M and API-A...
DEBUG 34:15.554 (RecordCache) Got required property: proai.cacheBaseDir = /tmp/proai/cache
DEBUG 34:15.554 (RecordCache) Got required property: proai.driverClassName = fedora.services.oaiprovider.FedoraOAIDriver
DEBUG 34:15.554 (RecordCache) Got required property: proai.driverPollSeconds = 60
DEBUG 34:15.554 (RecordCache) Got required property: proai.writeLockWait = 60000
DEBUG 34:15.554 (RecordCache) Got required property: proai.db.url = jdbc:mysql://localhost/proai?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true
DEBUG 34:15.554 (RecordCache) Got required property: proai.db.driverClassName = com.mysql.jdbc.Driver
DEBUG 34:15.554 (RecordCache) Got required property: proai.db.username = proai
DEBUG 34:15.554 (RecordCache) Got required property: proai.db.password = proai
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.baseURL = http://localhost:8080/fedora/
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.user = fedoraAdmin
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.pass = fedoraAdmin
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.md.formats = oai_dc test_format formatX formatY
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.md.format.oai_dc.uri = http://www.openarchives.org/OAI/2.0/oai_dc/
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.md.format.oai_dc.loc = http://www.openarchives.org/OAI/2.0/oai_dc.xsd
DEBUG 34:15.634 (FedoraOAIDriver) Required property: driver.fedora.md.format.oai_dc.dissType = info:fedora/*/oai_dc
DEBUG 34:15.634 (FedoraOAIDriver) driver.fedora.md.format.oai_dc.about.dissType = info:fedora/*/about_oai_dc
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.test_format.uri = http://example.org/testFormat/
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.test_format.loc = http://example.org/testFormat.xsd
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.test_format.dissType = info:fedora/*/test_format
DEBUG 34:15.674 (FedoraOAIDriver) driver.fedora.md.format.test_format.about.dissType = null
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatX.uri = http://example.org/formatX/
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatX.loc = http://example.org/formatX.xsd
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatX.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadata?format=x
DEBUG 34:15.674 (FedoraOAIDriver) driver.fedora.md.format.formatX.about.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadataAbout?format=x
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatY.uri = http://example.org/formatY/
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatY.loc = http://example.org/formatY.xsd
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.md.format.formatY.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadata?format=y
DEBUG 34:15.674 (FedoraOAIDriver) driver.fedora.md.format.formatY.about.dissType = info:fedora/*/demo:XYFormatsBDef/getMetadataAbout?format=y
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.identify = http://localhost:8080/fedora/get/demo:MyRepository/Identify.xml
DEBUG 34:15.674 (FedoraOAIDriver) Required property: driver.fedora.queryFactory = fedora.services.oaiprovider.ITQLQueryFactory
DEBUG 34:15.954 (FedoraOAIDriver) Required property: driver.fedora.disseminationConnectionTimeout = 30
DEBUG 34:15.954 (FedoraOAIDriver) Required property: driver.fedora.disseminationSocketTimeout = 120
DEBUG 34:16.04 (FedoraOAIDriver) Required property: driver.fedora.queryConnectionTimeout = 30
DEBUG 34:16.04 (FedoraOAIDriver) Required property: driver.fedora.querySocketTimeout = 600
DEBUG 34:16.04 (FedoraOAIDriver) Required property: driver.fedora.itemID = http://www.openarchives.org/OAI/2.0/itemID
DEBUG 34:16.04 (FedoraOAIDriver) driver.fedora.setSpec = http://www.openarchives.org/OAI/2.0/setSpec
DEBUG 34:16.04 (FedoraOAIDriver) Required property: driver.fedora.setSpec.name = http://www.openarchives.org/OAI/2.0/setName
DEBUG 34:16.04 (FedoraOAIDriver) Required property: driver.fedora.itemSetSpecPath = $item <fedora-rels-ext:isMemberOf> $set $set <http://www.openarchives.org/OAI/2.0/setSpec> $setSpec
DEBUG 34:16.14 (FedoraOAIDriver) driver.fedora.setSpec.desc.dissType = info:fedora/*/SetInfo.xml
DEBUG 34:16.14 (FedoraOAIDriver) driver.fedora.deleted = null
DEBUG 34:16.14 (FedoraOAIDriver) driver.fedora.volatile = null
INFO 34:16.14 (RecordCache) Initializing database connection pool...
DEBUG 34:16.75 (RecordCache) Set connection pool property: password = proai
DEBUG 34:16.75 (RecordCache) Set connection pool property: driverClassName = com.mysql.jdbc.Driver
DEBUG 34:16.75 (RecordCache) Set connection pool property: username = proai
DEBUG 34:16.75 (RecordCache) Set connection pool property: url = jdbc:mysql://localhost/proai?useUnicode=true&amp;characterEncoding=UTF-8&amp;autoReconnect=true
DEBUG 34:16.145 (RecordCache) Got required property: com.mysql.jdbc.Driver.ddlConverter = proai.util.MySQLDDLConverter
INFO 34:16.145 (RecordCache) Initializing Record Cache...
DEBUG 34:16.175 (RecordCache) Record Cache Initialized
INFO 34:16.816 (RecordCache) Checking for update...
DEBUG 34:16.816 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 34:23.105 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:34:22 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
Processing file C:\fedora-2.1-src\dist\server\fedora-internal-use\deploy\deployAPI-A.wsdd
<Admin>Done processing</Admin>
Processing file C:\fedora-2.1-src\dist\server\fedora-internal-use\deploy\deploy.wsdd
<Admin>Done processing</Admin>
Initializing Fedora Server instance...
Fedora Version: 2.1
Fedora Build: 1
Server Host Name: localhost
Server Port: 8080
Debugging: false
Initializing XACML Authorization Module...done
Initializing Triplestore...done
OK
Finished. To stop the server, use fedora-stop.
INFO 35:23.672 (RecordCache) Checking for update...
DEBUG 35:23.672 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 35:23.912 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:35:23 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
INFO 36:24.09 (RecordCache) Checking for update...
DEBUG 36:24.309 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 36:24.449 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:36:24 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
INFO 37:24.536 (RecordCache) Checking for update...
DEBUG 37:24.536 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 37:24.586 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:37:24 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
INFO 38:24.742 (RecordCache) Checking for update...
DEBUG 38:24.742 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 38:24.832 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:38:24 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
INFO 39:25.199 (RecordCache) Checking for update...
DEBUG 39:25.199 (FedoraClient) FedoraClient is getting http://localhost:8080/fedora/describe
WARN 39:25.319 (RecordCache) Unable to update record cache. Will try again in 60 seconds.
proai.error.ServerException: Error getting latest date during update attempt
at proai.cache.RecordCache.update(RecordCache.java:377)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting current date from Fedora
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:66)
at fedora.services.oaiprovider.FedoraOAIDriver.getLatestDate(FedoraOAIDriver.java:126)
at proai.cache.RecordCache.update(RecordCache.java:374)
... 1 more
Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:39:25 GMT) in HTTP response header for http://localhost:8080/fedora/describe
at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)
at fedora.services.oaiprovider.ITQLQueryFactory.latestRecordDate(ITQLQueryFactory.java:61)
... 3 more
INFO 39:33.821 (RecordCache) Waiting for updater/pruner thread to finish...



This is a output from the startup of fedora with aoiprovider service .
In addition the http:http://localhost:8080/oaiprovider/?Verb=Identify output is
<?xml version="1.0" encoding="UTF-8" ?>
- <OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
<responseDate>2006-02-11T08:38:14Z</responseDate>
<request>http://localhost:8080/oaiprovider/</request>
<error code="badArgument">must specify a verb</error>
</OAI-PMH>
but there´s a verb specified

Of course proai(user) is able to create , update , insert ,etc in proai(mysql).database.

The matching tables rcformat,rcadmin,etc were created first time I started the proai service , but no information is recorded inside them.

The OS is currently w2000
Thanks in advance

Chris Wilper

unread,
Feb 13, 2006, 1:24:46 AM2/13/06
to lzo...@pas.uned.es, fedora...@comm.nsdl.org

Hi Luis,

1) The first problem is apparently that the Fedora server's /describe page's http response header "Date:" field isn't being parsed correctly.  But I don't understand why not.  It's in the format that's expected by FedoraClient.java.  I even wrote a test program and copy-pasted your date (Sat, 11 Feb 2006 08:34:22 GMT) and it parsed fine on my machine with the same code used by FedoraClient.  Can you try to run the attached program and see what it does?

Compile it with:

javac ParseDateTest.java

...then run it with:

java -cp . ParseDateTest "Sat, 11 Feb 2006 08:34:22 GMT"

If it's successful (which it is on my machine), it will echo the date back in a different format.  If it's not successful, it will print a stack trace.


2) http://localhost:8080/oaiprovider/?Verb=Identify
   ... the parameter, "verb" needs to be all lowercase (it's not case-insensitive)


- Chris



-----Original Message-----
From: lzo...@pas.uned.es [mailto:lzo...@pas.uned.es]
Sent: Sat 2/11/2006 5:03 AM
To: Chris Wilper
Cc: fedora...@comm.nsdl.org
Subject: [Fedora-users] oaiprovider service

Hello Chris:
First of all thanks for your interest.
I hadn´t the problem listed below when using 2.1b.(In fact oaiprovider works in 2,1b version.

Starting Fedora server...
Deploying API-M and API-A...

...[snipped]...


Caused by: java.io.IOException: Unparsable date (Sat, 11 Feb 2006 08:34:22 GMT) in HTTP response header for http://localhost:8080/fedora/describe
        at fedora.client.FedoraClient.getServerDate(FedoraClient.java:506)


ParseDateTest.java

Luis Zorita

unread,
Feb 13, 2006, 8:15:01 AM2/13/06
to Chris Wilper, fedora...@comm.nsdl.org
Hi Chris:
1.-After some search and research , I found the problem. And it´s related to the language.
I tested with "lun,13 Feb 2006 08:20:00 GMT" and it works (lun stands for mon).
So the solution (at the moment) is:
If you are using fedora with winXP : start-->control panel--> regional configuration and language-->regional options-->standard and formats-->english(USA).
Maybe it works with other choices , but this is the one I tested.

2.- Yes the verb is verb not Verb ( I use to test with repository explorer )
. And now I get the right answer.
Thanks a lot Chris.
Luis Zorita

Chris Wilper wrote:

import java.text.*; import java.util.*; /** * Test whether the date given at the command-line is RFC2616-compatible. * * If successful, print ISO8601-equivalent date. */ public class ParseDateTest { // Usage: java ParseDateTest "Sat, 11 Feb 2006 08:34:22 GMT" public static void main(String[] args) { try { // This is the date format recommended by RFC2616 SimpleDateFormat format = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss z"); format.setTimeZone(TimeZone.getTimeZone("UTC")); Date parsedDate = format.parse(args[0]); format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); format.setTimeZone(TimeZone.getTimeZone("UTC")); System.out.println(format.format(parsedDate)); } catch (Throwable th) { th.printStackTrace(); } } }

Chris Wilper

unread,
Feb 13, 2006, 9:31:57 AM2/13/06
to Luis Zorita, fedora...@comm.nsdl.org
Luis,
 
Thanks for helping to find the cause of this, and for your workaround description.  I was able to reproduce the problem by switching my WinXP locale to a non-english one temporarily.  I've also implemented a more permanent fix for this in FedoraClient.java: see http://phad.lib.virginia.edu/bugs/show_bug.cgi?id=145 for details. 
 
Until a future release, people with the same problem can use your suggested workaround.
 
Thanks again,
Chris
 

From: Luis Zorita [mailto:lzo...@pas.uned.es]
Sent: Monday, February 13, 2006 8:15 AM

To: Chris Wilper
Cc: fedora...@comm.nsdl.org
Subject: Re: [Fedora-users] oaiprovider service

Luis Zorita

unread,
Feb 15, 2006, 8:23:15 AM2/15/06
to fedora...@comm.nsdl.org
Hi all:
I ´m testing the oaprovider servcie using the demo:* examples included.
When I harvested the records with oai_dc metadaprefix I´ve got only 2 (
matching item1 and item2 ) but nothing about item3 or item4
I added a new metadata prefix (DC) and again I got only item1 and
item2 with metadata prefix DC.
Other OAI-PMH verbs work fine.
At the same time I get an error in fedora:
INFO 01:03.572 (RecordCache) Update cycle complete.
WARN 01:03.572 (RecordCache) Unable to update record cache. Will try
again in 60 seconds.
proai.error.ServerException: Error while updating
at proai.cache.RecordCache.update(RecordCache.java:555)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting tuples from
Fedora: Error getting tuple iterator: IOError with xml stream
at
fedora.services.oaiprovider.ITQLQueryFactory.getTuples(ITQLQueryFactory.java:315)
at
fedora.services.oaiprovider.ITQLQueryFactory.listSetInfo(ITQLQueryFactory.java:71)
at
fedora.services.oaiprovider.FedoraOAIDriver.listSetInfo(FedoraOAIDriver.java:134)
at proai.cache.RecordCache.update(RecordCache.java:452)
... 1 more
Caused by: java.io.IOException: Error getting tuple iterator: IOError
with xml stream
at fedora.client.FedoraClient.getTuples(FedoraClient.java:601)
at
fedora.services.oaiprovider.ITQLQueryFactory.getTuples(ITQLQueryFactory.java:313)
... 4 more
INFO 02:03.949 (RecordCache) Checking for update...
DEBUG 02:03.949 (FedoraClient) FedoraClient is getting
http://localhost:8080/fedora/describe
INFO 02:03.999 (FedoraOAIDriver) Current date reported by Fedora is
2006-02-15T13:02:03.000Z
INFO 02:03.999 (RecordCache) An update is needed. Starting...
DEBUG 02:03.999 (RecordCache) Getting 'Identify' xml from remote source...
DEBUG 02:03.999 (FedoraClient) FedoraClient is getting
http://localhost:8080/fedora/get/demo:MyRepository/Identify.xml
DEBUG 02:04.79 (RecordCache) Beginning database transaction
DEBUG 02:04.79 (RecordCache) Updating metadata formats...
DEBUG 02:04.89 (RecordCache) Updating sets...
DEBUG 02:04.89 (FedoraOAIDriver) getTuples() called with query:
DEBUG 02:04.89 (FedoraOAIDriver) select $setSpec $setName
subquery( select $setDiss
from <#ri>
where
$set <http://www.openarchives.org/OAI/2.0/setSpec> $setSpec
and $set <http://www.openarchives.org/OAI/2.0/setName> $setName
and $set <info:fedora/fedora-system:def/view#disseminates> $setDiss
and $setDiss
<info:fedora/fedora-system:def/view#disseminationType>
<info:fedora/*/SetInfo.xml>)
from <#ri>where $set <http://www.openarchives.org/OAI/2.0/setSpec> $setSpec
and $set <http://www.openarchives.org/OAI/2.0/setName> $setName
DEBUG 02:04.89 (FedoraClient) FedoraClient is getting
http://localhost:8080/fedora/risearch?query=select+%24setSpec+%24setName%0A++subquery%28++++select+%24setDiss%0A%09++from+%3C%23ri%3E%0A++++++where%0A++++++%24set+%3Chttp%3A%2F%2Fwww.openarchives.org%2FOAI%2F2.0%2FsetSpec%3E+%24setSpec%0A++++++and+%24set+%3Chttp%3A%2F%2Fwww.openarchives.org%2FOAI%2F2.0%2FsetName%3E+%24setName%0A++++++and+%24set+%3Cinfo%3Afedora%2Ffedora-system%3Adef%2Fview%23disseminates%3E+%24setDiss%0A++++++and+%24setDiss+%3Cinfo%3Afedora%2Ffedora-system%3Adef%2Fview%23disseminationType%3E+%3Cinfo%3Afedora%2F*%2FSetInfo.xml%3E%29%0Afrom+%3C%23ri%3Ewhere+%24set+%3Chttp%3A%2F%2Fwww.openarchives.org%2FOAI%2F2.0%2FsetSpec%3E+%24setSpec%0Aand+%24set+%3Chttp%3A%2F%2Fwww.openarchives.org%2FOAI%2F2.0%2FsetName%3E+%24setName&type=tuples&lang=itql&stream=true&format=Sparql
org.trippi.TrippiException: ITQL query failed: rmi://localhost/fedora#ri
is not a model
at org.trippi.impl.kowari.KowariSession.query(KowariSession.java:233)
at
org.trippi.impl.base.ConcurrentTriplestoreReader.findTuples(ConcurrentTriplestoreReader.java:79)
at
fedora.server.resourceIndex.ResourceIndexImpl.findTuples(ResourceIndexImpl.java:1274)
at
fedora.server.resourceIndex.ResourceIndexModule.findTuples(ResourceIndexModule.java:235)
at org.trippi.server.TrippiServer.find(TrippiServer.java:119)
at org.trippi.server.http.TrippiServlet.doFind(TrippiServlet.java:498)
at org.trippi.server.http.TrippiServlet.doGet(TrippiServlet.java:371)
at fedora.server.access.RISearchServlet.doGet(RISearchServlet.java:76)
at org.trippi.server.http.TrippiServlet.doGet(TrippiServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:50)
at
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:140)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.kowari.query.QueryException: rmi://localhost/fedora#ri is
not a model
at
org.kowari.store.AbstractDatabaseSession.modelType(AbstractDatabaseSession.java:5122)
at
org.kowari.store.AbstractDatabaseSession.determineModelType(AbstractDatabaseSession.java:5241)
at
org.kowari.store.AbstractDatabaseSession.isKowariModel(AbstractDatabaseSession.java:1432)
at
org.kowari.store.StatementStoreResolver.canResolve(StatementStoreResolver.java:112)
at org.kowari.store.LocalQuery.expandView(LocalQuery.java:931)
at org.kowari.store.LocalQuery.expandViews(LocalQuery.java:866)
at org.kowari.store.LocalQuery.resolve(LocalQuery.java:551)
at
org.kowari.store.AbstractDatabaseSession.resolveLocalQuery(AbstractDatabaseSession.java:3109)
at
org.kowari.store.AbstractDatabaseSession.query(AbstractDatabaseSession.java:2800)
at
org.kowari.store.AbstractDatabaseSession.query(AbstractDatabaseSession.java:2761)
at org.trippi.impl.kowari.KowariSession.query(KowariSession.java:219)
... 49 more
Deleted canceled file: \tmp\proai\cache\2006\02\15\14\02\03.999.xml
Pruned directory \tmp\proai\cache\2006\02\15\14\02
Pruned directory \tmp\proai\cache\2006\02\15\14
INFO 02:04.139 (RecordCache) Rolling back aborted update
DEBUG 02:04.440 (RecordCache) Releasing connection and filesystem write
lock.
INFO 02:04.440 (RecordCache) Update cycle complete.
WARN 02:04.440 (RecordCache) Unable to update record cache. Will try
again in 60 seconds.
proai.error.ServerException: Error while updating
at proai.cache.RecordCache.update(RecordCache.java:555)
at proai.cache.RecordCache.run(RecordCache.java:627)
Caused by: proai.error.RepositoryException: Error getting tuples from
Fedora: Error getting tuple iterator: IOError with xml stream
at
fedora.services.oaiprovider.ITQLQueryFactory.getTuples(ITQLQueryFactory.java:315)
at
fedora.services.oaiprovider.ITQLQueryFactory.listSetInfo(ITQLQueryFactory.java:71)
at
fedora.services.oaiprovider.FedoraOAIDriver.listSetInfo(FedoraOAIDriver.java:134)
at proai.cache.RecordCache.update(RecordCache.java:452)
... 1 more
Caused by: java.io.IOException: Error getting tuple iterator: IOError
with xml stream
at fedora.client.FedoraClient.getTuples(FedoraClient.java:601)
at
fedora.services.oaiprovider.ITQLQueryFactory.getTuples(ITQLQueryFactory.java:313)
... 4 more
INFO 02:59.649 (RecordCache) Waiting for updater/pruner thread to finish...


Any help very apreciated
Luis Zorita


Luis Zorita

unread,
Feb 21, 2006, 8:23:25 AM2/21/06
to fedora...@comm.nsdl.org

Hi all:
I wonder if someone is using following configuration:
windows xp
java jdk1.5.0_06
fedora-2.1
mysql
oaiprovider service

Back-end Fedora works fine but oaiprovider service has a wandering
behaviour.
Starting from the scratch and index switched on I ingest the demos ,
sometimes when
:http://localhost:8080/oaiprovider/?verb=ListRecords&metadataPrefix=oai_dc
I get Item1, item3, other item1 item2 ,etc , even I get no records.
I added in proai.properties a DC format. The behaviour is similar as
with oai_dc.
Other verbs from oai_pmh works fine :Identify , ListSets ,
ListMetadataFormats.

Querying with itql : select $object from <#ri> where $object <rdf:type>
<fedora-model:FedoraObject> I get all the records .
Any help would be very apreciated.
Luis Zorita




Reply all
Reply to author
Forward
0 new messages