Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save the UI config in agent configuration page #386

Closed
mani8884 opened this issue May 15, 2018 · 3 comments
Closed

Unable to save the UI config in agent configuration page #386

mani8884 opened this issue May 15, 2018 · 3 comments
Labels
Milestone

Comments

@mani8884
Copy link

Hi Trask,

We are using glowroot version 0.10.4 collector and agent. We have instrumented the agent to the collector and didn't make any transactions on the agent side. As we know, there are two transaction types available, one is Startup and other is Web. Click on Agent configuration --> select UI, Default transaction type is Web. When we try to update UI configurations, its working fine for the first time and failing afterwards. Error and stack trace is below,
An error occurred
Cannot build UiConfigDto, some of required attributes are not set [defaultTransactionType]

com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.glowroot.ui.ImmutableUiConfigDto] value failed: Cannot build UiConfigDto, some of required attributes are not set [defaultTransactionType]
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:399)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDelegate(StdValueInstantiator.java:262)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1095)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:296)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726)
at org.glowroot.ui.CommonHandler.callMethod(CommonHandler.java:722)
at org.glowroot.ui.CommonHandler.handleJsonServiceMappings(CommonHandler.java:479)
at org.glowroot.ui.CommonHandler.handleRequest(CommonHandler.java:389)
at org.glowroot.ui.CommonHandler.handle(CommonHandler.java:181)
at org.glowroot.ui.HttpServerHandler.channelRead(HttpServerHandler.java:237)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Cannot build UiConfigDto, some of required attributes are not set [defaultTransactionType]
at org.glowroot.ui.ImmutableUiConfigDto$Builder.build(ImmutableUiConfigDto.java:428)
at org.glowroot.ui.ImmutableUiConfigDto.fromJson(ImmutableUiConfigDto.java:254)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call1(AnnotatedMethod.java:125)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createUsingDelegate(StdValueInstantiator.java:244)
... 44 more

Please help me in fixing this issue. Thanks.

@mani8884 mani8884 changed the title Unable to Save the Ui confi in Agent Configuration Page Unable to Save the UI config in Agent Configuration Page May 15, 2018
@trask
Copy link
Member

trask commented May 16, 2018

Hi @mani8884, thanks for reporting this! I was able to repro, try adding track by to https://github.com/glowroot/glowroot/blob/v0.10.9/ui/app/views/config/ui.html#L40, e.g. ng-repeat="transactionType in allTransactionTypes track by transactionType.name", and see if that does the trick for you also.

@mani8884
Copy link
Author

mani8884 commented May 16, 2018

Hi Trask,

Thanks for the quick response. I have added that change and started Collector and agent. First time, I was able to see "transactiontype" option in the brackets in the drop down in transactions page and when it comes to UI config in agent Configuration page, have seen empty space and Startup in the Default transaction type field. This happened for the first time and never see that behavior again in the subsequent save operations. Now, Save Changes went fine. I tried several times and was able to save the UI config's successfully. Thanks for help :)

@trask trask added the bug label May 16, 2018
@trask trask added this to the v0.10.10 milestone May 16, 2018
@trask trask closed this as completed in a5ac63f May 16, 2018
@trask
Copy link
Member

trask commented May 16, 2018

Hi @mani8884, thanks again for reporting this! It should be fixed now in the latest snapshot release glowroot-central-0.10.10-SNAPSHOT-dist.zip.

@trask trask changed the title Unable to Save the UI config in Agent Configuration Page Unable to save the UI config in agent configuration page Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants