Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] Question about snapshot persistence

Hi David,

sorry that it took a while to get back to you.

The problem appears with a Kura Emulator. There is no error in the Kura console.

With ESF 3.1 on a raspberry device the problem is a little differen. It fails on updateConfiguration instead of snapshot (which would be the next step). The exact stack trace is:

org.eclipse.kura.KuraException: An internal error occurred. {0}
        at org.eclipse.kura.core.configuration.ConfigurationServiceImpl.loadLatestSnapshotConfigurations(ConfigurationServiceImpl.java:1127)
        at org.eclipse.kura.core.configuration.ConfigurationServiceImpl.buildCurrentConfiguration(ConfigurationServiceImpl.java:453)
        at org.eclipse.kura.core.configuration.ConfigurationServiceImpl.updateConfigurations(ConfigurationServiceImpl.java:488)
        at org.eclipse.kura.core.configuration.ConfigurationServiceImpl.updateConfiguration(ConfigurationServiceImpl.java:286)
        at com.omsense.shepherd.OsgiShepherd.configChangedInStore(OsgiShepherd.java:620)
        at com.omsense.shepherd.OsgiShepherd.subPathValueHasChanged(OsgiShepherd.java:654)
        at com.omsense.datastore.Topic.notifySubpathSubscribers(Topic.java:388)
        at com.omsense.datastore.Topic.getAndUpdateRetainTopic(Topic.java:274)
        at com.omsense.datastore.Topic.postMessage(Topic.java:152)
        at com.omsense.datastore.Datastore.postMessage(Datastore.java:187)
        at com.omsense.datastore.Datastore.postMessage(Datastore.java:183)
        at com.omsense.web.SocketIOEngine$11.onData(SocketIOEngine.java:638)
        at com.omsense.web.SocketIOEngine$11.onData(SocketIOEngine.java:1)
        at com.corundumstudio.socketio.namespace.Namespace.onEvent(Namespace.java:134)
        at com.corundumstudio.socketio.handler.PacketListener.onPacket(PacketListener.java:103)
        at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:92)
        at com.corundumstudio.socketio.handler.InPacketHandler.channelRead0(InPacketHandler.java:36)
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
        at com.corundumstudio.socketio.transport.WebSocketTransport.channelRead(WebSocketTransport.java:94)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at com.corundumstudio.socketio.transport.PollingTransport.channelRead(PollingTransport.java:109)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at com.corundumstudio.socketio.handler.AuthorizeHandler.channelRead(AuthorizeHandler.java:115)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:108)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
        at java.lang.Thread.run(Thread.java:724)
Caused by: javax.xml.bind.UnmarshalException: Line 29, Col: 26: java.lang.NullPointerException: A null service reference is not allowed.
 - with linked exception:
[com.sun.xml.internal.bind.api.AccessorException: java.lang.NullPointerException: A null service reference is not allowed.]
        at org.eclipse.kura.core.configuration.util.XmlUtil.unmarshal(XmlUtil.java:139)
        at org.eclipse.kura.core.configuration.util.XmlUtil.unmarshal(XmlUtil.java:99)
        at org.eclipse.kura.core.configuration.ConfigurationServiceImpl.loadLatestSnapshotConfigurations(ConfigurationServiceImpl.java:1115)
        ... 50 more
Caused by: com.sun.xml.internal.bind.api.AccessorException: java.lang.NullPointerException: A null service reference is not allowed.
        at com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedAccessor.set(AdaptedAccessor.java:72)
        at com.sun.xml.internal.bind.v2.runtime.reflect.Accessor.receive(Accessor.java:156)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.endElement(UnmarshallingContext.java:523)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.InterningXmlVisitor.endElement(InterningXmlVisitor.java:66)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleEndElement(StAXStreamConnector.java:207)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:171)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
        at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
        at org.eclipse.kura.core.configuration.util.XmlUtil.unmarshal(XmlUtil.java:120)
        ... 52 more
Caused by: java.lang.NullPointerException: A null service reference is not allowed.
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:586)
        at org.eclipse.kura.core.configuration.XmlConfigPropertiesAdapter.unmarshal(XmlConfigPropertiesAdapter.java:283)
        at org.eclipse.kura.core.configuration.XmlConfigPropertiesAdapter.unmarshal(XmlConfigPropertiesAdapter.java:1)
        at com.sun.xml.internal.bind.v2.runtime.reflect.AdaptedAccessor.set(AdaptedAccessor.java:70)
        ... 60 more

Using Kura 1.2 on Raspberry everything works ok.

I haven’t checked the return value, will add a check there.

Thanks and best,
Kevin

On 15 Jul 2015, at 01:37, Woodard, David <David.Woodard@xxxxxxxxxxxx> wrote:

Hi Kevin,

I did a check and all seems to be working. What version of Kura are you using? Are you getting the return of mConfigurationService.snapshot()? That method will return the timestamp at which time the snapshot was taken if successful. Can you check both log files (/var/log/kura.log and /var/log/kura-console.log) for any errors?

Thanks,
--Dave

On Jul 14, 2015, at 09:37, Kevin Read <me@xxxxxxxxxxxxxx> wrote:

Dear Kura team,

I’m having trouble interfacing directly with ConfigurationService. I’m trying to update the configuration for a certain pid with a Map, which seems to work fine:

mConfigurationService.updateConfiguration(pid, map);

The Component gets its update method called and all changed parameters are there. But when I want to persist this configuration change and try to create a new snapshot nothing happens. I tried

mConfigurationService.snapshot();

But the Kura Web console shows no new snapshot, and none appear in the folder (/tmp/kura/snapshots in my case).

Is there anything else I need to do?

Thanks and best,
Kevin
_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev

_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top