Open jakubklimek opened 11 years ago
backend cannot connect to DB = he can run in readonly mode if possible, do not crash
Od Petra: Tady by to chtělo probrat s Honzou ... pro mě by bylo nejhezčí .. kdyby se tohle řešilo ve facadách .. tj. nejde DB - Hibernate .. tak začnou blokovat a zkoušet po třeba 20 vteřinách
Přijde mi to hezčí a bezpečnější než při každém get-save .. používat try catch a nějaký čekací mechanismus .. pak se to někde zapomene, nebo neupraví ... kdežto fadady jsou na jednom místě a většina App přistupuje k DB jen přes ně.
When starting backend without a running database, it writes 2 exceptions (not sure if this is OK or not) and then correctly starts waiting.
11:58:32,936 |-WARN in ch.qos.logback.classic.db.ConfigurableConnectionSource@172036a1 - Could not discover the dialect to use. virtuoso.jdbc4.VirtuosoException: Connection failed: Connection refused: connect
at virtuoso.jdbc4.VirtuosoException: Connection failed: Connection refused: connect
at at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source)
at at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source)
at at virtuoso.jdbc4.VirtuosoConnection.(Unknown Source)
at at virtuoso.jdbc4.Driver.connect(Unknown Source)
at at java.sql.DriverManager.getConnection(Unknown Source)
at at java.sql.DriverManager.getConnection(Unknown Source)
at at ch.qos.logback.core.db.DriverManagerConnectionSource.getConnection(DriverManagerConnectionSource.java:54)
at at ch.qos.logback.core.db.ConnectionSourceBase.discoverConnectionProperties(ConnectionSourceBase.java:48)
at at ch.qos.logback.core.db.DriverManagerConnectionSource.start(DriverManagerConnectionSource.java:38)
at at ch.qos.logback.classic.db.ConfigurableConnectionSource.start(ConfigurableConnectionSource.java:31)
at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.end(NestedComplexPropertyIA.java:167)
at at ch.qos.logback.core.joran.spi.Interpreter.callEndAction(Interpreter.java:317)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:196)
at at ch.qos.logback.core.joran.spi.Interpreter.endElement(Interpreter.java:182)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:62)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:149)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:135)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49)
at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:148)
at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:128)
at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:107)
at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:295)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:269)
at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:281)
at at cz.cuni.xrg.intlib.backend.AppEntry.(AppEntry.java:41)
11:58:32,978 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
11:58:32,986 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
11:58:33,070 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:58:33,220 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate.type] to WARN
11:58:33,220 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate] to WARN
11:58:33,221 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to WARN
11:58:33,221 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to ALL
11:58:33,221 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
11:58:33,223 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DB] to Logger[ROOT]
11:58:33,223 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
11:58:33,225 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@467c1a71 - Registering current configuration as safe fallback point
IX 09, 2013 11:58:34 DOP. cz.cuni.xrg.intlib.commons.configuration.AppConfig
INFO: Loading configuration from: C:\Users\Kuba/.intlib/config.properties
11:58:35 [main] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
11:58:37 [main] WARN o.h.e.j.i.JdbcServicesImpl - HHH000342: Could not obtain connection to query metadata : Connection failed: Connection refused: connect
11:58:41 [main] ERROR o.h.h.s.PersistentTableBulkIdStrategy - Unable obtain JDBC Connection
virtuoso.jdbc4.VirtuosoException: Connection failed: Connection refused: connect
at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoConnection.connect(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoConnection.(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.Driver.connect(Unknown Source) ~[jdbc-driver-4.jar:na]
at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.7.0_25]
at java.sql.DriverManager.getConnection(Unknown Source) ~[na:1.7.0_25]
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173) ~[spring-jdbc-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164) ~[spring-jdbc-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149) ~[spring-jdbc-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119) ~[spring-jdbc-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:70) ~[hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.internal.SessionFactoryImpl$2.obtainConnection(SessionFactoryImpl.java:578) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.hql.spi.PersistentTableBulkIdStrategy.exportTableDefinitions(PersistentTableBulkIdStrategy.java:138) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.hql.spi.PersistentTableBulkIdStrategy.prepare(PersistentTableBulkIdStrategy.java:104) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:490) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1790) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.EntityManagerFactoryImpl.(EntityManagerFactoryImpl.java:96) [hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914) [hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899) [hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76) [hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:268) [spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310) [spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83) [spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at cz.cuni.xrg.intlib.backend.AppEntry.initSpring(AppEntry.java:113) [classes/:na]
at cz.cuni.xrg.intlib.backend.AppEntry.run(AppEntry.java:159) [classes/:na]
at cz.cuni.xrg.intlib.backend.AppEntry.main(AppEntry.java:216) [classes/:na]
11:58:41 [main] INFO c.c.x.i.c.a.m.ModuleFacade - Starting module facade
When running the dbpedia pipeline and immediately stopping database, I get these exceptions (again, not sure if handled correctly or not). Finally, when virtuoso is restarted, the pipeline finishes, but again, it is not clear from the log if everything is OK.
12:01:51 [Thread-9] INFO c.c.x.i.r.i.VirtuosoRDFRepo - Set new data graph - http://linked.opendata.cz/resource/odcs/internal/pipeline/exec/15/dpu/1/du/0
12:01:51 [Thread-9] INFO c.c.x.i.r.i.VirtuosoRDFRepo - Virtuoso repository with data graph successfully incicialized.
IX 09, 2013 12:01:51 ODP. cz.cuni.xrg.intlib.commons.configuration.AppConfig
INFO: Loading configuration from: C:\Users\Kuba/.intlib/config.properties
12:01:51 [Thread-9] INFO c.c.x.i.b.e.d.i.AnnotationProcessor - Create output DataUnit for field: rdfDataUnit
12:01:52 [Thread-9] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:01:54 [Thread-9] ERROR o.h.e.j.s.SqlExceptionHelper - Virtuoso Communications Link Failure (timeout) : Connection to the server lost
12:01:55 [pool-2-thread-1] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:01:56 [Thread-9] ERROR o.s.o.j.JpaTransactionManager - Commit exception overridden by rollback exception
org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.SQLGrammarException: could not execute statement; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:326) ~[spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120) ~[spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:516) ~[spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
at cz.cuni.xrg.intlib.backend.facade.PipelineFacade$$EnhancerByCGLIB$$288bf0f7.save() ~[cglib-3.0.jar:na]
at cz.cuni.xrg.intlib.backend.execution.dpu.Executor.execute(Executor.java:382) ~[classes/:na]
at cz.cuni.xrg.intlib.backend.execution.dpu.Executor.run(Executor.java:420) ~[classes/:na]
at java.lang.Thread.run(Unknown Source) ~[na:1.7.0_25]
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) ~[hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) ~[hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:80) ~[hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:512) ~[spring-orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]
... 10 common frames omitted
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1256) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.persister.collection.OneToManyPersister.recreate(OneToManyPersister.java:183) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreateAction.java:58) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:292) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:75) ~[hibernate-entitymanager-4.2.4.Final.jar:4.2.4.Final]
... 11 common frames omitted
Caused by: virtuoso.jdbc4.VirtuosoException: Virtuoso Communications Link Failure (timeout) : Connection to the server lost
at virtuoso.jdbc4.VirtuosoFuture.nextResult(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoResultSet.process_result(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoResultSet.getMoreResults(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoPreparedStatement.sendQuery(Unknown Source) ~[jdbc-driver-4.jar:na]
at virtuoso.jdbc4.VirtuosoPreparedStatement.executeUpdate(Unknown Source) ~[jdbc-driver-4.jar:na]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133) ~[hibernate-core-4.2.4.Final.jar:4.2.4.Final]
... 25 common frames omitted
12:01:57 [pool-2-thread-1] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
Exception in thread "Thread-9" org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking
at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:543)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.doRollbackOnCommitException(AbstractPlatformTransactionManager.java:892)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:394)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
at cz.cuni.xrg.intlib.backend.facade.PipelineFacade$$EnhancerByCGLIB$$288bf0f7.save()
at cz.cuni.xrg.intlib.backend.execution.dpu.Executor.execute(Executor.java:382)
at cz.cuni.xrg.intlib.backend.execution.dpu.Executor.run(Executor.java:420)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.persistence.PersistenceException: unexpected error when rollbacking
at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:109)
at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:539)
... 11 more
Caused by: org.hibernate.TransactionException: rollback failed
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:215)
at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:106)
... 12 more
Caused by: java.lang.NullPointerException
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:163)
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:209)
... 13 more
12:01:59 [pool-2-thread-1] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 1 attempts.
12:02:02 [Thread-4] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:02 [Thread-4] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:02 [Thread-4] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 1 attempts.
12:02:05 [pool-2-thread-1] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:06 [Thread-4] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:06 [Thread-4] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:06 [Thread-4] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 2 attempts.
12:02:07 [pool-2-thread-1] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:09 [pool-2-thread-1] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 2 attempts.
12:02:10 [Thread-4] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:10 [Thread-4] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:10 [Thread-4] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 3 attempts.
12:02:14 [Thread-4] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:14 [Thread-4] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:14 [Thread-4] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 4 attempts.
12:02:16 [pool-2-thread-1] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
12:02:23 [pool-2-thread-1] ERROR o.h.e.j.s.SqlExceptionHelper - Connection failed: Connection refused: connect
12:02:23 [pool-2-thread-1] WARN c.c.x.i.b.f.PipelineFacade - Database is down after 3 attempts.
12:02:26 [pool-2-thread-1] DEBUG c.c.x.i.b.e.p.Executor - Execution failed
12:02:26 [pool-2-thread-1] DEBUG c.c.x.i.b.e.p.Executor - Clean up ...
12:02:26 [pool-2-thread-1] INFO c.c.x.i.r.i.VirtuosoRDFRepo - Virtuoso repository with data graph succesfully shut down
12:02:26 [Thread-10] DEBUG c.c.x.i.r.i.VirtuosoRDFRepo - Repository with data graph destroyed SUCCESSFULL.
12:02:26 [pool-2-thread-1] DEBUG c.c.x.i.b.e.p.Executor - Clean up finished
It should be clearer from the log if everything is OK or not. Exception stack trace usually indicates that something is wrong.
basic idea of solution: do souboru vsechno (musi byt volitelne kde ten soubor je) na standardni vystup vsechno
Also please explain what happened in the two instances shown here
We can let user declare log file in property file. Related to #373 we probably allow only one instance per configuration file, so there should be no collisions. If user specify same log file for two instances then they will both use the same file and the logs merge .. so the log will probably make no sense at the end.
Backend now crashed with the following exception:
08:04:51 [Thread-5] WARN o.h.e.j.s.SqlExceptionHelper - SQL Error: -3, SQLState: 42000
08:04:51 [Thread-5] ERROR o.h.e.j.s.SqlExceptionHelper - Virtuoso Communications Link Failure (timeout) : Software caused connection abort: recv failed
Exception in thread "Thread-5" javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:277)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:310)
at com.sun.proxy.$Proxy39.getResultList(Unknown Source)
at cz.cuni.xrg.intlib.commons.app.scheduling.ScheduleFacade.getAllTimeBased(ScheduleFacade.java:109)
at cz.cuni.xrg.intlib.commons.app.scheduling.ScheduleFacade$$FastClassByCGLIB$$ed01a88b.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:618)
at cz.cuni.xrg.intlib.commons.app.scheduling.ScheduleFacade$$EnhancerByCGLIB$$88294ab4.getAllTimeBased()
at cz.cuni.xrg.intlib.backend.scheduling.Scheduler.onApplicationEvent(Scheduler.java:92)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324)
at cz.cuni.xrg.intlib.backend.Heartbeat.run(Heartbeat.java:44)
at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:61)
at org.hibernate.loader.Loader.getResultSet(Loader.java:2040)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1837)
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1816)
at org.hibernate.loader.Loader.doQuery(Loader.java:900)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:342)
at org.hibernate.loader.Loader.doList(Loader.java:2526)
at org.hibernate.loader.Loader.doList(Loader.java:2512)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2342)
at org.hibernate.loader.Loader.list(Loader.java:2337)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:495)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:356)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:195)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1269)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:268)
... 15 more
Caused by: virtuoso.jdbc4.VirtuosoException: Virtuoso Communications Link Failure (timeout) : Software caused connection abort: recv failed
at virtuoso.jdbc4.VirtuosoFuture.nextResult(Unknown Source)
at virtuoso.jdbc4.VirtuosoResultSet.process_result(Unknown Source)
at virtuoso.jdbc4.VirtuosoResultSet.getMoreResults(Unknown Source)
at virtuoso.jdbc4.VirtuosoPreparedStatement.sendQuery(Unknown Source)
at virtuoso.jdbc4.VirtuosoPreparedStatement.executeQuery(Unknown Source)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:56)
... 30 more
Related to DB connection - hibernate. Reassign to Honza.
Kubo can you please describe steps to reproduce?
Not really, but was caused by sleep/resume & related network disconnect
No, it is on my local version from yesterday. How could I sleep/resume odcs.xrg.cz? :)
:D
I would suggest to postpone this issue for 0.4.2?
OK
Postponed for iter 0.4.2
je to aktualne? je to zmysluplne? tomas mozno close?
@jakubklimek, please test whether it occurs on the current version
During merging of larger number of triples, virtuoso crashed. I had to kill it on the server. This resulted in several exceptions and the backend crashed.