[Dspace-tech] Error Create administrator

1 view
Skip to first unread message

Vitor Hugo Martins

unread,
Aug 25, 2015, 12:31:48 PM8/25/15
to dspac...@lists.sourceforge.net
Hi, i`m trying to create administrator in 1.4.2 in a Lenny Debian Linux, postgre
8.3, tomcat 5.5, ant 1.7, jdk 1.6 ant the following error appears:


dspace:/dspace/bin# ./create-administrator
Exception in thread "main" java.lang.NoClassDefFoundError:
org.postgresql.jdbc4.AbstractJdbc4Connection
at java.lang.Class.initializeClass(libgcj.so.90)
at java.lang.Class.initializeClass(libgcj.so.90)
at org.postgresql.Driver.makeConnection(Driver.java:386)
at org.postgresql.Driver.connect(Driver.java:260)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at
org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:48)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:840)
at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:175)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at
org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:717)
at org.dspace.core.Context.<init>(Context.java:105)
at org.dspace.administer.CreateAdministrator.main(CreateAdministrator.java:78)
Caused by: java.lang.ClassNotFoundException: java.sql.SQLClientInfoException not
found in
gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/dspace/lib/activation.jar,file:/dspace/lib/bcmail-jdk14-135.jar,file:/dspace/lib/bcprov-jdk14-135.jar,file:/dspace/lib/commons-cli.jar,file:/dspace/lib/commons-codec-1.3.jar,file:/dspace/lib/commons-collections.jar,file:/dspace/lib/commons-dbcp.jar,file:/dspace/lib/commons-fileupload.jar,file:/dspace/lib/commons-io.jar,file:/dspace/lib/commons-lang-2.1.jar,file:/dspace/lib/commons-pool.jar,file:/dspace/lib/dspace.jar,file:/dspace/lib/fontbox.jar,file:/dspace/lib/handle.jar,file:/dspace/lib/jakarta-poi.jar,file:/dspace/lib/jargon.jar,file:/dspace/lib/jaxen.jar,file:/dspace/lib/jdom.jar,file:/dspace/lib/jena.jar,file:/dspace/lib/jstl.jar,file:/dspace/lib/log4j.jar,file:/dspace/lib/lucene.jar,file:/dspace/lib/lucene-sandbox.jar,file:/dspace/lib/mail.jar,file:/dspace/lib/mets.jar,file:/dspace/lib/oaicat.jar,file:/dspace/lib/oro.jar,file:/dspace/lib/PDFBox.jar,file:/dspace/lib/postgresql-8.3-604.jdbc4.jar,file:/dspace/lib/postgresql.jar,file:/dspace/lib/rome.jar,file:/dspace/lib/serializer.jar,file:/dspace/lib/servlet.jar,file:/dspace/lib/standard.jar,file:/dspace/lib/tm-extractors.jar,file:/dspace/lib/xalan.jar,file:/dspace/lib/xercesImpl.jar,file:/dspace/lib/xml-apis.jar,file:/dspace/config/],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.90)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.ClassLoader.loadClass(libgcj.so.90)
at java.lang.Class.forName(libgcj.so.90)
at java.lang.Class.initializeClass(libgcj.so.90)
...14 more

--
Vitor Hugo Martins
Departamento de Computação Científica
CICT / Fiocruz




Mark H. Wood

unread,
Aug 25, 2015, 12:31:49 PM8/25/15
to dspac...@lists.sourceforge.net
I would first make certain that a copy of the PostgreSQL JDBC driver
JAR has been placed in [DSpace]/lib.

However, I see also that Tomcat is running on the Gnu JRE, which is
sometimes thought to be a source of problems. More people will be
able to help you if you can use the Sun JRE.

--
Mark H. Wood, Lead System Programmer mw...@IUPUI.Edu
Friends don't let friends publish revisable-form documents.

Vitor Hugo Martins

unread,
Aug 25, 2015, 12:31:59 PM8/25/15
to dspac...@lists.sourceforge.net
Hi Mark, my jdbc driver it's ok and i had using the SUN JDK 1.6, but when i
changed the JDK to the Open Jdk that comes in Lenny Package the create
administrator works.
But when i tried to access the url the following error appears. What it can be?
Thank you very much.

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from
fulfilling this request.

exception

java.security.AccessControlException: access denied (java.lang.RuntimePermission
accessClassInPackage.org.apache.jasper.compiler)
java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
java.security.AccessController.checkPermission(AccessController.java:553)
java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:291)
java.lang.ClassLoader.loadClass(ClassLoader.java:316)
java.lang.ClassLoader.loadClass(ClassLoader.java:268)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:203)
org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96)
org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:77)
org.apache.jasper.compiler.JspConfig.init(JspConfig.java:198)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:250)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:114)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:616)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.5 logs.
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial.
> http://p.sf.net/sfu/www-adobe-com_______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

Mark H. Wood

unread,
Aug 25, 2015, 12:32:00 PM8/25/15
to dspac...@lists.sourceforge.net
I believe that I have not seen a filesystem permissions problem
reported this way, but the traceback suggests that Tomcat was reading
DSpace's WEB-INF/web.xml at the time, so it might be well to check the
ownership and permissions of the webapp.'s files. If it's not that
then I fear that this problem is beyond my current understanding of the
java.security package, but others may be able to help.

Tomcat needs read access to the webapp files, naturally. It appears
that there are some places in Tomcat where the programmer was careless
and requested write access even when writing makes no sense, so "rw"
access may be required. Unless you have unusual needs, the files are
most simply set to be owned by the same account used to run Tomcat. I
looked at one of my own DSpace installations and found:

-rw-r--r-- 1 tomcat tomcat 20122 2008-01-22 10:02 web.xml

where "tomcat" is the account used to run Tomcat, set up by the
distribution's package manager. The DSpace documentation may require
some interpretation here, since it assumes that Tomcat is installed
manually and run from an account named 'dspace', but if you use your
distribution's Tomcat package then the account is almost certainly not
named 'dspace'.
Reply all
Reply to author
Forward
0 new messages