[OAI-implementers] Question regarding initial installation of OAICat

Young,Jeff (OR) jyoung at oclc.org
Mon Jun 23 11:35:21 EDT 2008


Ming,

Back in the dark ages when OAICat was first written, I didn't know how
to access files relative to the webapp deploy location. The solutions at
the time were either to hard-code file location in various configuration
files or else use relative paths and ask people to start their Tomcat
from the $TOMCAT_HOME directory.

I've since learned how to reference relative directory locations without
these incantations, but vestiges of the old patterns still remain.

In you WEB-INF.xml file, change the properties context-param to look
like this:

    <context-param>
      <param-name>properties</param-name>
      <param-value>oaicat.properties</param-value>
    </context-param>

If you have a recent copy of the oaicat.jar file
(http://pubserv.oclc.org/oaicat/jars/dist/dist.html), the Servlet should
automatically look for it here:

WEB-INF/classes/oaicat.properties

There may be other file references that are still problematic, but this
is where everything starts.

Jeff

> -----Original Message-----
> From: oai-implementers-bounces at openarchives.org
[mailto:oai-implementers-
> bounces at openarchives.org] On Behalf Of Mingqiang Yu
> Sent: Friday, June 20, 2008 12:05 PM
> To: oai-implementers at openarchives.org
> Subject: Re: [OAI-implementers] Question regarding initial
installation of
> OAICat
> 
> Thanks a lot for the help! After I changed the
> FileSystemOAICatalog.homeDir in WEB-INF/oaicat.properties, it works
fine.
> But I'm wondering why tomcat has trouble to load the
> WEB-INF/oaicat.properties. Is there any variable that I should set to
make
> tomcat see this file?
> 
> Again, thanks a lot for the help!
> 
> Ming
> 
> > Hi,
> >
> > I'm just a user of OAICAt, so if I'm wrong someone please correct
me.
> >
> > Apparently Tomcat is having trouble loading
WEB-INF/oaicat.properties
> from
> > the
> > war file. If you unzip the war to your webapps dir (if you're in
Windows
> > you
> > will have to rename the file extension to .zip) it may solve the
> problem.
> > If it
> > still doesn't work, try changing the property
> FileSystemOAICatalog.homeDir
> > in
> > WEB-INF/oaicat.properties to the absolute path (it's wrong to use
the
> > absolute
> > path, but it's for testing purposes).
> >
> > Diogo
> >
> > Mingqiang Yu wrote:
> >> Hi,
> >>
> >> I just started to use the OAICat package. After I copied the
oaicat.war
> >> file into my tomcat webapps area and restarted the tomcat, the
initial
> >> oaicat/identify.html page works ok. But when I clicked on Submit
Query,
> >> I
> >> got the following error:
> >>
> >> java.lang.NullPointerException
> >>         at
> >>
>
ORG.oclc.oai.server.catalog.FileSystemOAICatalog.loadFileMap(FileSystemO
AI
> Catalog.java:108)
> >>         at
> >>
>
ORG.oclc.oai.server.catalog.FileSystemOAICatalog.<init>(FileSystemOAICat
al
> og.java:98)
> >>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> >> Method)
> >>         at
> >>
>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
cc
> essorImpl.java:39)
> >>         at
> >>
>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tr
> uctorAccessorImpl.java:27)
> >>         at
> >> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
> >> at
> >>
>
ORG.oclc.oai.server.catalog.AbstractCatalog.factory(AbstractCatalog.java
:3
> 88)
> >>         at
> >> ORG.oclc.oai.server.OAIHandler.getAttributes(OAIHandler.java:160)
> >>         at ORG.oclc.oai.server.OAIHandler.init(OAIHandler.java:121)
> >> ....
> >>
> >> According to the documentation, this default war file should work
ok.
> Is
> >> there something I did wrong?
> >>
> >> Your help is really appreciated!
> >>
> >> Ming
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> OAI-implementers mailing list
> >> List information, archives, preferences and to unsubscribe:
> >> http://www.openarchives.org/mailman/listinfo/oai-implementers
> >>
> >>
> >
> 
> 
> _______________________________________________
> OAI-implementers mailing list
> List information, archives, preferences and to unsubscribe:
> http://www.openarchives.org/mailman/listinfo/oai-implementers
> 





More information about the OAI-implementers mailing list