Vertx Http Client not working after setShared to true - vert.x

I got the following when I set .setShared(true) in my WebClientOptions:
java.lang.ClassCastException: class io.vertx.core.http.impl.SharedHttpClient cannot be cast to class io.vertx.core.http.impl.HttpClientImpl (io.vertx.core.http.impl.SharedHttpClient and io.vertx.core.http.impl.HttpClientImpl are in unnamed module of loader 'app')

Was resolve in https://github.com/vert-x3/vertx-web/issues/2165
Just need to update vertx-web version to 4.2.8 or higher

Related

Spark Kryo Serialization issue

I have a Spark job that have been working well till a few days ago I needed to enable Kryo Serialization.
spark.kryo.registrationRequired true
spark.kryo.referenceTracking true
spark.kryo.registrator org.mycompany.serialization.MyKryoRegistrator
spark.serializer org.apache.spark.serializer.KryoSerializer
Now it started to complain it can not find registered classes. I registered like this
def registerByName(kryo: Kryo, name: String) = kryo.register(Class.forName(name))
registerByName(kryo, "org.apache.spark.util.collection.BitSet")
registerByName(kryo, "org.apache.spark.util.collection.OpenHashSet")
registerByName(kryo, "org.apache.spark.util.collection.OpenHashSet$Hasher")
registerByName(kryo, "org.apache.spark.util.collection.OpenHashMap")
registerByName(kryo, "org.apache.spark.util.collection.OpenHashMap$mcJ$sp")
After this it complains with
com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: Class is not registered: org.apache.spark.util.collection.OpenHashMap$mcJ$sp$$Lambda$1429/0x0000000800cd3840
Note: To register this class use: kryo.register(org.apache.spark.util.collection.OpenHashMap$mcJ$sp$$Lambda$1429/0x0000000800cd3840.class
But if I try register
registerByName(kryo, "org.apache.spark.util.collection.OpenHashMap$mcJ$sp$$Lambda$1429/0x0000000800cd3840")
it throws java.lang.ClassNotFoundException
The class OpenHashMap is private for [spark] package scala generic that is used somewhere in deeps of Spark and seems like once Kryo is enabled, Spark offloads all serialization things related to its internals to Kryo. If it was my class I would write custom serializer but I have no Idea what can I do in my situation.
The problematic class definition https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/collection/OpenHashMap.scala

Custom class loader wtih Infinispan 9.4.x

We have been using old version of infinispan and wildfly ( 10.x and infinispan 6.x ). The cache has been used as embedded cache, e.g it was started from the application code ( which was actually the wildfly module ).Whenever cache was created in clustered mode the code created a Decorated Cache with specific class loader which allowed to handle remote data transfer and provided all the required classes.
In inifinspan 9.4.x the with(ClassLoader) is deprecated on both AdvancedCache and DecoratedCache and while checking the code we have found that it does nothing.
As result when the cache item is stored and sent to remote node remote exception is occuring (java.lang.ClassNotFoundException)
15:32:45,028 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (jgroups-10,ip-10-0-0-82-23088) ISPN000136: Error executing command PrepareCommand on Cache 'ra-data-SipRA'
, writing keys [1-14341#127.0.0.1:c803fe42:null]: org.infinispan.remoting.RemoteException: ISPN000217: Received exception from ip-10-0-0-82-50680, see cause for remote stack trace
at org.infinispan.remoting.transport.ResponseCollectors.wrapRemoteException(ResponseCollectors.java:28)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.marshalling.AbstractClassResolver.loadClass(AbstractClassResolver.java:123)
at org.jboss.marshalling.AbstractClassResolver.resolveClass(AbstractClassResolver.java:104)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1079)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1355)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
at org.infinispan.marshall.core.ExternalJBossMarshaller.objectFromObjectStream(ExternalJBossMarshaller.java:47)
at org.infinispan.marshall.core.GlobalMarshaller.readUnknown(GlobalMarshaller.java:873)
at org.infinispan.marshall.core.GlobalMarshaller.readNonNullableObject(GlobalMarshaller.java:697)
at org.infinispan.marshall.core.GlobalMarshaller.readNullableObject(GlobalMarshaller.java:361)
Source code shows that global configuration is storing class loader now and it is provided from wildfly. Is there any way to provide the custom class loader for infinispan 9.x or at least define which one to use on remote operation handling
BR
Yulian Oifa

exist.db Error during trigger prepare

If I'm trying to modify or even create a file in a project folder inside my exist-db (Version 3.4.1) the following error appears.
Message:
XMLDBException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection:
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a
function or variable declared in a library module is not in the target namespace of the
library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
Exception Stacktrace:
org.xmldb.api.base.XMLDBException: Failed to invoke method parse in class
org.exist.xmlrpc.RpcConnection:
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:528)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:502)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:471)
at org.exist.client.DocumentView$2.run(DocumentView.java:361)
Caused by: org.apache.xmlrpc.XmlRpcException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection:
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:524)
... 3 more
Caused by: org.apache.xmlrpc.XmlRpcException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection:
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:524)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:502)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:471)
at org.exist.client.DocumentView$2.run(DocumentView.java:361)
Maybe a locking problem? In another folder in the same project all ressources can be edited. And the files where the error appears were initially created by me... so it worked before already.
After a fresh install it works for a while and then suddenly the error appears again.
The permissions are set correctly!
THe explanation for your problem is in this part of the error message:
err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
The trigger on your collection contains an error, so when it fires and you are trying to store a document, the error caused by the trigger prevents the document from being stored.
You need to edit /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql and fix the error in your XQuery.

D2FS within workflow method

I´m trying to use D2FS services within a workflow method, but im getting the following error:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "address". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
Two classes have the same XML type name "elements". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
at javax.xml.ws.wsaddressing.W3CEndpointReference
I tried to update the jaxws-rt libraries and started getting the new error:
java.lang.LinkageError: ClassException: attempting to castjar:file:/C:/Documentum/jboss4.3.0/server/DctmServer_MethodServer/deploy/bpm.ear/APP-INF/lib/jaxws-api.jar!/javax/xml/ws/spi/Provider.classtojar:file:/C:/Documentum/jboss4.3.0/jdk/jre/lib/rt.jar!/javax/xml/ws/spi/Provider.class
at javax.xml.ws.spi.Provider.provider(Provider.java:94)
at javax.xml.ws.Service.<init>(Service.java:56)
at com.emc.d2fs.schemas.models.ModelPortService.<init>(ModelPortService.java:46)
at com.emc.cgd.methodsWorkflow.DispatchExtStorageUpdateData.doTask(DispatchExtStorageUpdateData.java:45)
at com.documentum.bpm.rtutil.WorkflowMethod.execute(WorkflowMethod.java:214)
at com.documentum.bpm.rtutil.AbstractWorkflowMethod.executeMethod(AbstractWorkflowMethod.java:27)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:124)
at com.documentum.bpm.rtutil.GenericWorkflowMethod.execute(GenericWorkflowMethod.java:65)
at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
Any idea how to solve it?
Im using:
JBoss 4.3
JAX-WS Implementation 2.2
Thanks
On tomcat I had to add following jars to the tomcat lib:
jaxws-api.jar
jaxws-rt.jar
stax-ex.jar
streambuffer.jar
Perhaps this will resolver the problem on jBoss as well.

DuplicateMemberException play framework mongodb module

I get this error on starting play application. Im using Play 1.2.4 and Mongo 1.3 module.
`Oops: DuplicateMemberException
An unexpected error occured caused by exception DuplicateMemberException: duplicate method: getCollectionName in models.MongoShapes
play.exceptions.UnexpectedException: While applying play.modules.mongo.MongoPlugin#2d7cec96 on models.MongoShapes
at play.plugins.PluginCollection.enhance(PluginCollection.java:511)
at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235)
at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:429)
at play.Play.start(Play.java:505)
at play.Play.detectChanges(Play.java:618)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)
Caused by: javassist.bytecode.DuplicateMemberException: duplicate method: getCollectionName in models.MongoShapes
at javassist.bytecode.ClassFile.testExistingMethod(ClassFile.java:593)
at javassist.bytecode.ClassFile.addMethod(ClassFile.java:577)
at javassist.CtClassType.addMethod(CtClassType.java:1235)
at play.modules.mongo.MongoEnhancer.enhanceMongoEntity(MongoEnhancer.java:69)
at play.modules.mongo.MongoEnhancer.enhanceThisClass(MongoEnhancer.java:35)
at play.modules.mongo.MongoPlugin.enhance(MongoPlugin.java:17)
at play.plugins.PluginCollection.enhance(PluginCollection.java:506)
... 7 more
My class looks like
#MongoEntity
public class MongoShapes extends MongoModel{
String someComment;
}
Looks like your project include mongo module more than once. How did you declare mongo module? don't declare it in both applicaiton.conf and dependencies.yml.