puniverse / comsat Goto Github PK
View Code? Open in Web Editor NEWFibers and actors for web development
Home Page: docs.paralleluniverse.co/comsat
License: Other
Fibers and actors for web development
Home Page: docs.paralleluniverse.co/comsat
License: Other
This number may have been left from a time when the Apache async client wasn't truly async. Should probably be changed to 1 or 2.
Hi,
Seems like HttpChannel is calling its close() on HTTP errors (400-600) and redirects.
This seems to make it impossible to return HTTP errors without an UnsupportedOperationException.
Or is there something I missed?
Not sure if this will require changes in comsat-retrofit, but it is worth a look:
http://inthecheesefactory.com/blog/retrofit-2.0/en
Hi,
For people using web actors without websockets, it is not needed to assert on the presence of websockets in a servlet container, actually, it is a problem if one does not want to enable them!
Maybe the check should be done only in case the @WebActor
annotation has web socket url patterns?
I have created the sample project https://github.com/imperatorx/comsat-jooq-test to illustrate this issue.
I'm using spring @transactional annotations and Jooq. The FiberDataSource is wrapped in a spring TransactionAwareDataSourceProxy, which is instrumented via the suspendables and suspendable-supers file.
If I manually aquire a connection from the DataSourceProxy and run a PreparedStatement, I get no errors, and the proxied method call runs with a connection that is provided from the proxy with automatic transactions (logging is set to TRACE)
If I call a JOOQ method, which executes a query, I get no instrumentation warnings, but I get a strange NullPointerException, when Jooq prepares the statement. The last call seems to be to co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:65)
Note that I hadd to add
The exception:
Exception in Fiber "fiber-10000002" If this exception looks strange, perhaps you've forgotten to instrument a blocking method. Run your program with -Dco.paralleluniverse.fibers.verifyInstrumentation to catch the culprit!
java.lang.NullPointerException
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:121)
at co.paralleluniverse.fibers.FiberAsync.runBlocking(FiberAsync.java:409)
at co.paralleluniverse.fibers.jdbc.JDBCFiberAsync.exec(JDBCFiberAsync.java:29)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:65)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:240)
at com.sun.proxy.$Proxy40.prepareStatement(Unknown Source)
at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
at org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:216)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:316)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:319)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:306)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:440)
at org.jooq.impl.DefaultDSLContext.fetchOne(DefaultDSLContext.java:541)
at foo.quasar.test.MyServiceImpl.jooqTransactionalMethod(MyServiceImpl.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy34.jooqTransactionalMethod(Unknown Source)
at foo.quasar.test.App$2.run(App.java:78)
at foo.quasar.test.App$2.run(App.java:65)
Exception in thread "main" java.util.concurrent.ExecutionException: java.lang.NullPointerException
at co.paralleluniverse.fibers.Fiber.get(Fiber.java:1304)
at co.paralleluniverse.fibers.Fiber.join(Fiber.java:1279)
at foo.quasar.test.App.test(App.java:83)
at foo.quasar.test.App.main(App.java:30)
Caused by: java.lang.NullPointerException
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:121)
at co.paralleluniverse.fibers.FiberAsync.runBlocking(FiberAsync.java:409)
at co.paralleluniverse.fibers.jdbc.JDBCFiberAsync.exec(JDBCFiberAsync.java:29)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:65)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:240)
at com.sun.proxy.$Proxy40.prepareStatement(Unknown Source)
at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
at org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:216)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:316)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:319)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:306)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:440)
at org.jooq.impl.DefaultDSLContext.fetchOne(DefaultDSLContext.java:541)
at foo.quasar.test.MyServiceImpl.jooqTransactionalMethod(MyServiceImpl.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:64)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy34.jooqTransactionalMethod(Unknown Source)
at foo.quasar.test.App$2.run(App.java:78)
at foo.quasar.test.App$2.run(App.java:65)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1014)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:729)
at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:257)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:116)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:73)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
FiberCloseableHttpAsyncClient is not visible outside of package, so nobody is really able to use it as it is intended to be used as described in the docs
version 0.30.0 is using an out dated version of dropwizard and pulls in com.codahale.metrics:metrics-core instead of io.dropwizard.metrics:metrics-core.
+--- co.paralleluniverse:comsat-dropwizard:0.3.0
| +--- io.dropwizard:dropwizard-jdbi:0.7.1
| | +--- io.dropwizard:dropwizard-db:0.7.1
| | | +--- io.dropwizard:dropwizard-core:0.7.1 -> 0.8.1 ()
| | | --- org.apache.tomcat:tomcat-jdbc:7.0.50
| | | --- org.apache.tomcat:tomcat-juli:7.0.50
| | +--- org.jdbi:jdbi:2.55
| | | --- com.google.code.findbugs:annotations:2.0.3 -> 3.0.0
| | --- com.codahale.metrics:metrics-jdbi:3.0.2
| | --- com.codahale.metrics:metrics-core:3.0.2
| +--- com.google.guava:guava:18.0
| +--- io.dropwizard:dropwizard-core:0.7.1 -> 0.8.1 ()
| +--- co.paralleluniverse:comsat-jdbi:0.3.0
| | +--- org.jdbi:jdbi:2.55 ()
| | +--- com.google.guava:guava:18.0
| | --- co.paralleluniverse:comsat-jdbc:0.3.0
| | --- com.google.guava:guava:18.0
| +--- co.paralleluniverse:comsat-httpclient:0.3.0 ()
| +--- co.paralleluniverse:comsat-servlet:0.3.0
| | --- com.google.guava:guava:18.0
| --- io.dropwizard:dropwizard-client:0.7.1
| +--- io.dropwizard:dropwizard-core:0.7.1 -> 0.8.1 ()
| +--- com.sun.jersey:jersey-client:1.18.1
| | --- com.sun.jersey:jersey-core:1.18.1
| +--- com.sun.jersey.contribs:jersey-apache-client4:1.18.1
| | --- com.sun.jersey:jersey-client:1.18.1 ()
| +--- org.apache.httpcomponents:httpclient:4.3.4 -> 4.4 (*)
| --- com.codahale.metrics:metrics-httpclient:3.0.2
| --- com.codahale.metrics:metrics-core:3.0.2
which causes the application to crash with the following error
Exception in thread "main" java.lang.NoSuchMethodError: com.codahale.metrics.JmxAttributeGauge.(Ljavax/management/MBeanServerConnection;Ljavax/management/ObjectName;Ljava/lang/String;)V
at com.codahale.metrics.jvm.BufferPoolMetricSet.getMetrics(BufferPoolMetricSet.java:45)
at com.codahale.metrics.MetricRegistry.registerAll(MetricRegistry.java:381)
at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:85)
at io.dropwizard.setup.Bootstrap.(Bootstrap.java:76)
at io.dropwizard.Application.run(Application.java:68)
Hi,
Can the remote address be exposed by HttpRequest?
I'm guessing this is just a matter of implementing the wrappers' methods.
Thanks
Even I add the dependency to pom the same exception occurs. How to fix this? Thanks.
run with spring boot 3.1.0 & undertow
Caused by: java.lang.NoClassDefFoundError: com/esotericsoftware/kryo/Serializer
at co.paralleluniverse.springframework.web.method.support.FiberInvocableHandlerMethod.fiberDispatchInvoke(FiberInvocableHandlerMethod.java:108) ~[comsat-spring-webmvc-0.5.0.jar:na]
at co.paralleluniverse.springframework.web.method.support.FiberInvocableHandlerMethod.doInvoke(FiberInvocableHandlerMethod.java:92) ~[comsat-spring-webmvc-0.5.0.jar:na]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at co.paralleluniverse.springframework.web.servlet.mvc.method.annotation.FiberServletInvocableHandlerMethod.invokeAndHandle(FiberServletInvocableHandlerMethod.java:110) ~[comsat-spring-webmvc-0.5.0.jar:na]
at co.paralleluniverse.springframework.web.servlet.mvc.method.annotation.FiberRequestMappingHandlerAdapter.invokeHandleMethod(FiberRequestMappingHandlerAdapter.java:784) ~[comsat-spring-webmvc-0.5.0.jar:na]
at co.paralleluniverse.springframework.web.servlet.mvc.method.annotation.FiberRequestMappingHandlerAdapter.handleInternal(FiberRequestMappingHandlerAdapter.java:727) ~[comsat-spring-webmvc-0.5.0.jar:na]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.2.4.RELEASE.jar:4.2.4.RELEASE]
... 65 common frames omitted
Latest release is 3.0.1 which uses different package name (okhttp3.OkHttpClient, etc.). Is this blocked due to OkHttpClient being final in 3.0.1?
That should be fixed in square/okhttp#2292.
I am working on a jax-rs restful web service maven project. I am using standalone tomcat 8.0 server. i copied comsat tomcat loader to Tomcat 8.0\lib folder. I created webapp/META-INF/context.xml file. The content of the file is given below:
My web service code is pasted below:
package com.mkyong.rest;
import java.io.IOException;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
import co.paralleluniverse.fibers.Fiber;
import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.fibers.Suspendable;
@singleton
@path("/hello")
public class HelloWorldService {
@get
@path("/{param}")
@Suspendable
public Response getMsg(@PathParam("param") String msg) throws IOException, SuspendExecution, InterruptedException{
String output = "Jersey say : " + msg;
Fiber.sleep(1000);
return Response.status(200).entity(output).build();
}
}
The exception raised only when i put Fiber.sleep(1000); Otherwise code working properly.
The exception is copied below :
INFO: Server startup in 3068 ms
QUASAR WARNING: Quasar Java Agent isn't running. If you're using another instrumentation method you can ignore this message; otherwise, please refer to the Getting Started section in the Quasar documentation.
Jul 20, 2016 7:22:05 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jersey-serlvet] in context with path [/eln-dataexternalization] threw exception
co.paralleluniverse.fibers.VerifyInstrumentationException: Target class class co.paralleluniverse.fibers.servlet.FiberHttpServlet$ServletSuspendableRunnable has not been instrumented.
at co.paralleluniverse.fibers.Fiber.verifyInstrumentedTarget(Fiber.java:251)
at co.paralleluniverse.fibers.Fiber.(Fiber.java:180)
at co.paralleluniverse.fibers.Fiber.(Fiber.java:224)
at co.paralleluniverse.fibers.Fiber.(Fiber.java:449)
at co.paralleluniverse.fibers.servlet.FiberHttpServlet.service(FiberHttpServlet.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
The client UI page is blank.
Thanks,
Basil
See test.
Happened on the 8th iteration.
org.junit.ComparisonFailure: JettyServer faild on iteration 8 expected:<[testGet]> but was:<[]>
at org.junit.Assert.assertEquals(Assert.java:115)
at co.paralleluniverse.fibers.servlet.FiberHttpServletTest.testForward(FiberHttpServletTest.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:80)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:47)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
public CloseableHttpClient build() {
final FiberHttpClient res =
ioreactor != null ?
new FiberHttpClient(builder.build(), ioreactor) :
new FiberHttpClient(builder.build());
return res;
}
I would like to pass an instance of FiberHttpClient to FiberRestAdapterBuilder:
public RestAdapter.Builder setClient(FiberHttpClient client) {
this.httpClient = client;
return this;
}
Because the builder returns an instance of CloseableHttpClient, I have to typecast it to FiberHttpClient. Ex:
CloseableHttpClient client = builder.build();
...
serClient((FiberHttpClient) client)
...
Jetty v.9.2.1
WARNING: Uninstrumented methods on the call stack (marked with **):
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1590)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1561)
at co.paralleluniverse.fibers.Fiber.sleep(Fiber.java:618)
at co.paralleluniverse.fibers.Fiber.sleep(Fiber.java:610)
at testgrp.NOPPersistenceServiceImpl.store(NOPPersistenceServiceImpl.java:19)
at testgrp.Resource.store(Resource.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) **
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151) **
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171) **
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:136) **
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104) **
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:387) **
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:331) **
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:103) **
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271) **
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) **
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) **
at org.glassfish.jersey.internal.Errors.process(Errors.java:315) **
at org.glassfish.jersey.internal.Errors.process(Errors.java:297) **
at org.glassfish.jersey.internal.Errors.process(Errors.java:267) **
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) **
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254) **
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028) **
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372) **
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381) **
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344) **
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221) **
at co.paralleluniverse.fibers.jersey.ServletContainer.service(ServletContainer.java:92)
at co.paralleluniverse.fibers.servlet.FiberHttpServlet$1.run(FiberHttpServlet.java:130)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1003)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:998)
Failed in the 3331th iteration due to NPE:
Jun 06, 2014 8:03:35 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:35 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:35 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:35 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:35 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:36 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jun 06, 2014 8:03:36 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.8
Jun 06, 2014 8:03:36 AM org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] log
SEVERE: test: Exception in fiber servlet
java.lang.NullPointerException
at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:234)
at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:177)
at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:739)
at org.apache.coyote.Response.action(Response.java:180)
at org.apache.coyote.Response.sendHeaders(Response.java:368)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:335)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:292)
at org.apache.catalina.connector.CoyoteWriter.close(CoyoteWriter.java:112)
at co.paralleluniverse.fibers.servlet.FiberHttpServletTest$FiberTestServlet.doGet(FiberHttpServletTest.java:115)
at co.paralleluniverse.fibers.servlet.FiberHttpServlet.service(FiberHttpServlet.java:630)
at co.paralleluniverse.fibers.servlet.FiberHttpServlet.suspendableService(FiberHttpServlet.java:737)
at co.paralleluniverse.fibers.servlet.FiberGenericServlet$1.run(FiberGenericServlet.java:96)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:933)
at co.paralleluniverse.fibers.Fiber.exec1(Fiber.java:677)
at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:248)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:110)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:72)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:261)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:988)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1628)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Jun 06, 2014 8:03:56 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Tomcat
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol stop
INFO: Stopping ProtocolHandler ["http-nio-8080"]
Jun 06, 2014 8:03:56 AM org.apache.coyote.http11.Http11NioProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
org.junit.ComparisonFailure: TomcatServer faild on iteration 3331 expected:<[testGet]> but was:<[]>
at org.junit.Assert.assertEquals(Assert.java:115)
at co.paralleluniverse.fibers.servlet.FiberHttpServletTest.testForward(FiberHttpServletTest.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:80)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:47)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Based on the conclusions from http://blog.paralleluniverse.co/2015/12/02/http-clients/
OkHttp excels in speed and memory utilization for fast requests. The fiber version for the JVM uses the async API and performs significantly better even though the underlying mechanism is traditional blocking I/O served by a thread pool.
It would be nice to support using OkHttp as a client to comsat-retrofit in addition to Apache HttpClient. Hopefully most of the hard work has already been implemented in comsat-okhttp.
WARNING: fiber Fiber@10000001[task: ParkableForkJoinTask@608cd975(Fiber@10000001), target: co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable@61bdab3, scheduler: co.paralleluniverse.fibers.FiberForkJoinScheduler@726ba157] is hogging the CPU (Thread[ForkJoinPool-default-fiber-pool-worker-5,5,main]).
at org.jooq.impl.DSL.select(DSL.java:629)
at org.jooq.impl.DefaultDSLContext.select(DefaultDSLContext.java:748)
at org.jooq.impl.DefaultDSLContext.select(DefaultDSLContext.java:764)
at co.paralleluniverse.fibers.jooq.JooqContextTest$1.run(JooqContextTest.java:77)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
WARNING: fiber Fiber@10000001[task: ParkableForkJoinTask@608cd975(Fiber@10000001), target: co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable@61bdab3, scheduler: co.paralleluniverse.fibers.FiberForkJoinScheduler@726ba157] is hogging the CPU (Thread[ForkJoinPool-default-fiber-pool-worker-5,5,main]).
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
at java.lang.Class.privateGetPublicMethods(Class.java:2814)
at java.lang.Class.privateGetPublicMethods(Class.java:2824)
at java.lang.Class.getMethods(Class.java:1602)
at co.paralleluniverse.fibers.instrument.SuspendableHelper.isInstrumented(SuspendableHelper.java:43)
at co.paralleluniverse.fibers.Fiber.isNonSuspendable(Fiber.java:1568)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1534)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1492)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:117)
at co.paralleluniverse.fibers.FiberAsync.runBlocking(FiberAsync.java:397)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:66)
at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
at org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:230)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:297)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:351)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:341)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:470)
at org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2372)
at co.paralleluniverse.fibers.jooq.JooqContextTest$1.run(JooqContextTest.java:77)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
WARNING: fiber Fiber@10000001[task: ParkableForkJoinTask@608cd975(Fiber@10000001), target: co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable@61bdab3, scheduler: co.paralleluniverse.fibers.FiberForkJoinScheduler@726ba157] is hogging the CPU (Thread[ForkJoinPool-default-fiber-pool-worker-5,5,main]).
at java.lang.Class$MethodArray.removeByNameAndSignature(Class.java:2763)
at java.lang.Class.privateGetPublicMethods(Class.java:2849)
at java.lang.Class.getMethods(Class.java:1602)
at co.paralleluniverse.fibers.instrument.SuspendableHelper.isInstrumented(SuspendableHelper.java:43)
at co.paralleluniverse.fibers.Fiber.isNonSuspendable(Fiber.java:1568)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1534)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1492)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:117)
at co.paralleluniverse.fibers.FiberAsync.runBlocking(FiberAsync.java:397)
at co.paralleluniverse.fibers.jdbc.FiberConnection.prepareStatement(FiberConnection.java:66)
at org.jooq.impl.ProviderEnabledConnection.prepareStatement(ProviderEnabledConnection.java:112)
at org.jooq.impl.SettingsEnabledConnection.prepareStatement(SettingsEnabledConnection.java:76)
at org.jooq.impl.AbstractResultQuery.prepare(AbstractResultQuery.java:230)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:297)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:351)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:341)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:470)
at org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2372)
at co.paralleluniverse.fibers.jooq.JooqContextTest$1.run(JooqContextTest.java:77)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
WARNING: fiber Fiber@10000001[task: ParkableForkJoinTask@608cd975(Fiber@10000001), target: co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable@61bdab3, scheduler: co.paralleluniverse.fibers.FiberForkJoinScheduler@726ba157] is hogging the CPU (Thread[ForkJoinPool-default-fiber-pool-worker-5,5,main]).
at org.jooq.impl.AbstractRecord.<init>(AbstractRecord.java:96)
at org.jooq.impl.RecordImpl.<init>(RecordImpl.java:120)
at org.jooq.impl.Utils.newRecord(Utils.java:370)
at org.jooq.impl.CursorImpl$CursorIterator.fetchOne(CursorImpl.java:1412)
at org.jooq.impl.CursorImpl$CursorIterator.next(CursorImpl.java:1389)
at org.jooq.impl.CursorImpl$CursorIterator.next(CursorImpl.java:1353)
at org.jooq.impl.CursorImpl.fetch(CursorImpl.java:202)
at org.jooq.impl.CursorImpl.fetchOne(CursorImpl.java:181)
at org.jooq.impl.Utils.fetchOne(Utils.java:949)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:470)
at org.jooq.impl.SelectImpl.fetchOne(SelectImpl.java:2372)
at co.paralleluniverse.fibers.jooq.JooqContextTest$1.run(JooqContextTest.java:77)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:42)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:30)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:938)
Hi all
it seems that a recent change made to co.paralleluniverse.fibers.instrument.QuasarInstrumentor ( in 0.7.6 , as version 0.7.5 still works) removed this constructor :
public QuasarInstrumentor(ClassLoader classLoader) {
this(false, classLoader, new DefaultSuspendableClassifier(classLoader));
}
So now , when trying to activate the tomcat-loader by overriding the loader in META-INF/context.xml , you get a NoSuchMethodException
I know I'm opening this issue in the comsat and not the quasar page , but I aassum comsat/quasar are developed by the same people/company, So I guess it's fine.
Hi, may be I'm misunderstood something. Is there any reason behind that fibers aren't used in every FiberConnection method which throws SQLException exception. For example java.sql.Connection#commit is a blocking method undoubtedly. Why don't we have to wrap it to something like this:
FiberAsync.runBlocking(exec, new CheckedCallable<Void, SQLException>() {
@Override
public Void call() throws SQLException {
return conn.commit();
}
});
When will comsat be compatible with Spring?
And also optional spring-boot integration would be good too.
Try using jedis, though no async there
Here is the detail code in Github
QUASAR WARNING: Assertions enabled. This may harm performance.
QUASAR WARNING: Quasar Java Agent isn't running. If you're using another instrumentation method you can ignore this message; otherwise, please refer to the Getting Started section in the Quasar documentation.
QUASAR WARNING: Fibers are set to verify instrumentation. This may severely harm performance.
Exception in Fiber "fiber-10000001" co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1664)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1613)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1586)
at co.paralleluniverse.fibers.Stack.popMethod(Stack.java:155)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:152)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run(AsyncHttpReq.java:26)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute(FiberHttpClient.java:96)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:226)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:208)
at com.flhx.core.util.httpClient.HttpClientUtils.get(HttpClientUtils.java:63)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:39)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:35)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1019)
Exception in Fiber "fiber-10000001" co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1664)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1613)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1586)
at co.paralleluniverse.fibers.Stack.popMethod(Stack.java:155)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:152)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run(AsyncHttpReq.java:26)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute(FiberHttpClient.java:96)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:226)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:208)
at com.flhx.core.util.httpClient.HttpClientUtils.get(HttpClientUtils.java:63)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:39)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:35)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1019)
co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
java.util.concurrent.ExecutionException: co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.get(Fiber.java:1304)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest.httpTest(QuasarIncreasingEchoTest.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:64)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '*') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) *
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1664)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1613)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1586)
at co.paralleluniverse.fibers.Stack.popMethod(Stack.java:155)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:152)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run(AsyncHttpReq.java:26)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute(FiberHttpClient.java:96)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:226)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:208)
at com.flhx.core.util.httpClient.HttpClientUtils.get(HttpClientUtils.java:63)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:39)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:35)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1019)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1014)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:729)
at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:257)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:116)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:73)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Running test: Test httpTest(com.flhx.test.quasarTest.QuasarIncreasingEchoTest)
Failed test httpTest [com.flhx.test.quasarTest.QuasarIncreasingEchoTest] with exception: java.util.concurrent.ExecutionException: co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
java.util.concurrent.ExecutionException: co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.get(Fiber.java:1304)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest.httpTest(QuasarIncreasingEchoTest.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:64)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:360)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: co.paralleluniverse.fibers.VerifyInstrumentationException: Uninstrumented methods (marked '*') or call-sites (marked '!!') detected on the call stack:
at co.paralleluniverse.common.util.ExtendedStackTrace.here (ExtendedStackTrace.java:44 bci: 8)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation (Fiber.java:1613 bci: 0)
at co.paralleluniverse.fibers.Fiber.verifySuspend (Fiber.java:1586 bci: 6)
at co.paralleluniverse.fibers.Stack.popMethod (Stack.java:155 bci: 11)
at co.paralleluniverse.fibers.FiberAsync.run (FiberAsync.java:152 bci: 327)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run (AsyncHttpReq.java:26 bci: 1) *
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute (FiberHttpClient.java:96 bci: 14) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:226 bci: 5) **
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute (FiberHttpClient.java:208 bci: 8) **
at com.flhx.core.util.httpClient.HttpClientUtils.get (HttpClientUtils.java:63 bci: 146)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:39 bci: 2) (optimized)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run (QuasarIncreasingEchoTest.java:35 bci: 1) (optimized)
at co.paralleluniverse.fibers.Fiber.run (Fiber.java:1019 bci: 11)
at co.paralleluniverse.fibers.Fiber.run1 (Fiber.java:1014 bci: 1)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1664)
at co.paralleluniverse.fibers.Fiber.checkInstrumentation(Fiber.java:1613)
at co.paralleluniverse.fibers.Fiber.verifySuspend(Fiber.java:1586)
at co.paralleluniverse.fibers.Stack.popMethod(Stack.java:155)
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:152)
at co.paralleluniverse.fibers.httpclient.AsyncHttpReq.run(AsyncHttpReq.java:26)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.doExecute(FiberHttpClient.java:96)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:226)
at co.paralleluniverse.fibers.httpclient.FiberHttpClient.execute(FiberHttpClient.java:208)
at com.flhx.core.util.httpClient.HttpClientUtils.get(HttpClientUtils.java:63)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:39)
at com.flhx.test.quasarTest.QuasarIncreasingEchoTest$1.run(QuasarIncreasingEchoTest.java:35)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1019)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1014)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:729)
at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:257)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:116)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:73)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
com.flhx.test.quasarTest.QuasarIncreasingEchoTest > httpTest FAILED
java.util.concurrent.ExecutionException at QuasarIncreasingEchoTest.java:47
Caused by: co.paralleluniverse.fibers.VerifyInstrumentationException
Running test: Test test(com.flhx.test.quasarTest.QuasarIncreasingEchoTest)
Hi,
As HTTP headers are case insensitive by the specification, it would be useful to have the implementations of co.paralleluniverse.comsat.webactors.HttpMessage
take that into account and apply some case normalization.
Otherwise (unless I'm missing something) checking for the existence of a header without regards for its case is a bit cumbersome.
Getting an error when starting up a Jetty server via gretty or Eclipse Jetty Plugin during instrumentation.
[quasar] WARNING: Can't determine super class of co/paralleluniverse/fibers/servlet/FiberServletContext [quasar] ERROR: Unable to instrument class co/paralleluniverse/fibers/servlet/FiberHttpServlet java.lang.NullPointerException at co.paralleluniverse.asm.Item.a(Unknown Source) at co.paralleluniverse.asm.ClassWriter.c(Unknown Source) at co.paralleluniverse.asm.ClassWriter.a(Unknown Source) at co.paralleluniverse.asm.Frame.a(Unknown Source) at co.paralleluniverse.asm.Frame.a(Unknown Source) at co.paralleluniverse.asm.MethodWriter.visitMaxs(Unknown Source) at co.paralleluniverse.asm.tree.MethodNode.accept(Unknown Source) at co.paralleluniverse.asm.commons.JSRInlinerAdapter.visitEnd(Unknown Source) at co.paralleluniverse.asm.MethodVisitor.visitEnd(Unknown Source) at co.paralleluniverse.fibers.instrument.InstrumentClass$1.visitEnd(InstrumentClass.java:193) at co.paralleluniverse.asm.ClassReader.b(Unknown Source) at co.paralleluniverse.asm.ClassReader.accept(Unknown Source) at co.paralleluniverse.asm.ClassReader.accept(Unknown Source) at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:120) at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:88) at co.paralleluniverse.fibers.instrument.JavaAgent$Transformer.transform(JavaAgent.java:187) at sun.instrument.TransformerManager.transform(TransformerManager.java:188) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:367) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:549) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:475) at org.akhikhl.gretty.FilteringClassLoader.loadClass(FilteringClassLoader.java:62) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:367) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:549) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:475) at org.akhikhl.gretty.FilteringClassLoader.loadClass(FilteringClassLoader.java:62) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86) at org.eclipse.jetty.webapp.DiscoveredAnnotation.loadClass(DiscoveredAnnotation.java:82) at org.eclipse.jetty.webapp.DiscoveredAnnotation.getTargetClass(DiscoveredAnnotation.java:67) at org.eclipse.jetty.annotations.WebServletAnnotation.apply(WebServletAnnotation.java:69) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:419) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1339) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:517) at org.akhikhl.gretty.JettyWebAppContext.super$10$doStart(JettyWebAppContext.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1206) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150) at org.akhikhl.gretty.JettyWebAppContext.doStart(JettyWebAppContext.groovy:44) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:405) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:372) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.LifeCycle$start$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.akhikhl.gretty.JettyServerManager.startServer(JettyServerManager.groovy:45) at org.akhikhl.gretty.ServerManager$startServer$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.akhikhl.gretty.Runner.run(Runner.groovy:119) at org.akhikhl.gretty.Runner.this$2$run(Runner.groovy) at org.akhikhl.gretty.Runner$this$2$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.akhikhl.gretty.Runner.main(Runner.groovy:46) [quasar] ERROR: while transforming co/paralleluniverse/fibers/servlet/FiberHttpServlet: null java.lang.NullPointerException at co.paralleluniverse.asm.Item.a(Unknown Source) at co.paralleluniverse.asm.ClassWriter.c(Unknown Source) at co.paralleluniverse.asm.ClassWriter.a(Unknown Source) at co.paralleluniverse.asm.Frame.a(Unknown Source) at co.paralleluniverse.asm.Frame.a(Unknown Source) at co.paralleluniverse.asm.MethodWriter.visitMaxs(Unknown Source) at co.paralleluniverse.asm.tree.MethodNode.accept(Unknown Source) at co.paralleluniverse.asm.commons.JSRInlinerAdapter.visitEnd(Unknown Source) at co.paralleluniverse.asm.MethodVisitor.visitEnd(Unknown Source) at co.paralleluniverse.fibers.instrument.InstrumentClass$1.visitEnd(InstrumentClass.java:193) at co.paralleluniverse.asm.ClassReader.b(Unknown Source) at co.paralleluniverse.asm.ClassReader.accept(Unknown Source) at co.paralleluniverse.asm.ClassReader.accept(Unknown Source) at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:120) at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:88) at co.paralleluniverse.fibers.instrument.JavaAgent$Transformer.transform(JavaAgent.java:187) at sun.instrument.TransformerManager.transform(TransformerManager.java:188) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:367) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:549) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:475) at org.akhikhl.gretty.FilteringClassLoader.loadClass(FilteringClassLoader.java:62) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:367) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at org.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:549) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:475) at org.akhikhl.gretty.FilteringClassLoader.loadClass(FilteringClassLoader.java:62) at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:428) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86) at org.eclipse.jetty.webapp.DiscoveredAnnotation.loadClass(DiscoveredAnnotation.java:82) at org.eclipse.jetty.webapp.DiscoveredAnnotation.getTargetClass(DiscoveredAnnotation.java:67) at org.eclipse.jetty.annotations.WebServletAnnotation.apply(WebServletAnnotation.java:69) at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:419) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1339) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:772) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:517) at org.akhikhl.gretty.JettyWebAppContext.super$10$doStart(JettyWebAppContext.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1206) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150) at org.akhikhl.gretty.JettyWebAppContext.doStart(JettyWebAppContext.groovy:44) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:405) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:372) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.LifeCycle$start$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.akhikhl.gretty.JettyServerManager.startServer(JettyServerManager.groovy:45) at org.akhikhl.gretty.ServerManager$startServer$0.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.akhikhl.gretty.Runner.run(Runner.groovy:119) at org.akhikhl.gretty.Runner.this$2$run(Runner.groovy) at org.akhikhl.gretty.Runner$this$2$run.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.akhikhl.gretty.Runner.main(Runner.groovy:46) 14:34:10 INFO Jetty 9.2.10.v20150310 started and listening on port 8080 14:34:10 INFO runs at: 14:34:10 INFO http://localhost:8080/ Press any key to stop the server. QUASAR WARNING: Quasar Java Agent isn't running. If you're using another instrumentation method you can ignore this message; otherwise, plea se refer to the Getting Started section in the Quasar documentation. [quasar] WARNING: Can't determine super class of com/google/common/collect/MapMakerInternalMap [quasar] WARNING: Can't determine super class of com/google/common/collect/MapMaker$NullConcurrentMap [quasar] WARNING: Can't determine super class of com/google/common/collect/MapMakerInternalMap$KeySet [quasar] WARNING: Can't determine super class of com/google/common/collect/MapMakerInternalMap$ExpirationQueue
I have a servlet which is currently just the example from http://docs.paralleluniverse.co/comsat/#servlets
It seems to still work correctly, despite the errors.
My gradle file is:
`apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'
apply plugin: 'eclipse-wtp'
sourceSets.main.java.srcDirs = ['src/']
configurations {
quasar
}
dependencies {
compile 'co.paralleluniverse:quasar-core:0.7.5:jdk8'
compile 'co.paralleluniverse:comsat-servlet:0.7.0'
compile 'co.paralleluniverse:comsat-jdbc:0.7.0'
providedCompile 'javax.servlet:javax.servlet-api:3.1'
quasar 'co.paralleluniverse:quasar-core:0.7.5:jdk8'
}
configurations.grettyRunnerJetty9 {
resolutionStrategy.eachDependency { DependencyResolveDetails dt ->
if(dt.requested.group == 'org.eclipse.jetty' && dt.requested.name != 'jetty-jsp') {
dt.useVersion '9.3.8.v20160314'
}
}
}
gretty {
port = 8080
contextPath = '/'
servletContainer = 'jetty9'
jvmArg "-javaagent:${configurations.quasar.iterator().next()}"
}`
Without exact information about the reasons it looks like some obfuscated classes when being loaded by the QuasarWebAppClassLoader fail to be parsed, not because Quasar cannot instrument them, but because their names are not parse-able correctly and fail with StringIndexOutOfBoundsException which fully stops the web application from starting.
On line 72 of QuasarWebAppClassLoader :
if (entry != null && path.endsWith(".class") && entry.binaryContent != null) {
String className = name.substring(0, name.length() - ".class".length());
This are the parameters used.
name=d.a
path=d/a.class
manifestRequiere=true
The condition checks if the path contains the ".class" word but the name does not contains it.
As this condition is outside the try catch block it stops the startup of the application as the exception propagates.
I am using Netty together with Comsat's webactors.
Body string set with co.paralleluniverse.comsat.webactors.HttpResponse.error()
method is never displayed.
I have following block of code:
if (succeeded) {
msg.getFrom().send(HttpResponse.ok(self(), msg, "JSON parsed successfully")
.setContentType("text/plain").build());
} else {
System.out.println("RPC failed");
msg.getFrom().send(HttpResponse.error(self(), msg, 500, "RPC failed")
.setContentType("text/plain").build());
}
When it succeeds it will print out "JSON parsed successfully" in Response body, but if it fails it returns 500 Internal server error without body string that was set to "RPC failed".
Here is the output of Postman for both cases:
Can you please confirm if it is a bug or there is something else at hand here?
Hi,
When receiving an HttpRequest
with a WebActor
, it is not possible to access the underlying HttpServletRequest
(or at least I didn't find a way to do so :) if we are sure the actor is running on a servlet.
My personal need is to be able to access the current HttpSession
(because it contains authentication information). Well, I actually need the HttpServletRequest
itself because I'm using a library that needs it to access the session as well as the request parameters.
I was expecting to be able to simply cast it to ServletHttpRequest
and access the request parameter but the class is not visible and the parameter not accessible.
Would it be possible to change that situation? I guess this must be well thought since you may not want to expose too much of the internal APIs, but if you have a clear idea of how to do that, I can provide a PR :)
Thanks!
Recently I've tried to use FiberDataSource from comsat-jdbc. But it can't be used along with hibernate. I've started to add instrumentation manually through suspendables file but it seems to be a lot of work. So are there any plans to support hibernate instrumentation by quasar team?
Is there an artifact for WebSocket API in JSR-356?
In decodeStringBody(), in case getCharacterEncoding() (or any other method in the chain) returns null, the parent getStringBody() method throws the NPE instead of returning null itself.
I have done a PoC for a project I'm considering using comsat. I have tried to use the Actors system, but there's not enough examples or documentation so I find myself trying to figure things up looking at existing classes, the comsat and quasar code and the examples.
Sorry but I'm new to the Actors model paradigm (I knew about actors before, since I've programmed in Scala and I've read about Akka actors a while ago but I haven't really used them. I know they're inspired by Erlang Actors).
Also I've read most of your blog posts in blog.paralleluniverse.co
This is the issue:
I have a WebActor, it receives HttpRequest messages fine and in the examples it uses this pattern
HttpRequest msg = (HttpRequest) message;
msg.getFrom().send(ok(self(), msg, body).build())
this works fine, of course.
The problem is that my WebActor delegates to one or many other actors (looking at the classes in Comsat I thought the appropriate in this case was that the other actors should be BehaviourActor, is that right?)
which receive the WebDataMessage fine, perform the operations they need to perform and then use the msg.getFrom() technique to reply to the original WebActor.
All that is fine, the WebActor receives the messages from the BehaviorActors, but then it needs to send a message with the HttpResponse to the virtual actor ServletActor. How can I do this if I've lost the original HttpRequest to do a .getFrom()? I've done it storing a reference to the HttpRequest in the WebActor like this
private HttpRequest request;
and then doing
if (message instanceof WebDataMessage) {
request.getFrom().send(ok(self(), request, ((WebDataMessage) message).getStringBody()).build());
}
but I don't think that is a good pattern, is it? There must be a better way...
Also, without actors, if my servlet depends on multiple async calls I can always use java Futures to wait for all the async calls to fulfill and then return a combined response, but with actors, after sending a message to several BehaviorActors how can I send a combined response with the message from all of the BehaviorActors? What's the proper way to do it?
When creating a test project based on https://github.com/puniverse/comsat-mvn-archetype with:
mvn archetype:generate -DarchetypeGroupId=co.paralleluniverse -DarchetypeArtifactId=comsat-mvn-archetype -DarchetypeVersion=0.1.1 -DgroupId=testgrp -DartifactId=comsat-testprj-18 -DjavaVersion=1.8
Running mvn -Ptomcat7x dependency:properties clean verify
results in the webapp not being started because of:
[INFO] [talledLocalContainer] SEVERE: LifecycleException
[INFO] [talledLocalContainer] java.lang.NoClassDefFoundError: co/paralleluniverse/fibers/instrument/Log
[INFO] [talledLocalContainer] at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer] at java.lang.Class.forName(Class.java:260)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:721)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:582)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5357)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: co.paralleluniverse.fibers.instrument.Log
[INFO] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
[INFO] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method)
[INFO] [talledLocalContainer] at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] [talledLocalContainer] ... 17 more
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Feb 14, 2015 6:04:13 PM org.apache.catalina.core.ContainerBase addChildInternal
[INFO] [talledLocalContainer] SEVERE: ContainerBase.addChild: start:
[INFO] [talledLocalContainer] org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/comsat-testprj-18]]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[/comsat-testprj-18]]
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5357)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] ... 10 more
[INFO] [talledLocalContainer] Caused by: org.apache.catalina.LifecycleException: start:
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:630)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] ... 12 more
[INFO] [talledLocalContainer] Caused by: java.lang.NoClassDefFoundError: co/paralleluniverse/fibers/instrument/Log
[INFO] [talledLocalContainer] at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer] at java.lang.Class.forName(Class.java:260)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:721)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:582)
[INFO] [talledLocalContainer] ... 13 more
[INFO] [talledLocalContainer] Caused by: java.lang.ClassNotFoundException: co.paralleluniverse.fibers.instrument.Log
[INFO] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
[INFO] [talledLocalContainer] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[INFO] [talledLocalContainer] at java.security.AccessController.doPrivileged(Native Method)
[INFO] [talledLocalContainer] at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
[INFO] [talledLocalContainer] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
[INFO] [talledLocalContainer] ... 17 more
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Feb 14, 2015 6:04:13 PM org.apache.catalina.startup.HostConfig deployWAR
[INFO] [talledLocalContainer] SEVERE: Error deploying web application archive /Users/fabio/Src/Tmp/comsat-testprj-18/target/cargo/configurations/tomcat7x/webapps/comsat-testprj-18.war
[INFO] [talledLocalContainer] java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/comsat-testprj-18]]
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
[INFO] [talledLocalContainer] co.paralleluniverse.fibers.instrument.UnableToInstrumentException: Unable to instrument co/paralleluniverse/fibers/Fiber#onResume()V because of catch for SuspendExecution
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.instrument.InstrumentMethod.accept(InstrumentMethod.java:253)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.instrument.InstrumentClass.visitEnd(InstrumentClass.java:241)
[INFO] [talledLocalContainer] at co.paralleluniverse.asm.ClassReader.accept(Unknown Source)
[INFO] [talledLocalContainer] at co.paralleluniverse.asm.ClassReader.accept(Unknown Source)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:107)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:83)
[INFO] [talledLocalContainer] at co.paralleluniverse.comsat.tomcat.QuasarWebAppClassLoader.findResourceInternal(QuasarWebAppClassLoader.java:71)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2892)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690)
[INFO] [talledLocalContainer] at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.Stack.getStack(Stack.java:41)
[INFO] [talledLocalContainer] at org.glassfish.jersey.internal.Errors.process(Errors.java)
[INFO] [talledLocalContainer] at org.glassfish.jersey.model.internal.ComponentBag.registerModel(ComponentBag.java:398)
[INFO] [talledLocalContainer] at org.glassfish.jersey.model.internal.ComponentBag.register(ComponentBag.java:309)
[INFO] [talledLocalContainer] at org.glassfish.jersey.model.internal.CommonConfig.register(CommonConfig.java:463)
[INFO] [talledLocalContainer] at org.glassfish.jersey.server.ResourceConfig.register(ResourceConfig.java:448)
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:311)
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
[INFO] [talledLocalContainer] at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
[INFO] [talledLocalContainer] at javax.servlet.GenericServlet.init(GenericServlet.java:158)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.jersey.ServletContainer.init(ServletContainer.java:103)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.servlet.FiberHttpServlet.init(FiberHttpServlet.java:80)
[INFO] [talledLocalContainer] at co.paralleluniverse.fibers.jersey.ServletContainer.init(ServletContainer.java:73)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5231)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5518)
[INFO] [talledLocalContainer] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
[INFO] [talledLocalContainer] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
[INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
[INFO] [talledLocalContainer] at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1879)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745)
AutoWebActorHandler
currently scans the entire classpath for @WebActor
annotated classes.
In my case, this is a shame as there's a single @WebActor
annotated class to be found.
As I rather not lose the convenience of the AutoWebActorHandler
, I'm wondering if it would be possible to allow the handler to accept a specific package name for scanning in order to save some of the loading time.
FiberRequestMappingHandlerAdapter.java has this comment:
TODO subclass instead of this copy&paste horror when https://jira.spring.io/browse/SPR-12460 is released
https://jira.spring.io/browse/SPR-12460 has been fixed, so FiberRequestMappingHandlerAdapter should be changed accordingly.
Hi,
I am author of MapDB, an JVM database. I have some experience with Kotlin and cooperative multitasking. MapDB also has prototype which uses AsynchronousFileChannel.
I am thinking about creating special version of MapDB which would use non-blocking operations down to disk IO operations. It has to be bundled with similar web-container and Comsat seems like good choice.
I would like to start discussion about this.
from FiberWebTarget.java
@Override
public WebTarget path(String path) {
webTarget.path(path);
return this;
}
This should be
@Override
public WebTarget path(String path) {
webTarget = webTarget.path(path);
return this;
}
as the path method in the JerseyWebTarget DOES NOT do inplace modification of the path
Hi,
I'm trying to test a WebActor
by fabricating and sending it WebMessage
s directly.
SimpleHttpRequest
& SimpleHttpResponse
are useful for this purpose but are of private
access.
Can they be made public
?
Edit: Actually, SimpleHttpRequest
is more relevant to the issue. I don't need to create SimpleHttpResponse
s.
Hi,
Please update spelling of Adapter in FiberRestAdaptherBuilder.
AutoWebActorHandler
first creates a session and then tries creating an actor based on the current HttpServerExchange
.
In cases where the first HTTP path requested it not handled by any defined WebActor
s (a case which is now possible since the HTTP handlers can be chained), a new session will be created with a null actor reference, leaving the user of the session unable to initiate a WebActor
even when the requested path should be handled by it (that is, only till the session invalidates).
I think the session should be created only if an actor relevant to the exchange was found.
An easy fix, though not ideal, would be to check the actorRef in AutoContextProvider
and invalidate the session if no actorRef is found.
Got NoSuchMethodError when trying Comsat 0.2.0 + Dropwizard 0.7.1
Exception in thread "main" java.lang.NoSuchMethodError: io.dropwizard.jersey.setup.JerseyContainerHolder.(Lcom/sun/jersey/spi/container/servlet/ServletContainer;)V
at io.dropwizard.setup.Environment.(Environment.java:74)
at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:34)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:72)
at test.dropwizard.DropWizardServer.main(DropWizardServer.java:39)
But works fine with Dropwizard 0.7.0
As I understand the reason is io.dropwizard.jersey.setup.JerseyContainerHolder bundled together with Comsat. No idea why you include it (and some other dropwizard classes) into distribution.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.