exist.db Error during trigger prepare - triggers

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.

Related

Set application name in build.gradle for Flutter

I have a Flutter application in which I add the following redirect scheme and appliaction name in app/build.gradle
manifestPlaceholders = [ 'appAuthRedirectScheme': 'com.sgha.sdx_user_portal://login-callback', 'applicationName': 'com.sgha.sdx_user_portal.main']',
But I get the following error
java.lang.RuntimeException: Unable to instantiate application com.sgha.sdx_user_portal.main: java.lang.ClassNotFoundException: Didn't find class "com.sgha.sdx_user_portal.main" on path: DexPathList[[zip file "/data/app/~~ykU08tRWMZaLJ6MdKgUIEw==/com.sgha.sdx_user_portal-fCB4qyKngsCd56CC_1ADZQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~ykU08tRWMZaLJ6MdKgUIEw==/com.sgha.sdx_user_portal-fCB4qyKngsCd56CC_1ADZQ==/lib/x86, /data/app/~~ykU08tRWMZaLJ6MdKgUIEw==/com.sgha.sdx_user_portal-fCB4qyKngsCd56CC_1ADZQ==/base.apk!/lib/x86, /system/lib, /system_ext/lib]]
main.dart is my entry point. How should I set the application name? Without stting the application name in gradle I get an error saying that the applicaton name is not set:
/home/igharib/IdeaProjects/sdx-user-portal/android/app/src/main/AndroidManifest.xml:5:9-42 Error:
Attribute application#name at AndroidManifest.xml:5:9-42 requires a placeholder substitution but no value for <applicationName> is provided.
/home/igharib/IdeaProjects/sdx-user-portal/android/app/src/debug/AndroidManifest.xml Error:
Validation failed, exiting
this must be application's name

General error during semantic analysis: Transform org.codehaus.groovy.macro.transform.MacroTransformation cannot be run

I am facing the error message when running the Gradle-> Build on groovy file. Can you please help in resolving the issue.
Description Resource Path Location Type
Groovy: compiler error: Missing implementation of resolved method 'abstract java.lang.String getDisablePropertyName()' of abstract class org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache.
SongTexGenerator.groovy /src/project2/generator line 1 Java Problem
Description Resource Path Location Type
Groovy:General error during semantic analysis: Transform org.codehaus.groovy.macro.transform.MacroTransformation cannot be run
SongDSlParsingGroovyTest.groovy /src/test/java/project2/tests

scalaXB Async Dispatcher java.lang.IllegalStateException: failed to create a child event loop

I am using ScalaXB to make a call to a SOAP Web Service. I generated the code against WSDL using the following command
I am making a call to the web service in a loop. I notice that the code runs fine for sometime but then starts throwing the following error
java.lang.IllegalStateException: failed to create a child event loop
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:68)
at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:50)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:70)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:65)
at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:56)
at org.asynchttpclient.netty.channel.ChannelManager.<init>(ChannelManager.java:173)
at org.asynchttpclient.DefaultAsyncHttpClient.<init>(DefaultAsyncHttpClient.java:85)
at dispatch.Http.client$lzycompute(execution.scala:16)
at dispatch.Http.client(execution.scala:16)
at dispatch.Http.client(execution.scala:11)
at dispatch.HttpExecutor$class.apply(execution.scala:120)
at dispatch.Http.apply(execution.scala:11)
at dispatch.HttpExecutor$class.apply(execution.scala:115)
at dispatch.Http.apply(execution.scala:11)
at scalaxb.DispatchHttpClientsAsync$DispatchHttpClient$class.request(httpclients_dispatch_async.scala:22)
at scalaxb.DispatchHttpClientsAsync$$anon$1.request(httpclients_dispatch_async.scala:7)
at scalaxb.SoapClientsAsync$SoapClientAsync$class.soapRequest(soap12_async.scala:43)
at scalaxb.SoapClientsAsync$$anon$1.soapRequest(soap12_async.scala:24)
at scalaxb.SoapClientsAsync$SoapClientAsync$class.requestResponse(soap12_async.scala:63)
at scalaxb.SoapClientsAsync$$anon$1.requestResponse(soap12_async.scala:24)
Caused by: io.netty.channel.ChannelException: failed to open a new selector
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:176)
at io.netty.channel.nio.NioEventLoop.<init>(NioEventLoop.java:150)
at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:103)
at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:64)
... 34 more
Caused by: java.io.IOException: Too many open files in system
at sun.nio.ch.KQueueArrayWrapper.init(Native Method)
at sun.nio.ch.KQueueArrayWrapper.<init>(KQueueArrayWrapper.java:98)
at sun.nio.ch.KQueueSelectorImpl.<init>(KQueueSelectorImpl.java:88)
at sun.nio.ch.KQueueSelectorProvider.openSelector(KQueueSelectorProvider.java:42)
at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:174)
... 37 more
I found out the answer to this question. The problem was that I was doing a new on the proxy object inside of the loop.
It seems that these objects create a new connection and don't get cleaned up resulting in the error above.
I moved the proxy object out of the loop and just called the webservice inside the loop and the problem got resolved.

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.

Exception thrown when opening internal browser

When I am trying to open internal web browser using
IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
I get this error:
Unable to instantiate browser supportStatus ERROR:
org.eclipse.equinox.registry code=1 Plug-in "XXXXX" was unable to instantiate
class "org.eclipse.ui.internal.browser.WorkbenchBrowserSupport".
java.lang.IllegalAccessException:
Class org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI can not access a member of class org.eclipse.ui.internal.browser.WorkbenchBrowserSupport with modifiers "private"
Any idea why I get this error? Searching for error produced little hints. Debugging it shows that as error says private method is accessed through reflection.