Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Db operation failed(java.sql.SQLException: Database instance not initialized)
Db operation failed [message #1810526] Tue, 13 August 2019 07:39 Go to next message
Hasitha Pathirage is currently offline Hasitha PathirageFriend
Messages: 2
Registered: August 2019
Junior Member
Hi,
I am receiving the following error
2019-08-13T13:02:29,326 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger - Received WireEnvelope from org.eclipse.kura.wire.WireAsset-1565677757718-147
2019-08-13T13:02:29,326 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger - Record List content: 
2019-08-13T13:02:29,327 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger -   Record content: 
2019-08-13T13:02:29,327 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger -     Channel-1_timestamp : 1565681549307
2019-08-13T13:02:29,327 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger -     assetName : Modbusrunner
2019-08-13T13:02:29,327 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger -     Channel-1 : 0
2019-08-13T13:02:29,328 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger -     Channel-1_error : 
2019-08-13T13:02:29,328 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.i.w.l.Logger - 
2019-08-13T13:02:34,312 [DefaultQuartzScheduler_Worker-1] INFO  o.e.k.c.d.DataServiceImpl - Storing message on topic: #account-name/#client-id/W1/A1, priority: 7
2019-08-13T13:02:34,313 [DefaultQuartzScheduler_Worker-1] WARN  o.e.k.c.d.H2DbServiceImpl - Db operation failed
java.sql.SQLException: Database instance not initialized
	at org.eclipse.kura.core.db.H2DbServiceImpl.getConnectionInternal(H2DbServiceImpl.java:315)
	at org.eclipse.kura.core.db.H2DbServiceImpl.withConnection(H2DbServiceImpl.java:161)
	at org.eclipse.kura.core.data.store.DbDataStore.withConnection(DbDataStore.java:600)
	at org.eclipse.kura.core.data.store.DbDataStore.getMessageCount(DbDataStore.java:227)
	at org.eclipse.kura.core.data.store.DbDataStore.store(DbDataStore.java:258)
	at org.eclipse.kura.core.data.DataServiceImpl.publish(DataServiceImpl.java:529)
	at org.eclipse.kura.core.cloud.CloudServiceImpl.publish(CloudServiceImpl.java:994)
	at org.eclipse.kura.core.cloud.publisher.CloudPublisherImpl.publish(CloudPublisherImpl.java:171)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.publish(CloudPublisher.java:256)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.onWireReceive(CloudPublisher.java:173)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.updated(WireSupportImpl.java:164)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.updated(CloudPublisher.java:186)
	at org.eclipse.equinox.internal.wireadmin.WireImpl.update(WireImpl.java:193)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl$EmitterPortImpl.emit(WireSupportImpl.java:196)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.emit(WireSupportImpl.java:126)
	at org.eclipse.kura.internal.wire.asset.WireAsset.emitChannelRecords(WireAsset.java:309)
	at org.eclipse.kura.internal.wire.asset.WireAsset.emitAllReadChannels(WireAsset.java:234)
	at org.eclipse.kura.internal.wire.asset.WireAsset.onWireReceive(WireAsset.java:212)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.updated(WireSupportImpl.java:164)
	at org.eclipse.kura.internal.wire.asset.WireAsset.updated(WireAsset.java:395)
	at org.eclipse.equinox.internal.wireadmin.WireImpl.update(WireImpl.java:193)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl$EmitterPortImpl.emit(WireSupportImpl.java:196)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.emit(WireSupportImpl.java:126)
	at org.eclipse.kura.internal.wire.timer.EmitJob.execute(EmitJob.java:63)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
2019-08-13T13:02:34,316 [DefaultQuartzScheduler_Worker-1] ERROR o.e.k.i.w.p.CloudPublisher - Error in publishing wire records using cloud publisher..
org.eclipse.kura.KuraStoreException: "Error performing operation on store. Cannot get message count"
	at org.eclipse.kura.core.data.store.DbDataStore.withConnection(DbDataStore.java:602)
	at org.eclipse.kura.core.data.store.DbDataStore.getMessageCount(DbDataStore.java:227)
	at org.eclipse.kura.core.data.store.DbDataStore.store(DbDataStore.java:258)
	at org.eclipse.kura.core.data.DataServiceImpl.publish(DataServiceImpl.java:529)
	at org.eclipse.kura.core.cloud.CloudServiceImpl.publish(CloudServiceImpl.java:994)
	at org.eclipse.kura.core.cloud.publisher.CloudPublisherImpl.publish(CloudPublisherImpl.java:171)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.publish(CloudPublisher.java:256)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.onWireReceive(CloudPublisher.java:173)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.updated(WireSupportImpl.java:164)
	at org.eclipse.kura.internal.wire.publisher.CloudPublisher.updated(CloudPublisher.java:186)
	at org.eclipse.equinox.internal.wireadmin.WireImpl.update(WireImpl.java:193)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl$EmitterPortImpl.emit(WireSupportImpl.java:196)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.emit(WireSupportImpl.java:126)
	at org.eclipse.kura.internal.wire.asset.WireAsset.emitChannelRecords(WireAsset.java:309)
	at org.eclipse.kura.internal.wire.asset.WireAsset.emitAllReadChannels(WireAsset.java:234)
	at org.eclipse.kura.internal.wire.asset.WireAsset.onWireReceive(WireAsset.java:212)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.updated(WireSupportImpl.java:164)
	at org.eclipse.kura.internal.wire.asset.WireAsset.updated(WireAsset.java:395)
	at org.eclipse.equinox.internal.wireadmin.WireImpl.update(WireImpl.java:193)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl$EmitterPortImpl.emit(WireSupportImpl.java:196)
	at org.eclipse.kura.internal.wire.helper.WireSupportImpl.emit(WireSupportImpl.java:126)
	at org.eclipse.kura.internal.wire.timer.EmitJob.execute(EmitJob.java:63)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.sql.SQLException: Database instance not initialized
	at org.eclipse.kura.core.db.H2DbServiceImpl.getConnectionInternal(H2DbServiceImpl.java:315)
	at org.eclipse.kura.core.db.H2DbServiceImpl.withConnection(H2DbServiceImpl.java:161)
	at org.eclipse.kura.core.data.store.DbDataStore.withConnection(DbDataStore.java:600)
	... 23 more



This occurred while trying to publish data using mqtt, What is the solution for this.
Re: Db operation failed [message #1810648 is a reply to message #1810526] Thu, 15 August 2019 06:44 Go to previous message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 391
Registered: July 2015
Location: Italy
Senior Member
Hello,
I believe you need to provide more context on what is your setup and what you are trying to achieve.

From the log it seems that the database you are trying to use is not initialised. Are you using a different instance from the default one?
Are you using wires? If so, what is the graph and the component's configuration.
Maybe you can review all the components' configuration and see if you changed something from the default one that caused the issue.

Best regards,
Matteo
Previous Topic:Starting with Kura Emulator (Simulation)
Next Topic:Auto create driver instance, assets and channels
Goto Forum:
  


Current Time: Fri Jul 03 20:34:02 GMT 2020

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top