Unknown pdx type=4 - java

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.

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

ClassCastException with Stacktrace Hazelcast version 4.2.5 using ReplicatedMap

Using Hazelcast version 4.2.5 in a webapp deployed on Tomcat on Kubernetes. We're frequently("every 5 seconds") seeing ClassCastException with a stacktrace in the application logs.
Here's the ClassCastException :
java.lang.ClassCastException: class java.lang.String cannot be cast to class com.hazelcast.internal.serialization.impl.HeapData (java.lang.String is in module java.base of loader 'bootstrap'; com.hazelcast.internal.serialization.impl.HeapData is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader #2f04993d)
27-Oct-2022 22:57:56.357 WARNING [hz.rogueUsers.cached.thread-2] com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.null Collecting metrics from source com.hazelcast.replicatedmap.impl.ReplicatedMapService failed
at com.hazelcast.internal.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:102)
at com.hazelcast.internal.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:76)
at java.base/java.lang.Thread.run(Thread.java:834)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at com.hazelcast.internal.util.executor.CachedExecutorServiceDelegate$Worker.run(CachedExecutorServiceDelegate.java:217)
at com.hazelcast.spi.impl.executionservice.impl.DelegateAndSkipOnConcurrentExecutionDecorator$DelegateDecorator.run(DelegateAndSkipOnConcurrentExecutionDecorator.java:77)
at com.hazelcast.internal.metrics.impl.MetricsService.collectMetrics(MetricsService.java:154)
at com.hazelcast.internal.metrics.impl.MetricsService.collectMetrics(MetricsService.java:160)
at com.hazelcast.internal.metrics.impl.MetricsRegistryImpl.collect(MetricsRegistryImpl.java:316)
at com.hazelcast.internal.metrics.impl.MetricsCollectionCycle.collectDynamicMetrics(MetricsCollectionCycle.java:88)
at com.hazelcast.replicatedmap.impl.ReplicatedMapService.provideDynamicMetrics(ReplicatedMapService.java:387)
at com.hazelcast.replicatedmap.impl.ReplicatedMapService.getStats(ReplicatedMapService.java:357)
at com.hazelcast.replicatedmap.impl.ReplicatedMapService.getLocalReplicatedMapStats(ReplicatedMapService.java:197)
at com.hazelcast.replicatedmap.impl.LocalReplicatedMapStatsProvider.getLocalReplicatedMapStats(LocalReplicatedMapStatsProvider.java:85)
Here's how we're setting up Hazelcast.
private static HazelcastInstance setupHazelcastConfig() {
Config config = new Config();
config.setInstanceName("rogueUsers");
NetworkConfig network = config.getNetworkConfig();
network.setPort(5701).setPortCount(20);
network.setPortAutoIncrement(true);
JoinConfig join = network.getJoin();
join.getMulticastConfig().setEnabled(true);
// join.getTcpIpConfig()
// .setEnabled(true);
HazelcastInstance hz = Hazelcast.getOrCreateHazelcastInstance(config);
ReplicatedMapConfig replicatedMapConfig =
config.getReplicatedMapConfig("rogueUsers");
replicatedMapConfig.setInMemoryFormat(InMemoryFormat.BINARY);
replicatedMapConfig.setAsyncFillup(true);
replicatedMapConfig.setStatisticsEnabled(true);
replicatedMapConfig.setSplitBrainProtectionName("splitbrainprotection-name");
ReplicatedMap<String, String> map = hz.getReplicatedMap("rogueUsers");
map.addEntryListener(new RogueEntryListener());
return hz;
}
Is this a configuration issue ?
How do I fix this ?
Thanks very much,
The exception is being thrown from the following line:
if (isBinary) {
memoryUsage += ((HeapData) record.getValueInternal()).getHeapCost(); <-- exception
}
which is line 85 of com.hazelcast.replicatedmap.impl.LocalReplicatedMapStats class. The condition being checked is as the following:
boolean isBinary = (replicatedMapConfig.getInMemoryFormat() == InMemoryFormat.BINARY);
so basically, it is related to the format you are saving the data (from the config above you have chosen BINARY).
However, I don't think you are following it correctly since you do the following: ReplicatedMap<String, String> map = hz.getReplicatedMap("rogueUsers"); in your config.
From the Javadoc of com.hazelcast.internal.serialization.Data class:
Data is basic unit of serialization. It stores binary form of an object serialized by SerializationService.toData(Object).
Therefore, try editing your config to this:
ReplicatedMap<Data, Data> map = hz.getReplicatedMap("rogueUsers");

java.lang.IllegalStateException: A connection to a distributed system already exists in this VM. It has the following configuration:

enter image description here public class GemfireTest {
public static void main(String[] args) throws NameResolutionException, TypeMismatchException, QueryInvocationTargetException, FunctionDomainException {
ServerLauncher serverLauncher = new ServerLauncher.Builder()
.setMemberName("server1")
.setServerPort(40404)
.set("start-locator", "127.0.0.1[9090]")
.build();
serverLauncher.start();
String queryString = "SELECT * FROM /gemregion";
ClientCache cache = new ClientCacheFactory().create();
QueryService queryService = cache.getQueryService();
Query query = queryService.newQuery(queryString);
SelectResults results = (SelectResults)query.execute();
int size = results.size();
System.out.println(size);
}
}
trying to run a locator and a server inside my java application getting an exception below:
Exception in thread "main" java.lang.IllegalStateException: A
connection to a distributed system already exists in this VM. It has
the following configuration: ack-severe-alert-threshold="0"
ack-wait-threshold="15" archive-disk-space-limit="0"
archive-file-size-limit="0" async-distribution-timeout="0"
async-max-queue-size="8" async-queue-timeout="60000"
bind-address="" cache-xml-file="cache.xml"
cluster-configuration-dir="" cluster-ssl-ciphers="any"
cluster-ssl-enabled="false" cluster-ssl-keystore=""
cluster-ssl-keystore-password="" cluster-ssl-keystore-type=""
cluster-ssl-protocols="any"
cluster-ssl-require-authentication="true" cluster-ssl-truststore=""
cluster-ssl-truststore-password="" conflate-events="server"
conserve-sockets="true" delta-propagation="true"
deploy-working-dir="C:\Users\Saranya\IdeaProjects\Gemfire"
disable-auto-reconnect="false" disable-tcp="false"
distributed-system-id="-1" distributed-transactions="false"
durable-client-id="" durable-client-timeout="300"
enable-cluster-configuration="true"
enable-network-partition-detection="true"
enable-time-statistics="false" enforce-unique-host="false"
gateway-ssl-ciphers="any" gateway-ssl-enabled="false"
gateway-ssl-keystore="" gateway-ssl-keystore-password=""
gateway-ssl-keystore-type="" gateway-ssl-protocols="any"
gateway-ssl-require-authentication="true" gateway-ssl-truststore=""
gateway-ssl-truststore-password="" groups=""
http-service-bind-address="" http-service-port="7070"
http-service-ssl-ciphers="any" http-service-ssl-enabled="false"
http-service-ssl-keystore="" http-service-ssl-keystore-password=""
http-service-ssl-keystore-type="" http-service-ssl-protocols="any"
http-service-ssl-require-authentication="false"
http-service-ssl-truststore=""
http-service-ssl-truststore-password="" jmx-manager="false"
jmx-manager-access-file="" jmx-manager-bind-address=""
jmx-manager-hostname-for-clients="" jmx-manager-http-port="7070"
jmx-manager-password-file="" jmx-manager-port="1099"
jmx-manager-ssl-ciphers="any" jmx-manager-ssl-enabled="false"
jmx-manager-ssl-keystore="" jmx-manager-ssl-keystore-password=""
jmx-manager-ssl-keystore-type="" jmx-manager-ssl-protocols="any"
jmx-manager-ssl-require-authentication="true"
jmx-manager-ssl-truststore="" jmx-manager-ssl-truststore-password=""
jmx-manager-start="false" jmx-manager-update-rate="2000"
load-cluster-configuration-from-dir="false" locator-wait-time="0"
locators="127.0.0.1[9090]" (wanted "") lock-memory="false"
log-disk-space-limit="0"
log-file="C:\Users\Saranya\IdeaProjects\Gemfire\server1.log"
(wanted "") log-file-size-limit="0" log-level="config" max-num-reconnect-tries="3" max-wait-time-reconnect="60000"
mcast-address="/239.192.81.1" mcast-flow-control="1048576, 0.25,
5000" mcast-port="0" mcast-recv-buffer-size="1048576"
mcast-send-buffer-size="65535" mcast-ttl="32"
member-timeout="5000" membership-port-range="[1024,65535]"
memcached-bind-address="" memcached-port="0"
memcached-protocol="ASCII" name="server1" (wanted "")
off-heap-memory-size="" redis-bind-address="" redis-password=""
redis-port="0" redundancy-zone="" remote-locators=""
remove-unresponsive-client="false" roles=""
security-client-accessor="" security-client-accessor-pp=""
security-client-auth-init="" security-client-authenticator=""
security-client-dhalgo="" security-log-file=""
security-log-level="config" security-manager=""
security-peer-auth-init="" security-peer-authenticator=""
security-peer-verifymember-timeout="1000" security-post-processor=""
security-shiro-init="" security-udp-dhalgo=""
serializable-object-filter="!" server-bind-address=""
server-ssl-ciphers="any" server-ssl-enabled="false"
server-ssl-keystore="" server-ssl-keystore-password=""
server-ssl-keystore-type="" server-ssl-protocols="any"
server-ssl-require-authentication="true" server-ssl-truststore=""
server-ssl-truststore-password="" socket-buffer-size="32768"
socket-lease-time="60000" ssl-ciphers="any" ssl-cluster-alias=""
ssl-default-alias="" ssl-enabled-components="[]"
ssl-gateway-alias="" ssl-jmx-alias="" ssl-keystore=""
ssl-keystore-password="" ssl-keystore-type="" ssl-locator-alias=""
ssl-protocols="any" ssl-require-authentication="true"
ssl-server-alias="" ssl-truststore="" ssl-truststore-password=""
ssl-truststore-type="" ssl-web-alias=""
ssl-web-require-authentication="false" start-dev-rest-api="false"
start-locator="127.0.0.1[9090]" (wanted "")*
statistic-archive-file="" statistic-sample-rate="1000"
statistic-sampling-enabled="true" tcp-port="0"
udp-fragment-size="60000" udp-recv-buffer-size="1048576"
udp-send-buffer-size="65535" use-cluster-configuration="true"
user-command-packages="" validate-serializable-objects="false"
at
org.apache.geode.distributed.internal.InternalDistributedSystem.validateSameProperties(InternalDistributedSystem.java:2959)
at
org.apache.geode.distributed.DistributedSystem.connect(DistributedSystem.java:199)
at
org.apache.geode.cache.client.ClientCacheFactory.basicCreate(ClientCacheFactory.java:243)
at
org.apache.geode.cache.client.ClientCacheFactory.create(ClientCacheFactory.java:214)
at GemfireTest.main(GemfireTest.java:61)
How to solve this exception?
The error here is pretty self explanatory: you can’t have more than one connection to a distributed system within a single JVM. In this particular case you’re starting both a server cache (ServerLauncher) and a client cache (ClientCacheFactory) within the same JVM, which is not supported.
To solve the issue, use two different applications or JVMs, one for the server and another one for the client executing the query.
Cheers.

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

creating nested nodes using Groovy xml Building

I have the below xml, Updated added "symptoms"
<EBF>
<EBFINFO>
<EBFNUM>EBF262323</EBFNUM>
<RELEASEDATETIME>May 06, 2011</RELEASEDATETIME>
<SYMPTOMS>
<br> INFA252994 - 910 : While running concurrent session Workflow manager hangs and workflow monitor does not respond</br>
<br> INFA262323 - 910 : pmcmd, pmdtm and all LM clients on Windows fail to connect to IS when IPv6 is installed but all IPv6 interfaces are disabled</br>
</SYMPTOMS>
<FILES>
<FILE>
<PATH>H:\EBF262323\EBF262323_Client_Installer_win32_x86\EBFs\clients\PmClient\client\bin\ACE.dll_bak</PATH>
<CHECKSUM>303966974</CHECKSUM>
<AFFECTEDFILES>
<CHECKSUM>3461283269</CHECKSUM>
<PATH>C:\clients\PmClient\CommandLineUtilities\PC\server\bin\ACE.dll</PATH>
<PATH>C:\clients\PmClient\client\bin\ACE.dll</PATH>
</AFFECTEDFILES>
</FILE>
</FILES>
<NOTES>
</NOTES>
</EBFINFO>
</EBF>
Note: In the above xml ebf\enfinfo\files\file\affectedfiles\path and ebf\enfinfo\files\file can be one or more
which I am parsing and generating another xml out of it
def records = new XmlParser().parseText(rs)
csm.ebfHistory(){
records.EBFINFO.each{
ebfHistory_info(num:it.EBFNUM.text(),
release_date_time:it.RELEASEDATETIME.text()
){
it.FILES.FILE.each{ //says Exception in thread "main" java.lang.NullPointerException: Cannot get property 'FILES' on null object
ebfHistory_fileinfo(file_path:it.PATH.text(),
file_checksum:it.CHECKSUM.text()
){
ebfHistory_fileinfo_affectedfiles(
afile_checksum:it.CHECKSUM.text(),
afile_path:it.PATH.text()
)
}
}
}
}
}
something like below
<ebfHistory>
<ebfHistory_info num="EBF262323",release_date_time="May 06, 2011">
<ebfHistory_fileinfo file_checksum="303966974">
<ebfHistory_fileinfo_affectedfiles afile_checksum="3461283269">
<path>C:\clients\PmClient\CommandLineUtilities\PC\server\bin\ACE.dll</path>
<path>C:\clients\PmClient\client\bin\ACE.dll</path>
</ebfHistory_fileinfo_affectedfiles>
</ebfHistory_fileinfo>
</ebfHistory_info>
</ebfHistory>
but instead I get Exception in thread "main" java.lang.NullPointerException: Cannot get property 'FILES' on null object where am i going wrong? Please help somebody. Thanks
Updated code (working)
def records = new XmlParser().parseText(rs)
csm.ebfHistory(){
records.EBFINFO.each{ ebfinfo ->
ebfHistory_info(num:ebfinfo.EBFNUM.text(),
release_date_time:ebfinfo.RELEASEDATETIME.text())
{
ebfinfo.SYMPTOMS.br.each{
ebfHistory_symptom(name:it.text())
}
}
}
ebfHistory_dump(rs){
"${rs}"
}
}
The it no longer refers to each EBFINFO, because you are in another closure--the ebfHistory_info closure.
Instead, explicitly name the EBFINFO object:
records.EBFINFO.each { ebfinfo -> // <-- Give it a name
ebfHistory_info(num:it.EBFNUM.text(),
release_date_time:it.RELEASEDATETIME.text()) {
ebfinfo.FILES.FILE.each { // <-- Use the name here
Same thing in the ebfHistory_fileinfo_affectedfiles parameters.

Categories

Resources