ID may not be null | Java JDA - java

I am creating a discord bot using Java JDA library. And I have a button, and a listener that handle the interactions. So, there is my code.
guild.createTextChannel("\uD83C\uDF9F〡" + senderNickname)
.addPermissionOverride(sender, EnumSet.of(Permission.VIEW_CHANNEL), null)
.addPermissionOverride(guild.getPublicRole(), null, EnumSet.of(Permission.VIEW_CHANNEL))
.queue(channel -> {
String targetChannelSTRINGVALUE = channel.getId();
System.out.println(targetChannelSTRINGVALUE);
Configuration.setChannel(targetChannelSTRINGVALUE);
}, Throwable::printStackTrace);
It works, but if we look here:
String targetChannelSTRINGVALUE = channel.getId();
System.out.println(targetChannelSTRINGVALUE);
Configuration.setChannel(targetChannelSTRINGVALUE);
We see my desperate attempts to do something.
There I tried to get a channel id from Configuration class, from variable.
MessageChannel channel = api.getTextChannelById(Configuration.getChannel());
And as a result, I have:
java.lang.IllegalArgumentException: ID may not be null
at net.dv8tion.jda.internal.utils.Checks.notNull(Checks.java:82)
at net.dv8tion.jda.internal.utils.Checks.notEmpty(Checks.java:88)
at net.dv8tion.jda.api.utils.MiscUtil.parseSnowflake(MiscUtil.java:115)
at net.dv8tion.jda.api.utils.cache.SnowflakeCacheView.getElementById(SnowflakeCacheView.java:59)
at net.dv8tion.jda.api.entities.channel.attribute.IGuildChannelContainer.getTextChannelById(IGuildChannelContainer.java:700)
at ru.raklovus.listeners.ButtonClickListener.onButtonInteraction(ButtonClickListener.java:36)
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:424)
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:171)
at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleAction(InteractionCreateHandler.java:134)
at net.dv8tion.jda.internal.handle.InteractionCreateHandler.handleInternally(InteractionCreateHandler.java:86)
at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:39)
at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:984)
at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:870)
at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:848)
at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:1023)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
Important: I tried to debug it:
System.out.println(targetChannelSTRINGVALUE);
And it works. But it prints only after the error. What should I do?

Related

py4j.Py4JException: Method set([class java.lang.String, class java.util.ArrayList]) does not exist in Databricks

I am trying to access a remote S3 bucket using Databricks.
From what I have understood, this is what my code should look like,
sc._jsc.hadoopConfiguration().set("fs.s3a.access.key", access_key)
sc._jsc.hadoopConfiguration().set("fs.s3a.secret.key", secret_access_key)
sc._jsc.hadoopConfiguration().set("fs.s3a.endpoint", "s3.amazonaws.com")
df = spark.read.format("csv").option("header",True).load('s3a://bucket/path/to/file.csv')
df.show()
I seem to be getting the following error when trying to set the Spark configurations,
Py4JError: An error occurred while calling o371.set. Trace:
py4j.Py4JException: Method set([class java.lang.String, class java.util.ArrayList]) does not exist
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:341)
at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:349)
at py4j.Gateway.invoke(Gateway.java:286)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:251)
at java.lang.Thread.run(Thread.java:750)
What am I doing wrong?
Check your configuration with S3 as per the official document:
Access_key = dbutils.secrets.get(scope = "Scope_name", key = "aws_access_key")
Secret_key = dbutils.secrets.get(scope = "Scope_name", key = "aws_secret_key")
sc._jsc.hadoopConfiguration().set("fs.s3a.access.key", Access_key)
sc._jsc.hadoopConfiguration().set("fs.s3a.secret.key", Secret_key)
region = "aws-region-id"
sc._jsc.hadoopConfiguration().set("fs.s3a.endpoint", "s3." + region + ".amazonaws.com")
conn = sc.textFile("s3a://%s/.../..." % aws_bucket_name)
conn.count()
Or
You can try this alternative approach Mounting AWS S3 buckets on Databricks by Deepak Rajak

Discord JDA "Kick" command is not working

I've been sitting here since 3 days now. Trying to figure out what's wrong with my code.
I have tried multiple solutions and tried to research my problem on multiple platforms. Nothing helped.
I always get a long error message in the console:
[JDA MainWS-ReadThread] ERROR JDA - One of the EventListeners had an uncaught exception
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
at java.base/java.util.Objects.checkIndex(Objects.java:359)
at java.base/java.util.ArrayList.get(ArrayList.java:427)
at java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1347)
at de.ayahuascasuppe.commands.Kick.onMessageReceived(Kick.java:31)
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:358)
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:163)
at net.dv8tion.jda.internal.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:111)
at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36)
at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:953)
at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:840)
at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:818)
at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:992)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
[JDA MainWS-ReadThread] ERROR JDA - One of the EventListeners had an uncaught exception
java.lang.IllegalStateException: This message event did not happen in a guild
at net.dv8tion.jda.api.events.message.GenericMessageEvent.getGuild(GenericMessageEvent.java:154)
at de.ayahuascasuppe.commands.Kick.onMessageReceived(Kick.java:30)
at net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:358)
at net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88)
at net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70)
at net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:163)
at net.dv8tion.jda.internal.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:111)
at net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36)
at net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:953)
at net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:840)
at net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:818)
at net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:992)
at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385)
at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276)
at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996)
at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755)
at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
So I tried creating a new class. with exact the same code I had, and at the beginning it worked, especially these lines of code worked, which didn't work prior:
if (!author.hasPermission(Permission.KICK_MEMBERS)) {
channel.sendMessage("**ERROR**: You don't have permission to kick people!").queue();
return;
}
if (event.getMessage().getMentionedMembers().isEmpty()) {
channel.sendMessage("**ERROR**: You must mention who you want to be kicked").queue();
return;
}
if (args.length < 2) {
channel.sendMessage("**ERROR**: Correct usage: `" + Main.prefix + "kick <#User> <reason>").queue();
return;
}
Now I added a few things here and there, and then It just stopped working again. I deleted everything I added to the code to the point where the code was working, and it still didn't worked.
at de.ayahuascasuppe.commands.Kick.onMessageReceived(Kick.java:31)
refers to:
mentioned = event.getMessage().getMentionedMembers().get(0);
Here my full code:
Prefix = "u!"
logChannel = "984832326947197008"
package de.ayahuascasuppe.commands;
import java.awt.Color;
import java.time.OffsetDateTime;
import java.util.Random;
import de.ayahuascasupe.de.main.Main;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.Permission;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.MessageChannel;
import net.dv8tion.jda.api.entities.PrivateChannel;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
public class Kick extends ListenerAdapter {
protected Member mentioned;
Random randNum = new Random();
public void onMessageReceived(MessageReceivedEvent event) {
String[] args = event.getMessage().getContentStripped().split(" ");
String authorName = event.getAuthor().getName();
String authorAvatar = event.getAuthor().getAvatarUrl();
String message = event.getMessage().getContentStripped();
MessageChannel channel = event.getChannel();
Member author = event.getMessage().getMember();
Guild guild = event.getGuild();
mentioned = event.getMessage().getMentions().getMembers().get(0);
// add code here:
if (message.startsWith(Main.prefix + "kick")) {
if (!author.hasPermission(Permission.KICK_MEMBERS)) {
channel.sendMessage("**ERROR**: You don't have permission to kick people!").queue();
return;
}
if (event.getMessage().getMentions().getMembers().isEmpty()) {
channel.sendMessage("**ERROR**: You must mention who you want to be kicked").queue();
return;
}
if (args.length < 2) {
channel.sendMessage("**ERROR**: Correct usage: `" + Main.prefix + "kick <#User> <reason>").queue();
return;
}
// event.getGuild().kick(event.getMentionedMembers().get(0).getId(),
// reason).queue();
channel.sendMessage(
"**SUCCESS**: You have kicked " + mentioned.getAsMention() + " from the Discord server.").queue();
EmbedBuilder embed = new EmbedBuilder();
embed.setTitle(event.getAuthor().getName() + " kicked " + mentioned.getEffectiveName(), null);
embed.setDescription("**Action**: Kick\n\nUser " + mentioned.getAsMention() + " got kicked by "
+ event.getAuthor().getAsMention() + " from the Discord server.\n\nReason: " + "reason");
embed.setThumbnail(event.getGuild().getIconUrl());
embed.setAuthor(authorName, null, authorAvatar);
embed.setColor(Color.RED);
embed.setFooter(Main.embedFooter);
embed.setTimestamp(OffsetDateTime.now());
event.getGuild().getTextChannelById(Main.logChannel).sendMessageEmbeds(embed.build()).queue();
embed.clear();
PrivateChannel dm = mentioned.getUser().openPrivateChannel().complete();
EmbedBuilder embedDM = new EmbedBuilder();
embedDM.setTitle("You got kicked from the Discord server.", null);
embedDM.setDescription("Hello buddy. It seems like you got kicked from the " + guild.getName()
+ " Discord.\nDon't worry. You are not banned. You can use the invite link to join the Discord again.\n\nReason for the kick: "
+ "reason");
embedDM.setThumbnail(event.getGuild().getIconUrl());
embedDM.setColor(Color.RED);
embedDM.setFooter(Main.embedFooter);
embedDM.setTimestamp(OffsetDateTime.now());
dm.sendMessageEmbeds(embedDM.build()).queue();
embedDM.clear();
}
}
}
Information:
JavaSE-17
JDA Version: 5.0.0-alpha.4
The problem not with kick command, the problem is that in your event there's no any mentioned members in the message.
mentioned = event.getMessage().getMentionedMembers().get(0);
Try to use a debugger to see what the event you receive from JDA. Probably, you receive another kind of event (not the new message one), or you don't mention anybody, like it doing by in Discord - #user.
Also, do not share your access tokens on public resources, like Stackoverflow, even if it was revoked :)
Reading the exception tells you the problem
java.lang.IllegalStateException: This message event did not happen in a guild
This means you got a message event for a direct message, which means you cannot get member mentions from it.

com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table peers_v2

I am developing an application with Spring Boot that connects to cassandra
This is my connection settings
spring.data.cassandra.contact-points=localhost
spring.data.cassandra.keyspace-name=sa_tas_db_cassandra
spring.data.cassandra.schema-action=create_if_not_exists
spring.data.cassandra.username=cassandra
I'm just using a table, which I create by means of a model. Which is the following
import org.springframework.data.cassandra.core.mapping.PrimaryKey
import org.springframework.data.cassandra.core.mapping.Table
import java.time.LocalTime
import java.util.*
#Table
data class CallLog(
#PrimaryKey
val callId:UUID,
val CustomerUsername: String? = null,
val callDirection: String? = null,
val callingPartyName:String? = null,
val callingPartyNumber:String? = null,
val calledPartyNumber:String? = null,
val typeOfCall:String? = null,
val startTime: Date? = null,
val answerTime: LocalTime? = null,
val disconnectTime:Date? = null,
val timeCallForwarded: Date? = null,
val voicemailSystemAccessNumber:String? = null
)
That's all my cassandra setup
I am also monitoring my application with new relic, and it is generating the following problem
….netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…etty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…tty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321)
…o.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
….channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
…channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
…hannel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
…o.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
….channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
….channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
….netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
This error does not affect the operation of the application, it only affects the performance
Thanks
This is a part of compatibility test for supporting Cassandra 4.0 that stores information about nodes in the cluster in a table with different name, so driver first assumes that it runs against newer version, and checks this table, and if it receives an error, then it uses the old peers table. It's not possible to reliably detect Cassandra node's features only from version number, that's why it's better to check for table explicitly.
The corresponding code is here.

Apache Isis: Java Type mapping failed

I have one problem with the open source estatio (that is built based on apache isis)
I've export data base schema first in DDL file. After that I have imported the DDL file in PostgresSQL 9.5. The application can be started. And some of fixture can be executed. The problem I have in "Estatio Demo Fixture". The application seems to import few fixtures until the application try to import org.estatio.fixture.financial.BankAccountForAcmeNl.
Following exception occurs:
Stack trace:
org.apache.wicket.WicketRuntimeException
Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted at org.apache.wicket.ajax.markup.html.form.AjaxButton$1#4c421e92 on component [IndicatingAjaxButton [Component id = okButton]] threw an exception
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:268)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
Caused by:
java.lang.reflect.InvocationTargetException
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
Caused by:
java.lang.NumberFormatException
For input string: "nextvalIncodeCommunications.CommunicationChannel_id_seq::regclass"
java.lang.NumberFormatException#forInputString(NumberFormatException.java:65)
java.lang.Long#parseLong(Long.java:589)
java.lang.Long#valueOf(Long.java:803)
org.datanucleus.store.rdbms.mapping.datastore.BigIntRDBMSMapping#setObject(BigIntRDBMSMapping.java:187)
org.datanucleus.store.rdbms.mapping.java.DatastoreIdMapping#setObject(DatastoreIdMapping.java:53)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObjectAsNull(PersistableMapping.java:346)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObject(PersistableMapping.java:317)
org.datanucleus.store.rdbms.mapping.java.PersistableMapping#setObject(PersistableMapping.java:300)
org.datanucleus.store.rdbms.sql.SQLStatementHelper#applyParametersToStatement(SQLStatementHelper.java:228)
org.datanucleus.store.rdbms.query.JDOQLQuery#performExecute(JDOQLQuery.java:609)
org.datanucleus.store.query.Query#executeQuery(Query.java:1855)
org.datanucleus.store.query.Query#executeWithMap(Query.java:1762)
org.datanucleus.api.jdo.JDOQuery#executeWithMap(JDOQuery.java:346)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#getResults(PersistenceQueryFindUsingApplibQueryProcessor.java:117)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#process(PersistenceQueryFindUsingApplibQueryProcessor.java:57)
org.apache.isis.objectstore.jdo.datanucleus.persistence.queries.PersistenceQueryFindUsingApplibQueryProcessor#process(PersistenceQueryFindUsingApplibQueryProcessor.java:41)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#processPersistenceQuery(PersistenceSession.java:606)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#access$000(PersistenceSession.java:147)
org.apache.isis.core.runtime.system.persistence.PersistenceSession$1#execute(PersistenceSession.java:567)
org.apache.isis.core.runtime.system.persistence.PersistenceSession$1#execute(PersistenceSession.java:564)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:188)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:178)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#findInstancesInTransaction(PersistenceSession.java:563)
org.apache.isis.core.runtime.system.persistence.PersistenceSession#firstMatchingQuery(PersistenceSession.java:535)
org.apache.isis.core.runtime.services.persistsession.PersistenceSessionServiceInternalDefault#firstMatchingQuery(PersistenceSessionServiceInternalDefault.java:176)
org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault#firstMatch(DomainObjectContainerDefault.java:534)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannelOwnerLinkRepository#findByCommunicationChannel(CommunicationChannelOwnerLinkRepository.java:65)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#getOwnerLink(CommunicationChannel.java:253)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#removeOwnerLink(CommunicationChannel.java:246)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannel#setOwner(CommunicationChannel.java:241)
org.incode.module.communications.dom.impl.commchannel.CommunicationChannelRepository#newPostal(CommunicationChannelRepository.java:73)
org.estatio.fixture.party.OrganisationAbstract#createCommunicationChannels(OrganisationAbstract.java:90)
org.estatio.fixture.party.OrganisationAbstract#createOrganisation(OrganisationAbstract.java:69)
org.estatio.fixture.party.OrganisationForAcmeNl#execute(OrganisationForAcmeNl.java:30)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:576)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:544)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChild(FixtureScript.java:532)
org.estatio.fixture.financial.BankAccountForAcmeNl#execute(BankAccountForAcmeNl.java:42)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:576)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildT(FixtureScript.java:544)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChild(FixtureScript.java:532)
org.estatio.fixturescripts.EstatioDemoFixture#execute(EstatioDemoFixture.java:72)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#executeChildIfNotAlready(FixtureScript.java:598)
org.apache.isis.applib.fixturescripts.FixtureScript$ExecutionContext#access$200(FixtureScript.java:253)
org.apache.isis.applib.fixturescripts.FixtureScript#run(FixtureScript.java:828)
org.apache.isis.applib.fixturescripts.FixtureScripts#runFixtureScript(FixtureScripts.java:391)
org.apache.isis.applib.services.fixturespec.FixtureScriptsDefault#runFixtureScript(FixtureScriptsDefault.java:108)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#invokeMethodElseFromCache(ActionInvocationFacetForDomainEventAbstract.java:407)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$2#execute(ActionInvocationFacetForDomainEventAbstract.java:261)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$2#execute(ActionInvocationFacetForDomainEventAbstract.java:222)
org.apache.isis.applib.services.iactn.Interaction#executeInternal(Interaction.java:173)
org.apache.isis.applib.services.iactn.Interaction#execute(Interaction.java:143)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#doInvoke(ActionInvocationFacetForDomainEventAbstract.java:310)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract$1#execute(ActionInvocationFacetForDomainEventAbstract.java:164)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:142)
org.apache.isis.core.runtime.system.transaction.IsisTransactionManager#executeWithinTransaction(IsisTransactionManager.java:132)
org.apache.isis.core.runtime.services.persistsession.PersistenceSessionServiceInternalDefault#executeWithinTransaction(PersistenceSessionServiceInternalDefault.java:181)
org.apache.isis.core.metamodel.facets.actions.action.invocation.ActionInvocationFacetForDomainEventAbstract#invoke(ActionInvocationFacetForDomainEventAbstract.java:160)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#executeInternal(ObjectActionDefault.java:400)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#execute(ObjectActionDefault.java:389)
org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionDefault#executeWithRuleChecking(ObjectActionDefault.java:370)
org.apache.isis.viewer.wicket.model.models.ActionModel#executeAction(ActionModel.java:491)
org.apache.isis.viewer.wicket.model.models.ActionModel#load(ActionModel.java:469)
org.apache.isis.viewer.wicket.model.models.ActionModel#load(ActionModel.java:81)
org.apache.wicket.model.LoadableDetachableModel#getObject(LoadableDetachableModel.java:135)
org.apache.isis.viewer.wicket.model.models.ActionModel#execute(ActionModel.java:597)
org.apache.isis.viewer.wicket.ui.components.actions.ActionFormExecutorStrategy#obtainResultAdapter(ActionFormExecutorStrategy.java:72)
org.apache.isis.viewer.wicket.ui.panels.FormExecutorDefault#obtainResultAdapter(FormExecutorDefault.java:498)
org.apache.isis.viewer.wicket.ui.panels.FormExecutorDefault#executeAndProcessResults(FormExecutorDefault.java:129)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#onOkSubmittedOf(PromptFormAbstract.java:228)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract#access$000(PromptFormAbstract.java:60)
org.apache.isis.viewer.wicket.ui.panels.PromptFormAbstract$1#onSubmit(PromptFormAbstract.java:122)
org.apache.wicket.ajax.markup.html.form.AjaxButton$1#onSubmit(AjaxButton.java:113)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter#onSubmit(AjaxFormSubmitBehavior.java:215)
org.apache.wicket.markup.html.form.Form#delegateSubmit(Form.java:1307)
org.apache.wicket.markup.html.form.Form#process(Form.java:976)
org.apache.isis.viewer.wicket.ui.panels.FormAbstract#process(FormAbstract.java:77)
org.apache.wicket.markup.html.form.Form#onFormSubmitted(Form.java:797)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior#onEvent(AjaxFormSubmitBehavior.java:171)
org.apache.wicket.ajax.AjaxEventBehavior#respond(AjaxEventBehavior.java:155)
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior#onRequest(AbstractDefaultAjaxBehavior.java:601)
sun.reflect.NativeMethodAccessorImpl#invoke0(NativeMethodAccessorImpl.java:-2)
sun.reflect.NativeMethodAccessorImpl#invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl#invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method#invoke(Method.java:498)
org.apache.wicket.RequestListenerInterface#internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface#invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#invokeListener(ListenerInterfaceRequestHandler.java:248)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler#respond(ListenerInterfaceRequestHandler.java:234)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor#respond(RequestCycle.java:895)
org.apache.wicket.request.RequestHandlerStack#execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle#execute(RequestCycle.java:265)
org.apache.wicket.request.cycle.RequestCycle#processRequest(RequestCycle.java:222)
org.apache.wicket.request.cycle.RequestCycle#processRequestAndDetach(RequestCycle.java:293)
org.apache.wicket.protocol.http.WicketFilter#processRequestCycle(WicketFilter.java:261)
org.apache.wicket.protocol.http.WicketFilter#processRequest(WicketFilter.java:203)
org.apache.wicket.protocol.http.WicketFilter#doFilter(WicketFilter.java:284)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.togglz.servlet.TogglzFilter#doFilter(TogglzFilter.java:100)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.shiro.web.servlet.AbstractShiroFilter#executeChain(AbstractShiroFilter.java:449)
org.apache.shiro.web.servlet.AbstractShiroFilter$1#call(AbstractShiroFilter.java:365)
org.apache.shiro.subject.support.SubjectCallable#doCall(SubjectCallable.java:90)
org.apache.shiro.subject.support.SubjectCallable#call(SubjectCallable.java:83)
org.apache.shiro.subject.support.DelegatingSubject#execute(DelegatingSubject.java:383)
org.apache.shiro.web.servlet.AbstractShiroFilter#doFilterInternal(AbstractShiroFilter.java:362)
org.apache.shiro.web.servlet.OncePerRequestFilter#doFilter(OncePerRequestFilter.java:125)
org.apache.catalina.core.ApplicationFilterChain#internalDoFilter(ApplicationFilterChain.java:192)
org.apache.catalina.core.ApplicationFilterChain#doFilter(ApplicationFilterChain.java:165)
org.apache.catalina.core.StandardWrapperValve#invoke(StandardWrapperValve.java:198)
org.apache.catalina.core.StandardContextValve#invoke(StandardContextValve.java:96)
org.apache.catalina.authenticator.AuthenticatorBase#invoke(AuthenticatorBase.java:474)
org.apache.catalina.core.StandardHostValve#invoke(StandardHostValve.java:140)
org.apache.catalina.valves.ErrorReportValve#invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve#invoke(AbstractAccessLogValve.java:624)
org.apache.catalina.core.StandardEngineValve#invoke(StandardEngineValve.java:87)
org.apache.catalina.connector.CoyoteAdapter#service(CoyoteAdapter.java:349)
org.apache.coyote.http11.Http11Processor#service(Http11Processor.java:783)
org.apache.coyote.AbstractProcessorLight#process(AbstractProcessorLight.java:66)
org.apache.coyote.AbstractProtocol$ConnectionHandler#process(AbstractProtocol.java:798)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor#doRun(NioEndpoint.java:1434)
org.apache.tomcat.util.net.SocketProcessorBase#run(SocketProcessorBase.java:49)
java.util.concurrent.ThreadPoolExecutor#runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker#run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable#run(TaskThread.java:61)
java.lang.Thread#run(Thread.java:745)
The id of CommunicationChanel is described like following in DB: "id int4 NOT NULL DEFAULT nextval('"IncodeCommunications"."CommunicationChannel_id_seq"'::regclass)"
The Id of this table is automatically created for each insert statement. In this case that is not an insert statement but a find statement without reference Id. I mean it looks up in CommunicationChanelOwnerLink, if there is any row with id is blank.
public void setObject(PreparedStatement ps, int param, Object value)
{
try
{
if (value == null)
{
if (column != null && column.isDefaultable() && column.getDefaultValue() != null && !StringUtils.isWhitespace(column.getDefaultValue().toString()))
{
ps.setLong(param, Long.valueOf(column.getDefaultValue().toString().trim()).longValue());
}
else
this block code of BigIntRDBMSMapping says that, if the value is null (that is exactly in this case) then it will try to parse default value that was initialized by datanucleus before. In this case, default value = "nextvalIncodeCommunications.CommunicationChannel_id_seq::regclass". This value can not be convert to Long value.
Any idea what is exactly happen here?
Thanks.
use case: see my comment Apache Isis: Java Type mapping failed
root cause: see my comment Apache Isis: Java Type mapping failed
solution: no official solution exists. I've talked with Andy Jefferson from datanucleus team. But no useful answer. At the end I've patched the library by my self and wait for appropriate fix

Unknown pdx type=4

My distributed geode system went just well before, but recently not, and I don't know whether it's relevant to the company's power-cut last night. It seems all geode data persisted before can not be deserialize back now.
here's the error information:
Caused by: java.lang.IllegalStateException: Unknown pdx type=4
at com.gemstone.gemfire.internal.InternalDataSerializer.readPdxSerializable(InternalDataSerializer.java:3162)
at com.gemstone.gemfire.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2979)
at com.gemstone.gemfire.DataSerializer.readObject(DataSerializer.java:3210)
at com.gemstone.gemfire.internal.util.BlobHelper.deserializeBlob(BlobHelper.java:101)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1554)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1546)
at com.gemstone.gemfire.internal.cache.PreferBytesCachedDeserializable.getDeserializedValue(PreferBytesCachedDeserializable.java:67)
at com.gemstone.gemfire.internal.cache.EntryEventImpl.getOldValue(EntryEventImpl.java:723)
at com.gemstone.gemfire.internal.cache.LocalRegion.validatedDestroy(LocalRegion.java:1146)
at com.gemstone.gemfire.internal.cache.LocalRegion.destroy(LocalRegion.java:1130)
at com.gemstone.gemfire.internal.cache.AbstractRegion.destroy(AbstractRegion.java:315)
at com.gemstone.gemfire.internal.cache.LocalRegion.remove(LocalRegion.java:9372)
at com.igola.datahub.wwl.geode.WWLResultsDAO.removeByKey(WWLResultsDAO.java:276)
my project was build on play framework and my configuration of geode cache and region is like this:
cache.setIsServer(true);
diskStorage = configuration.getString("geode.storage.name");
String fileStorage = configuration.getString("geode.storage.path");
cache.createDiskStoreFactory()
.setDiskDirs(new File[]{new File(fileStorage)})
.setDiskUsageWarningPercentage(0.8f)
.setAutoCompact(true)
.create(diskStorage);
geodeCache.getCache()
.<DataKey, When2GoData>createRegionFactory(PARTITION_REDUNDANT_PERSISTENT_OVERFLOW)
.setStatisticsEnabled(true)
.setEntryIdleTimeout(new ExpirationAttributes(TIMEOUT_LONG, ExpirationAction.DESTROY))
.setDiskStoreName(geodeCache.getDiskStorage())
.setPartitionAttributes(new PartitionAttributesFactory<>()
.setRedundantCopies(REDUNDANT_COPIES)
.setPartitionResolver(new DataKey())
.create())
.create("xxx");
cache = new CacheFactory()
.set("locators", configuration.getString("geode.locator"))
.set("name", configuration.getString("geode.name")+ "-"+ uuid)
.set("mcast-port", "0")
.set("log-level", "error")
.setPdxPersistent(true)
.setPdxReadSerialized(true)
.create();
Here's the relevant code from the readPdxSerializable method:
PdxType pdxType = gfc.getPdxRegistry().getType(typeId);
if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
logger.trace(LogMarker.SERIALIZER, "readPdxSerializable pdxType={}", pdxType);
}
if (pdxType == null) {
throw new IllegalStateException("Unknown pdx type=" + typeId);
}
So it looks like you have something in your cache that you can no longer deserialize ... due (I think) the fact that the type is no longer registered in the type registry.

Categories

Resources