Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-92341

Exceptions library specific must not cross boundaries of engine neutral Search modules

    Details

      Description

      Here we're seeing a library specific exception crossing the boundaries of the published interfaces of the OSGi module it should be confined to. Any invokers of the published API would face the same ClassNotFoundException stacktrace, since their OSGi module's own class loader would likely be missing this library jar and therefore would be unable to hydrate the library specific exception.

      To solve this, we need to catch all exceptions at the published endpoints in play here; check for any exceptions from library specific packages; those should be converted to a safe, neutral exception. Must discard the original library specific exception, but preserve its original stacktrace.

      [exec] com.liferay.portal.workflow.kaleo.runtime.integration.internal.test.WorkflowTaskManagerImplTest > testApproveDLFileEntryInDLFolderWhenHomeDLFolderHasWorkflow STARTED
      [exec]
      [exec] 15:26:10,135 ERROR [RMI TCP Connection(2)-127.0.0.1][KaleoInstanceModelListener:55] [workflow-metrics-instances/pmGjDT_pREO3il7w1GFGqA][[workflow-metrics-instances][0]] DocumentMissingException[[WorkflowMetricsInstanceType][WorkflowMetricsInstance_PORTLET_40d533e9cd9c496af1de09a33d2c9a9c066f51f7ff7c9316dce0971d4acf26fc]: document missing]
      [exec] [workflow-metrics-instances/pmGjDT_pREO3il7w1GFGqA][[workflow-metrics-instances][0]] DocumentMissingException[[WorkflowMetricsInstanceType][WorkflowMetricsInstance_PORTLET_40d533e9cd9c496af1de09a33d2c9a9c066f51f7ff7c9316dce0971d4acf26fc]: document missing]
      [exec] at org.elasticsearch.action.update.UpdateHelper.prepareUpsert(UpdateHelper.java:131)
      [exec] at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:87)
      [exec] at org.elasticsearch.action.update.UpdateHelper.prepare(UpdateHelper.java:76)
      [exec] at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:174)
      [exec] at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:167)
      [exec] at org.elasticsearch.action.update.TransportUpdateAction.shardOperation(TransportUpdateAction.java:67)
      [exec] at org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction$ShardTransportHandler.messageReceived(TransportInstanceSingleOperationAction.java:242)
      [exec] at org.elasticsearch.action.support.single.instance.TransportInstanceSingleOperationAction$ShardTransportHandler.messageReceived(TransportInstanceSingleOperationAction.java:238)
      [exec] at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:30)
      [exec] at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:66)
      [exec] at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:717)
      [exec] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:723)
      [exec] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      [exec] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      [exec] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      [exec] at java.lang.Thread.run(Thread.java:745)
      [exec] 15:26:10,177 INFO [RMI TCP Connection(2)-127.0.0.1][BundleStartStopLogger:42] STOPPED com.liferay.portal.workflow.kaleo.test_1.0.0 [988]
      [exec]
      [exec] 2 tests completed, 1 failed, 1 skipped
      [exec]
      [exec] > Task :apps:portal-workflow:portal-workflow-kaleo-test:testIntegration
      [exec]
      [exec] com.liferay.portal.workflow.kaleo.runtime.integration.internal.test.WorkflowTaskManagerImplTest > classMethod STARTED
      [exec]
      [exec] com.liferay.portal.workflow.kaleo.runtime.integration.internal.test.WorkflowTaskManagerImplTest > classMethod FAILED
      [exec] java.lang.ClassNotFoundException: org.elasticsearch.index.engine.DocumentMissingException
      [exec] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      [exec] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      [exec] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      [exec] at java.lang.Class.forName0(Native Method)
      [exec] at java.lang.Class.forName(Class.java:348)
      [exec] at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:677)
      [exec] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1819)
      [exec] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713)
      [exec] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1986)
      [exec] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
      [exec] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2231)
      [exec] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:552)
      [exec] at java.lang.Throwable.readObject(Throwable.java:914)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [exec] at java.lang.reflect.Method.invoke(Method.java:498)
      [exec] at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1058)
      [exec] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2122)
      [exec] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2013)
      [exec] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1535)
      [exec] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
      [exec] at com.liferay.arquillian.extension.junit.bridge.junit.Arquillian.run(Arquillian.java:133)
      [exec] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:106)
      [exec] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
      [exec] at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
      [exec] at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
      [exec] at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [exec] at java.lang.reflect.Method.invoke(Method.java:498)
      [exec] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      [exec] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      [exec] at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
      [exec] at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
      [exec] at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
      [exec] at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [exec] at java.lang.reflect.Method.invoke(Method.java:498)
      [exec] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
      [exec] at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      [exec] at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
      [exec] at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
      [exec] at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
      [exec] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
      [exec] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
      [exec] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      [exec] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      [exec] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
      [exec] at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  28 weeks, 5 days ago

                  Packages

                  Version Package
                  7.2.0 GA1