Re: [dspace-tech] DSpace 6.3 REST-API stopped working in Ubuntu 18.04 and 18.10

2018-10-26 Thread Tim Donohue
Hi Christoph,

That is odd. Are there any additional error messages in your Tomcat logs?
Usually errors like the "org.dspace.core.exception.
DatabaseSchemaValidationException: The schema validator returned: Error
activating Bean Validation integration" will have a "Caused By:" message
which gives you more clues as to the root cause of the error.  So, I'm
wondering if that portion of the error was cut off or overlooked in your
initial message.  Sometimes that extra information could appear in the
DSpace logs or the Tomcat logs (depending on where the error is occurring),
so I'd recommend looking around in both.

>From what you've said so far, it doesn't sound like this error is specific
to the REST API.  It sounds to me like DSpace's core (Java) API (and
Hibernate) cannot communicate with your PostgreSQL database -- which means
none of the DSpace webapps would be able to start.  I'm not sure yet if
this problem is somehow specific to Ubuntu 18.04/18.10, specific to
incompatible dependencies (though Java 8 and Postgres 10 both work fine
with DSpace 6.x), or if there's a configuration issue going on.

If you can double check all your logs and look for additional error
messages, I'm hoping we can get more information.  As it is, the errors
you've sent are very generic and don't give me any clues as to what the
actual failure may be.

Tim

On Wed, Oct 24, 2018 at 10:24 AM Christoph Weber 
wrote:

> Hi Tim,
>
> thanks for your answer.
> I just did a fresh install of everything. Fresh ubuntu 18.10 with java 8,
> fresh postgres 10 database and fresh DSpace 6.3 following the install
> instructions.
> Just to rule out potential problems caused by ubuntu updates.
>
> REST-API is still failing to start. Normal DSpace works as expected.
>
> When I build dspace with mvn package -Dmirage2.on=true, I get the
> following warning:
>
> [WARNING] The following patterns were never triggered in this artifact
> exclusion filter:
> o  'org.glassfish.hk2.external:bean-validator:jar:*'
>
> In [dspace]/log/dspace-2018-10-24.log I get the following error when I try
> to start the REST-API webapp:
>
> 2018-10-24 15:14:02,820 FATAL org.dspace.core.Context @ Cannot obtain the
> bean which provides a database connection. Check previous entries in the
> dspace.log
> to find why the db failed to initialize. The schema validator returned:
> Error activating Bean Validation integration
>
> Previous entries don't really give me any clues what might be wrong:
>
> 2018-10-24 15:18:01,501 INFO  org.dspace.statistics.SolrLoggerServiceImpl
> @ solr-statistics.spidersfile:null
> 2018-10-24 15:18:01,502 INFO  org.dspace.statistics.SolrLoggerServiceImpl
> @ solr-statistics.server:http://myserver.de:8080/solr/statistics
> 2018-10-24 15:18:01,502 INFO  org.dspace.statistics.SolrLoggerServiceImpl
> @ usage-statistics.dbfile:/opt/dspace/config/GeoLite2-City.mmdb
> 2018-10-24 15:18:01,700 INFO  org.dspace.statistics.SolrLoggerServiceImpl
> @ useProxies=false
> 2018-10-24 15:18:01,930 INFO  org.dspace.storage.rdbms.DatabaseUtils @
> Loading Flyway DB migrations from: filesystem:/opt/dspace/etc/postgres,
> classpath:org.
> dspace.storage.rdbms.sqlmigration.postgres,
> classpath:org.dspace.storage.rdbms.migration
> 2018-10-24 15:18:01,946 INFO
>  org.flywaydb.core.internal.util.VersionPrinter @ Flyway 4.0.3 by Boxfuse
> 2018-10-24 15:18:01,959 INFO
>  org.flywaydb.core.internal.dbsupport.DbSupportFactory @ Database:
> jdbc:postgresql://localhost:5432/dspace (PostgreSQL 10.5)
> 2018-10-24 15:18:02,040 INFO  org.dspace.storage.rdbms.DatabaseUtils @
> DSpace database schema is up to date
> 2018-10-24 15:18:02,055 INFO  org.dspace.event.EventServiceImpl @
> EventService dispatcher pool initialized
> 2018-10-24 15:18:02,193 INFO  org.hibernate.annotations.common.Version @
> HCANN01: Hibernate Commons Annotations {4.0.2.Final}
> 2018-10-24 15:18:02,199 INFO  org.hibernate.Version @ HHH000412: Hibernate
> Core {4.2.21.Final}
> 2018-10-24 15:18:02,201 INFO  org.hibernate.cfg.Environment @ HHH000206:
> hibernate.properties not found
> 2018-10-24 15:18:02,202 INFO  org.hibernate.cfg.Environment @ HHH21:
> Bytecode provider name : javassist
> 2018-10-24 15:18:02,227 INFO  org.hibernate.cfg.Configuration @ HHH44:
> Configuring from URL: file:/opt/dspace/config/hibernate.cfg.xml
> 2018-10-24 15:18:02,272 INFO  org.hibernate.cfg.Configuration @ HHH41:
> Configured SessionFactory: null
> 2018-10-24 15:18:02,455 INFO  org.hibernate.dialect.Dialect @ HHH000400:
> Using dialect:
> org.dspace.storage.rdbms.hibernate.postgres.DSpacePostgreSQL82Dialect
> 2018-10-24 15:18:02,468 INFO
>  org.hibernate.engine.jdbc.internal.LobCreatorBuilder @ HHH000424:
> Disabling contextual LOB creation as createClob() method thre
> w error : java.lang.reflect.InvocationTargetException
> 2018-10-24 15:18:02,477 INFO  org.hibernate.type.BasicTypeRegistry @
> HHH000270: Type registration [pg-uuid] overrides previous :
> org.hibernate.type.PostgresU
> UIDType@376076dd
> 2018-10-24 15

Re: [dspace-tech] DSpace 6.3 REST-API stopped working in Ubuntu 18.04 and 18.10

2018-10-24 Thread Christoph Weber
Hi Tim,

thanks for your answer.
I just did a fresh install of everything. Fresh ubuntu 18.10 with java 8, 
fresh postgres 10 database and fresh DSpace 6.3 following the install 
instructions.
Just to rule out potential problems caused by ubuntu updates.

REST-API is still failing to start. Normal DSpace works as expected.

When I build dspace with mvn package -Dmirage2.on=true, I get the following 
warning:

[WARNING] The following patterns were never triggered in this artifact 
exclusion filter: 
o  'org.glassfish.hk2.external:bean-validator:jar:*'

In [dspace]/log/dspace-2018-10-24.log I get the following error when I try 
to start the REST-API webapp:

2018-10-24 15:14:02,820 FATAL org.dspace.core.Context @ Cannot obtain the 
bean which provides a database connection. Check previous entries in the 
dspace.log
to find why the db failed to initialize. The schema validator returned: 
Error activating Bean Validation integration

Previous entries don't really give me any clues what might be wrong:

2018-10-24 15:18:01,501 INFO  org.dspace.statistics.SolrLoggerServiceImpl @ 
solr-statistics.spidersfile:null 
2018-10-24 15:18:01,502 INFO  org.dspace.statistics.SolrLoggerServiceImpl @ 
solr-statistics.server:http://myserver.de:8080/solr/statistics 
2018-10-24 15:18:01,502 INFO  org.dspace.statistics.SolrLoggerServiceImpl @ 
usage-statistics.dbfile:/opt/dspace/config/GeoLite2-City.mmdb 
2018-10-24 15:18:01,700 INFO  org.dspace.statistics.SolrLoggerServiceImpl @ 
useProxies=false 
2018-10-24 15:18:01,930 INFO  org.dspace.storage.rdbms.DatabaseUtils @ 
Loading Flyway DB migrations from: filesystem:/opt/dspace/etc/postgres, 
classpath:org.
dspace.storage.rdbms.sqlmigration.postgres, 
classpath:org.dspace.storage.rdbms.migration 
2018-10-24 15:18:01,946 INFO 
 org.flywaydb.core.internal.util.VersionPrinter @ Flyway 4.0.3 by Boxfuse 
2018-10-24 15:18:01,959 INFO 
 org.flywaydb.core.internal.dbsupport.DbSupportFactory @ Database: 
jdbc:postgresql://localhost:5432/dspace (PostgreSQL 10.5) 
2018-10-24 15:18:02,040 INFO  org.dspace.storage.rdbms.DatabaseUtils @ 
DSpace database schema is up to date 
2018-10-24 15:18:02,055 INFO  org.dspace.event.EventServiceImpl @ 
EventService dispatcher pool initialized 
2018-10-24 15:18:02,193 INFO  org.hibernate.annotations.common.Version @ 
HCANN01: Hibernate Commons Annotations {4.0.2.Final} 
2018-10-24 15:18:02,199 INFO  org.hibernate.Version @ HHH000412: Hibernate 
Core {4.2.21.Final} 
2018-10-24 15:18:02,201 INFO  org.hibernate.cfg.Environment @ HHH000206: 
hibernate.properties not found 
2018-10-24 15:18:02,202 INFO  org.hibernate.cfg.Environment @ HHH21: 
Bytecode provider name : javassist 
2018-10-24 15:18:02,227 INFO  org.hibernate.cfg.Configuration @ HHH44: 
Configuring from URL: file:/opt/dspace/config/hibernate.cfg.xml 
2018-10-24 15:18:02,272 INFO  org.hibernate.cfg.Configuration @ HHH41: 
Configured SessionFactory: null 
2018-10-24 15:18:02,455 INFO  org.hibernate.dialect.Dialect @ HHH000400: 
Using dialect: 
org.dspace.storage.rdbms.hibernate.postgres.DSpacePostgreSQL82Dialect 
2018-10-24 15:18:02,468 INFO 
 org.hibernate.engine.jdbc.internal.LobCreatorBuilder @ HHH000424: 
Disabling contextual LOB creation as createClob() method thre
w error : java.lang.reflect.InvocationTargetException 
2018-10-24 15:18:02,477 INFO  org.hibernate.type.BasicTypeRegistry @ 
HHH000270: Type registration [pg-uuid] overrides previous : 
org.hibernate.type.PostgresU
UIDType@376076dd 
2018-10-24 15:18:02,477 INFO  org.hibernate.type.BasicTypeRegistry @ 
HHH000270: Type registration [java.util.UUID] overrides previous : 
org.hibernate.type.UU
IDBinaryType@7f4b7480 
2018-10-24 15:18:02,713 INFO 
 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator @ 
HHH000399: Using default transaction strategy (direct J
DBC transactions) 
2018-10-24 15:18:02,719 INFO 
 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory @ HHH000397: 
Using ASTQueryTranslatorFactory 
2018-10-24 15:18:02,764 WARN  net.sf.ehcache.CacheManager @ Creating a new 
instance of CacheManager using the diskStorePath "/tmp" which is already 
used by a
n existing CacheManager. 
The source of the configuration was 
net.sf.ehcache.config.generator.ConfigurationSource$URLConfigurationSource@1a477234.
 

The diskStore path for this CacheManager will be set to 
/tmp/ehcache_auto_created_1540394282764. 
To avoid this warning consider using the CacheManager factory methods to 
create a singleton CacheManager or specifying a separate ehcache 
configuration (ehca
che.xml) for each CacheManager instance. 
2018-10-24 15:18:02,793 INFO  org.hibernate.cache.spi.UpdateTimestampsCache 
@ HHH000250: Starting update timestamps cache at region: 
org.hibernate.cache.spi.
UpdateTimestampsCache 
2018-10-24 15:18:02,797 INFO 
 org.hibernate.cache.internal.StandardQueryCache @ HHH000248: Starting 
query cache at region: org.hibernate.cache.internal.Stand
ardQueryCache 
2018-10-24 15:18:02,829 INFO  org.hibernate.valida

Re: [dspace-tech] DSpace 6.3 REST-API stopped working in Ubuntu 18.04 and 18.10

2018-10-23 Thread Tim Donohue
Hi Christoph,

You should check your DSpace log files ([dspace]/log/dspace.log.*) for
additional errors, but based on the line numbers in your error, it looks
like it fails here:
https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-api/src/main/java/org/dspace/core/Context.java#L170

Just above that section of code is where DSpace attempts to find the Spring
bean that will provide the database connection. It looks to me like DSpace
likely is not able to find that bean (there likely will be FATAL errors in
your dspace.logs about that).

It's hard to say exactly what is wrong, but it's highly likely that either..

* Your DSpace database configuration is not correct (maybe something
changed in how your database is installed?)
* Or, your Spring configuration files are running into conflicts or errors
(which can occur if you have mixed Spring configs from DSpace 5.x and 6.x
in the same folder).  If this is the problem, you can safely delete the
[dspace]/config/spring/ folder, and then rebuild & redeploy DSpace ("mvn
package", followed by "ant update") to correct your configuration.

Hopefully that gives you some hints on getting this fixed!

Tim

On Tue, Oct 23, 2018 at 8:13 AM Christoph Weber 
wrote:

> Hello DSpace Community,
>
> I cannot get the DSpace 6.3 REST-API working in Ubuntu 18.04 and 18.10.
> The REST-API worked in Ubuntu 17.10, but after upgrading or installing a
> later version, it stopped working.
>
> The Tomcat Web Application Manager gives me "FAIL - Application at
> context path [/rest] could not be started", when I try to start it manually
> and in /var/log/tomcat8/localhost.2018-10-23.log I get the following
> error message:
>
> 23-Oct-2018 14:57:48.013 SEVERE [http-nio-8080-exec-7]
> org.apache.catalina.core.StandardContext.listenerStart Exception sending
> context initialized event to
> listener instance of class [org.dspace.app.util.DSpaceWebappListener]
> org.dspace.core.exception.DatabaseSchemaValidationException: The schema
> validator returned: Error activating Bean Validation integration
>at org.dspace.core.Context.init(Context.java:170)
>at org.dspace.core.Context.(Context.java:126)
>at
> org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:74)
>at
> org.dspace.app.util.DSpaceWebappListener.contextInitialized(DSpaceWebappListener.java:31)
>at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4776)
>at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
>at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>at
> org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1349)
>at
> org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:679)
>at
> org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>at
> org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>at
> org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
>at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)
>at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
>at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
>at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
>at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

[dspace-tech] DSpace 6.3 REST-API stopped working in Ubuntu 18.04 and 18.10

2018-10-23 Thread Christoph Weber
Hello DSpace Community,

I cannot get the DSpace 6.3 REST-API working in Ubuntu 18.04 and 18.10. The 
REST-API worked in Ubuntu 17.10, but after upgrading or installing a later 
version, it stopped working.

The Tomcat Web Application Manager gives me "FAIL - Application at context 
path [/rest] could not be started", when I try to start it manually and in 
/var/log/tomcat8/localhost.2018-10-23.log I get the following error message:

23-Oct-2018 14:57:48.013 SEVERE [http-nio-8080-exec-7] 
org.apache.catalina.core.StandardContext.listenerStart Exception sending 
context initialized event to 
listener instance of class [org.dspace.app.util.DSpaceWebappListener] 
org.dspace.core.exception.DatabaseSchemaValidationException: The schema 
validator returned: Error activating Bean Validation integration 
   at org.dspace.core.Context.init(Context.java:170) 
   at org.dspace.core.Context.(Context.java:126) 
   at 
org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:74) 
   at 
org.dspace.app.util.DSpaceWebappListener.contextInitialized(DSpaceWebappListener.java:31)
 
   at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4776)
 
   at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5240)
 
   at 
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
   at 
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1349) 
   at 
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:679)
 
   at 
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) 
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) 
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
   at 
org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
   at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
   at 
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
 
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 
   at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:613)
 
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) 
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) 
   at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
 
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) 
   at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) 
   at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 
   at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
 
   at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1463)
 
   at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
   at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
 
   at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 
   at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 
   at java.base/java.lang.Thread.run(Thread.java:844)



Any ideas on how to get the REST-API running again?

Best regards,
Christoph

-- 
All messages to this mailing list should adhere to the DuraSpace Code of 
Conduct: https://duraspace.org/about/policies/code-of-conduct/
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@goog