[Dspace-tech] Tomcat can't find DSpace

516 views
Skip to first unread message

Robert Roggenbuck

unread,
Aug 25, 2015, 10:51:06 AM8/25/15
to dspace-tech@lists.sourceforge.net Tech
Hi,

I am just in the process of installing DSpace 1.5 on RedHat EL 5 (64
Bit) an have principally all basics done: setup DB (PostgreSQL 8.2),
Tomcat (5.5.2) is running, i have done all settings in dspace.cfg and
the 'ant fresh_install' of DSpace is done successfully. But now Tomcat
can not access '/jspui' (server response: HTTP-Sataus 404; "description:
The requested resource (/jspui) is not available"). I tried to set up
the connectors in server.xml and alternatively copied the
[dspace]/webapps/jspui to the tomcat directory $CATALINA_BASE/webapps/.
But nothing works. The permissions are right. As user 'dspace' and as
user 'tomcat' all files are readable. When I look into the Tomcat-log
there seems to be trouble reading configurations - but it is not clear
for me which file causes the problem: a Java class file or a Tomcat
configuration file edited by me:

13. Mai 08 11:27:20 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
/usr/lib64/gcj-4.1.2
13. Mai 08 11:27:20 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
13. Mai 08 11:27:20 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 746 ms
13. Mai 08 11:27:20 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13. Mai 08 11:27:20 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
13. Mai 08 11:27:20 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
13. Mai 08 11:27:21 org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
13. Mai 08 11:27:21 org.apache.catalina.core.StandardContext start
SEVERE: Error in dependencyCheck
java.util.jar.JarException: Section should start with a Name header:
unexpected '^@'
at gnu.java.util.jar.JarUtils.readSectionName(libgcj.so.7rh)
at gnu.java.util.jar.JarUtils.readIndividualSections(libgcj.so.7rh)
at java.util.jar.Manifest.read(libgcj.so.7rh)
at java.util.jar.Manifest.<init>(libgcj.so.7rh)
[snip]
at
org.apache.catalina.core.StandardServer.start(catalina-5.5.23.jar.soas0s7u.so)
at
org.apache.catalina.startup.Catalina.start(catalina-5.5.23.jar.soas0s7u.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.start(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
13. Mai 08 11:27:21 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
13. Mai 08 11:27:21 org.apache.catalina.core.StandardContext start
SEVERE: Context [/jspui] startup failed due to previous errors
13. Mai 08 11:27:21 org.apache.catalina.core.StandardContext stop
INFO: Container
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jspui]
has not been started
13. Mai 08 11:27:22 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13. Mai 08 11:27:22 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13. Mai 08 11:27:22 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13. Mai 08 11:27:22 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13. Mai 08 11:27:22 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
13. Mai 08 11:27:22 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009

So at the end Tomcat starts successful but not jspui. :-(

I configured the following parameters for Tomcat in
/etc/tomcat5/tomcat5.conf:
JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
TOMCAT_USER="dspace"
CONNECTOR_PORT=8081

The running Tomcat process looks like this:

$ ps -eF | grep tomcat
tomcat 760 1 0 169102 133064 0 May09 ? 00:00:08
/usr/lib/jvm/java/bin/java -Xmx512M -Xms64M -Dfile.encoding=UTF-8
-Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib
-Dcatalina.ext.dirs=/usr/share/tomcat5/shared/lib:/usr/share/tomcat5/common/lib
-Djava.endorsed.dirs=/usr/share/tomcat5/common/endorsed -classpath
/usr/lib/jvm/java/lib/tools.jar:/usr/share/tomcat5/bin/bootstrap.jar:/usr/share/tomcat5/bin/commons-logging-api.jar:/usr/share/java/mx4j/mx4j-impl.jar:/usr/share/java/mx4j/mx4j-jmx.jar
-Dcatalina.base=/usr/share/tomcat5 -Dcatalina.home=/usr/share/tomcat5
-Djava.io.tmpdir=/usr/share/tomcat5/temp
org.apache.catalina.startup.Bootstrap start

This is strange too, because tomcat should run as user 'dspace'. So may
be there are more then 1 problem hiding each other...

Can someone help me?

Best regards

Robert

--

===================================
Robert Roggenbuck
Universitaetsbibliothek Osnabrueck
Germany
===================================

James Rutherford

unread,
Aug 25, 2015, 10:51:07 AM8/25/15
to Robert Roggenbuck, dspace-tech@lists.sourceforge.net Tech
On Tue, May 13, 2008 at 09:44:01AM +0000, Robert Roggenbuck wrote:
> INFO: The Apache Tomcat Native library which allows optimal performance
> in production environments was not found on the java.library.path:
> /usr/lib64/gcj-4.1.2

Are you using Sun Java or GNU Java? Using gcj et al can cause no end of
problems when running DSpace.

cheers,

Jim

--
James Rutherford | Hewlett-Packard Limited registered Office:
Research Engineer | Cain Road,
HP Labs | Bracknell,
Bristol, UK | Berks
+44 117 312 7066 | RG12 1HN.
james.ru...@hp.com | Registered No: 690597 England

The contents of this message and any attachments to it are confidential
and may be legally privileged. If you have received this message in
error, you should delete it from your system immediately and advise the
sender. To any recipient of this message within HP, unless otherwise
stated you should consider this message and attachments as "HP
CONFIDENTIAL".

Robert Roggenbuck

unread,
Aug 25, 2015, 10:51:08 AM8/25/15
to James Rutherford, dspace-tech@lists.sourceforge.net Tech
Yes, GNU Java is installed:

$ java --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)

If it is it really necessary to work with Sun Java it should be
mentioned more clearly in the docs.
Is it possible to have Sun Java additionally to GNU Java? Because GNU
Java is the standard java on RedHat EL I would feel more comfortable by
keep it.

Best regards

Robert

James Rutherford schrieb:

James Rutherford

unread,
Aug 25, 2015, 10:51:09 AM8/25/15
to Robert Roggenbuck, dspace-tech@lists.sourceforge.net Tech
On Tue, May 13, 2008 at 12:10:21PM +0000, Robert Roggenbuck wrote:
> $ java --version
> java version "1.4.2"
> gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)
>
> If it is it really necessary to work with Sun Java it should be
> mentioned more clearly in the docs.
> Is it possible to have Sun Java additionally to GNU Java? Because GNU
> Java is the standard java on RedHat EL I would feel more comfortable by
> keep it.

See this page for an explanation (and steps towards a solution):

http://www.ja-sig.org/wiki/display/CASUM/Deploying+CAS+3.0.x+in+RHEL+5+with+Sun+Java

As noted, GNU Java is only equivalent to J2SE 1.4.2 (and Java 1.5 is a
requirement for DSpace 1.5 -- I'm pretty sure that is specified in the
docs somewhere).

Graham Triggs

unread,
Aug 25, 2015, 10:51:10 AM8/25/15
to James Rutherford, dspace-tech@lists.sourceforge.net Tech
James Rutherford wrote:
> As noted, GNU Java is only equivalent to J2SE 1.4.2 (and Java 1.5 is a
> requirement for DSpace 1.5 -- I'm pretty sure that is specified in the
> docs somewhere).

I'm not sure I would even go that far.

From http://gcc.gnu.org/java/:

"It has been merged with GNU Classpath and supports most of the 1.4
libraries plus some 1.5 additions."

which means even they don't claim it is fully compatible with 1.4, let
alone 1.5.

I guess the documentation should be clear that it requires a JDK
certified to be compatible with J2SE 5.0. That doesn't necessarily mean
the Sun JDK - Apple, BEA, IBM all deliver certified JDKs across a
variety of platforms.

But not GNU. Thankfully with the open sourcing of the Sun JDK, we should
start seeing distributions migrating away from supplying GNU by default ;)

G
This email has been scanned by Postini.
For more information please visit http://www.postini.com


Robert Roggenbuck

unread,
Aug 25, 2015, 10:51:11 AM8/25/15
to James Rutherford, dspace-tech@lists.sourceforge.net Tech
Yes, Java 1.5 is mentioned - sorry for not checking the installed Java
version...

Thanks for the link. I will see if I can register the server at the
"RedHat supplementary updates repository". I tell You whether I
succeeded or not.

Thanks for the help so far

Robert

James Rutherford schrieb:

Robert Roggenbuck

unread,
Aug 25, 2015, 10:51:12 AM8/25/15
to James Rutherford, dspace-tech@lists.sourceforge.net Tech
Here I am again.

Sun Java 1.5 is installed and now DSpace is online! Thank You!

But after restarting Tomcat I find in catalina.out some problems similar
to the ones before:

Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
13.05.2008 17:12:35 org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
/usr/lib/jvm/java-1.5.0-sun-1.5.0.15.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.5.0-sun-1.5.0.15.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.5.0-sun-1.5.0.15.x86_64/jre/../lib/amd64
13.05.2008 17:12:36 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
13.05.2008 17:12:36 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1341 ms
13.05.2008 17:12:36 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
13.05.2008 17:12:36 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.20
13.05.2008 17:12:36 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
13.05.2008 17:12:37 org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
INFO: Loading provided config file: /opt/dspace/config/dspace.cfg
INFO: Using dspace provided log configuration (log.init.config)
INFO: Loading: /opt/dspace/config/log4j.properties
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /opt/dspace/log/dspace.log (Permission
denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
[snip]
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /opt/dspace/log/checker.log (Permission
denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
[snip]
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
13.05.2008 17:12:40 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13.05.2008 17:12:40 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13.05.2008 17:12:40 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
13.05.2008 17:12:40 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
13.05.2008 17:12:40 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
13.05.2008 17:12:40 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
13.05.2008 17:12:40 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/49 config=null
13.05.2008 17:12:40 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
13.05.2008 17:12:40 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4707 ms

The problems I see:
- The "Apache Tomcat Native library" is still not found. Is it required.
Should'nt it be part of Tomcat. Did I set a path wrong?

- Can I ignore the log4j-warning because of the later successful loading
message regarding log4j?

- Tomcat still starts up as user 'tomcat', not 'dspace'. This seems to
be the reason for the permission problems. But why does Tomcat ignore
the settings in tomcat5.conf?

Best regards

Robert

--------
Robert Roggenbuck schrieb:

James Rutherford

unread,
Aug 25, 2015, 10:51:13 AM8/25/15
to Robert Roggenbuck, dspace-tech@lists.sourceforge.net Tech
On Tue, May 13, 2008 at 03:29:33PM +0000, Robert Roggenbuck wrote:
> Sun Java 1.5 is installed and now DSpace is online! Thank You!

Glad to hear it.

> But after restarting Tomcat I find in catalina.out some problems similar
> to the ones before:
>
> <snip/>
>
> The problems I see:
> - The "Apache Tomcat Native library" is still not found. Is it required.
> Should'nt it be part of Tomcat. Did I set a path wrong?

I think you can safely ignore this one, but I'm no tomcat expert.

> - Can I ignore the log4j-warning because of the later successful loading
> message regarding log4j?

Once you sort out the permissions problem, take a look at your
dspace.log and see if anything is in it. If so, yes, you can ignore that
warning :)

> - Tomcat still starts up as user 'tomcat', not 'dspace'. This seems to
> be the reason for the permission problems. But why does Tomcat ignore
> the settings in tomcat5.conf?

Pass. I'm not sure how Red Hat bundles & configures Tomcat, but there
ought to be a good amount of documentation on the matter (and if not,
presumably you can contact support).

Pere Villega

unread,
Aug 25, 2015, 10:51:14 AM8/25/15
to Robert Roggenbuck, dspace-tech@lists.sourceforge.net Tech
Maybe I can help

>
> The problems I see:
> - The "Apache Tomcat Native library" is still not found. Is it required.
> Should'nt it be part of Tomcat. Did I set a path wrong?

Apache Native Library is not required, if you install it you will have a
boost in performance, that's all. But my sysadmin has had lots of
problems to deploy it so maybe it's wiser to ignore it by now.


> - Can I ignore the log4j-warning because of the later successful loading
> message regarding log4j?

The warning about /log/dspace.log is because by default dspace doesn't
create those files. You need to create:

/opt/dspace/log/dspace.log
/opt/dspace/log/checker.log

and chown them to tomcat.

> - Tomcat still starts up as user 'tomcat', not 'dspace'. This seems to
> be the reason for the permission problems. But why does Tomcat ignore
> the settings in tomcat5.conf?

If you run /etc/init.d/tomcat (as you should) that script sets "tomcat"
as the user that runs tomcat. I can't see any reason you want to change
that, aside from putting your server at risk :) Tomcat must run under
tomcat user.

Hope this helps,
Pere




Reply all
Reply to author
Forward
0 new messages