helidon-io / helidon Goto Github PK
View Code? Open in Web Editor NEWJava libraries for writing microservices
Home Page: https://helidon.io
License: Apache License 2.0
Java libraries for writing microservices
Home Page: https://helidon.io
License: Apache License 2.0
Automation should add a label for each issue submitted indicating is submitter an Oracle employee or an external contributor.
I found a potential issue with the Dockerfile
template that gets installed with the quickstart. This line:
COPY libs /app/libs
I believe should be like so:
COPY libs /app
Otherwise, you end up at:
/app/libs/libs
Which ends up causing classpath issues when you run the app.
We need to run JWT Auth TCK as part of our testing pipeline.
Following by Quickstart Examples I have such output:
2018.09.18 13:44:28 INFO io.netty.util.internal.PlatformDependent Thread[main,5,main]: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2018.09.18 13:44:28 INFO io.helidon.webserver.netty.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' startup failed. Startup failure routine initiated.
WEB server is DOWN. Good bye!
It happens whenever I run mvn package or directly run the generated example via intellij idea.
Generate project quickstart.se with command:
mvn archetype:generate -DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId=helidon-quickstart-se \
-DarchetypeVersion=0.10.0 \
-DgroupId=io.helidon.examples \
-DartifactId=quickstart-se \
-Dpackage=io.helidon.examples.quickstart.se
cd quickstart-*
mvn package
Should live under microprofile/tests/tck.
Parallax work on the landing page.
JWT provider exists in implementation, yet it is not mentioned in documentation
when I follew the guide and meet this...
emmmm.. how to resolve this...
PS D:\sources\Helidon> mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=io.helidon.archetypes -Darchety
peArtifactId=helidon-quickstart-se -DarchetypeVersion=0.10.1 -X
Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00)
Maven home: D:\devtools\apache-maven-3.5.4\bin\..
Java version: 1.8.0_181, vendor: Oracle Corporation, runtime: C:\ProgramFiles\Java8\jdk1.8.0_181\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.annotation.* < plexus.core
[DEBUG] Imported: javax.annotation.security.* < plexus.core
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core
[DEBUG] Imported: javax.inject.* < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Imported: org.fusesource.jansi.* < plexus.core
[DEBUG] Imported: org.slf4j.* < plexus.core
[DEBUG] Imported: org.slf4j.helpers.* < plexus.core
[DEBUG] Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from D:\devtools\apache-maven-3.5.4\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Administrator\.m2\settings.xml
[DEBUG] Reading global toolchains from D:\devtools\apache-maven-3.5.4\bin\..\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\Administrator\.m2\toolchains.xml
[DEBUG] Using local repository at D:\devtools\apache-maven-3.3.9\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for D:\devtools\apache-maven-3.3.9\repository
[INFO] Scanning for projects...
[DEBUG] Using mirror maven-custom (http://localhost:8888/repository/maven-custom/) for central (https://repo.maven.apache.org/maven2).
[DEBUG] Extension realms for project org.apache.maven:standalone-pom:pom:1: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.167 s
[INFO] Finished at: 2018-10-15T22:49:44+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\sources\Helidon). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (D:\sources\Helidon). Please verify you invoked Maven from the correct directory.
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:85)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
PS D:\sources\Helidon> mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=io.helidon.archetypes -Darchety
peArtifactId=helidon-quickstart-se -DarchetypeVersion=0.10.1 -DgroupId=io.helidon.examples -DartifactId=quickstart-se
-Dpackage=io.helidon.examples.quickstart.se
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.154 s
[INFO] Finished at: 2018-10-15T22:51:07+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\sources\Helidon). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
Requirements:
See issue #98.
Helidon application can load application.yaml when package app jar, but when package a fat jar,
it can not load.
add assembly to helidon/examples/helidon-quickstart-se/pom.xml
assembly a fat: pom.xml
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>${mainClass}</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>simple-command</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
run maven package and assemble a fat jar
mvn package
then run this fat jar
java -jar target/quickstart-se-jar-with-dependencies.jar
it can not load application.yaml and run on a random port.
Update sitegen tooling to support production javascript.
Update documentation look and feel to implement the UX designer feedback.
The quickstart-se and quickstart-mp modules defined in root pom.xml does not existed.
mvn clean install
, and got the following errors:[ERROR]
[ERROR] The project io.helidon:helidon-project:0.10.0 (E:\Users\hantsy\temp\helidon-0.10.0\pom.xml) has 2 errors
[ERROR] Child module E:\Users\hantsy\temp\helidon-0.10.0\quickstart-se of E:\Users\hantsy\temp\helidon-0.10.0\pom.xml does not exist
[ERROR] Child module E:\Users\hantsy\temp\helidon-0.10.0\quickstart-mp of E:\Users\hantsy\temp\helidon-0.10.0\pom.xml does not exist
I request the follow url:
curl -X GET http://localhost:8080/greet/小高
and then,log:
2018.09.11 12:53:09 严重 io.helidon.webserver.RequestRouting Thread[nioEventLoopGroup-3-3,10,main]: Unexpected error occurred during routing! java.lang.IllegalArgumentException: Illegal character in path at index 9: /greet/å°é« at java.net.URI.create(URI.java:852) at io.helidon.webserver.netty.BareRequestImpl.getUri(BareRequestImpl.java:81) at io.helidon.webserver.RequestRouting.createRequestSpan(RequestRouting.java:123) at io.helidon.webserver.RequestRouting.route(RequestRouting.java:69)
When we use CDI, interceptor API, inject etc. in microprofile modules, these should be declared as "provided" in maven, as they must be available in runtime (provided by Weld in our case).
Current approach (when defined as compile scope) fails to run with java module system (java 9+)
The problem is at least in microprofile metrics implementation.
Go to the Doc site, open the dropdown, the bottom community link points to a ProdDev Pass Slack channel.
Helidon Version: 0.10.0-SNAPSHOT
Occasionally in pipeline runs I get failures in some of the Metrics tests. This does not happen often, and a retry usually clears it up. You can see a failed run here: https://app.wercker.com/Helidon/helidon/runs/build/5b9ad0a98c38a200070cd426?step=5b9ad0dbf07af00007d84713
An excerpt
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec - in io.helidon.metrics.HelidonTimerTest
Running io.helidon.metrics.HelidonHistogramTest
Tests run: 5, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec <<< FAILURE! - in io.helidon.metrics.HelidonHistogramTest
testJson Time elapsed: 0.01 sec <<< FAILURE!
org.opentest4j.AssertionFailedError: mean: expected: <50.6349>, but actual value was: <50.816667845774624>
at io.helidon.metrics.HelidonHistogramTest.withTolerance(HelidonHistogramTest.java:189)
at io.helidon.metrics.HelidonHistogramTest.testJson(HelidonHistogramTest.java:145)
testStatisticalValues Time elapsed: 0.008 sec <<< FAILURE!
org.opentest4j.MultipleFailuresError:
Testing statistical values for integers (4 failures)
median: expected: <48.0>, but actual value was: <49.0>
75th percentile: expected: <75.0>, but actual value was: <76.0>
99th percentile: expected: <98.0>, but actual value was: <99.0>
mean: expected: <50.6>, but actual value was: <50.816667845774624>
at io.helidon.metrics.HelidonHistogramTest.testSnapshot(HelidonHistogramTest.java:169)
at io.helidon.metrics.HelidonHistogramTest.testStatisticalValues(HelidonHistogramTest.java:162)
testPrometheus Time elapsed: 0.005 sec <<< FAILURE!
java.lang.AssertionError:
Expected: is "# TYPE application:file_sizes_mean_bytes gauge\napplication:file_sizes_mean_bytes 50634.99999999998\n# TYPE application:file_sizes_max_bytes gauge\napplication:file_sizes_max_bytes 99000\n# TYPE application:file_sizes_min_bytes gauge\napplication:file_sizes_min_bytes 0\n# TYPE application:file_sizes_stddev_bytes gauge\napplication:file_sizes_stddev_bytes 29438.949964290514\n# TYPE application:file_sizes_bytes summary\n# HELP application:file_sizes_bytes Users file size\napplication:file_sizes_bytes_count 200\napplication:file_sizes_bytes{quantile=\"0.5\"} 48000\napplication:file_sizes_bytes{quantile=\"0.75\"} 75000\napplication:file_sizes_bytes{quantile=\"0.95\"} 96000\napplication:file_sizes_bytes{quantile=\"0.98\"} 98000\napplication:file_sizes_bytes{quantile=\"0.99\"} 98000\napplication:file_sizes_bytes{quantile=\"0.999\"} 99000\n"
but: was "# TYPE application:file_sizes_mean_bytes gauge\napplication:file_sizes_mean_bytes 50816.667845774624\n# TYPE application:file_sizes_max_bytes gauge\napplication:file_sizes_max_bytes 99000\n# TYPE application:file_sizes_min_bytes gauge\napplication:file_sizes_min_bytes 0\n# TYPE application:file_sizes_stddev_bytes gauge\napplication:file_sizes_stddev_bytes 29461.816543751112\n# TYPE application:file_sizes_bytes summary\n# HELP application:file_sizes_bytes Users file size\napplication:file_sizes_bytes_count 200\napplication:file_sizes_bytes{quantile=\"0.5\"} 49000\napplication:file_sizes_bytes{quantile=\"0.75\"} 76000\napplication:file_sizes_bytes{quantile=\"0.95\"} 96000\napplication:file_sizes_bytes{quantile=\"0.98\"} 98000\napplication:file_sizes_bytes{quantile=\"0.99\"} 99000\napplication:file_sizes_bytes{quantile=\"0.999\"} 99000\n"
at io.helidon.metrics.HelidonHistogramTest.testPrometheus(HelidonHistogramTest.java:157)
Running io.helidon.metrics.HelidonMeterTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in io.helidon.metrics.HelidonMeterTest
Results :
Failed tests:
HelidonHistogramTest.testJson:145->withTolerance:189 mean: expected: <50.6349>, but actual value was: <50.816667845774624>
HelidonHistogramTest.testPrometheus:157
Expected: is "# TYPE application:file_sizes_mean_bytes gauge\napplication:file_sizes_mean_bytes 50634.99999999998\n# TYPE application:file_sizes_max_bytes gauge\napplication:file_sizes_max_bytes 99000\n# TYPE application:file_sizes_min_bytes gauge\napplication:file_sizes_min_bytes 0\n# TYPE application:file_sizes_stddev_bytes gauge\napplication:file_sizes_stddev_bytes 29438.949964290514\n# TYPE application:file_sizes_bytes summary\n# HELP application:file_sizes_bytes Users file size\napplication:file_sizes_bytes_count 200\napplication:file_sizes_bytes{quantile=\"0.5\"} 48000\napplication:file_sizes_bytes{quantile=\"0.75\"} 75000\napplication:file_sizes_bytes{quantile=\"0.95\"} 96000\napplication:file_sizes_bytes{quantile=\"0.98\"} 98000\napplication:file_sizes_bytes{quantile=\"0.99\"} 98000\napplication:file_sizes_bytes{quantile=\"0.999\"} 99000\n"
but: was "# TYPE application:file_sizes_mean_bytes gauge\napplication:file_sizes_mean_bytes 50816.667845774624\n# TYPE application:file_sizes_max_bytes gauge\napplication:file_sizes_max_bytes 99000\n# TYPE application:file_sizes_min_bytes gauge\napplication:file_sizes_min_bytes 0\n# TYPE application:file_sizes_stddev_bytes gauge\napplication:file_sizes_stddev_bytes 29461.816543751112\n# TYPE application:file_sizes_bytes summary\n# HELP application:file_sizes_bytes Users file size\napplication:file_sizes_bytes_count 200\napplication:file_sizes_bytes{quantile=\"0.5\"} 49000\napplication:file_sizes_bytes{quantile=\"0.75\"} 76000\napplication:file_sizes_bytes{quantile=\"0.95\"} 96000\napplication:file_sizes_bytes{quantile=\"0.98\"} 98000\napplication:file_sizes_bytes{quantile=\"0.99\"} 99000\napplication:file_sizes_bytes{quantile=\"0.999\"} 99000\n"
HelidonHistogramTest.testStatisticalValues:162->testSnapshot:169 Testing statistical values for integers (4 failures)
median: expected: <48.0>, but actual value was: <49.0>
75th percentile: expected: <75.0>, but actual value was: <76.0>
99th percentile: expected: <98.0>, but actual value was: <99.0>
mean: expected: <50.6>, but actual value was: <50.816667845774624>
Tests run: 44, Failures: 3, Errors: 0, Skipped: 0
If I want to send json,I need to use "javax.json.JsonObject" !!!,We usually don't take this approach。As for me,I often use some librarys like Jackson,fastjson,Because we usually take a java bean convert to a json string !!!
https://helidon.io/docs/latest/#/webserver/09_tracing-support I folllow this guide, but meet some error, no service:
As part of MicroProfile 1.2 implementation JWT Auth support must be added to Helidon. Consider implementing the latest versio of JWT Auth.
http://microprofile.io/project/eclipse/microprofile-jwt-auth
Generate a Quickstart project using the Mvn archetype.
xsi:schemaLocation
is incorrect
--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mav en.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
It seems there are some OS specific path caused the errors.
mvn clean install
I commented out the tow missing modules(#64 ) in the 0.10.0, and get helidon installed in my local system.
I tried to rerun the project generating command via the following command, it still failed.
mvn archetype:generate -DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId=helidon-quickstart-se \
-DarchetypeVersion=0.10.0 \
-DgroupId=io.helidon.examples \
-DartifactId=quickstart-se \
-Dpackage=io.helidon.examples.quickstart.se
When I opended the helidon-archetype-mp pom.xml file, it is a html file like this, not a valid POM file.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var href_url = window.location.href;
var pos = href_url.indexOf("?")
var param = '';
if(pos > 0){
var param = '?'+href_url.substring(pos+1);
}
var n_language = (navigator.browserLanguage || navigator.language).toLowerCase();
var strEn = '';
var isEn = false;
if(n_language.indexOf('en')>-1 && isEn) {
strEn = 'eng_';
}
if(/applewebkit.*mobile.*/i.test( navigator.userAgent.toLowerCase())
|| /windows.*phone.*mobile.*/i.test( navigator.userAgent.toLowerCase())
|| /msie.*touch.*wpdesktop/i.test( navigator.userAgent.toLowerCase())
|| /adr.*mobile*/i.test( navigator.userAgent.toLowerCase())
|| /android.*mobile.*/i.test( navigator.userAgent.toLowerCase())
|| /android.*applewebkit.*/i.test( navigator.userAgent.toLowerCase())){
if(/ipad/i.test(navigator.userAgent.toLowerCase())){
window.location.href = "/p/f871f89bc889528e6646ae7bc7195ae7/" + strEn + "index.html"+param;
}else{
window.location.href = "/p/f871f89bc889528e6646ae7bc7195ae7/" + strEn + "mobile_index.html"+param;
}
}else{
window.location.href = "/p/f871f89bc889528e6646ae7bc7195ae7/" + strEn + "index.html"+param;
}
</script>
</head>
<body>
</body>
</html>
The Metrics and Health Support in our documentation needs to be updated. It just mentions PrometheusSupport
and not the new metrics implementation. The new implementation is based on Helidon's support for MicroProfile Metrics and can be used in a Helidon SE application. See the ToDos example. Specifically the “demo-frontend”. It performs registration in “Main” class, line 150 and usage in “TodosHandler”
WebServer does not currently support HTTP/2. Netty has some support for it.
Create a wiki page describing recommended JMeter config.
Enable health-check TCK tests.
We need to understand how to use the codec to provide HTTP/2 support in Helidon:
Remove it from projects where it's not needed.
Prometheus 2.2.1 and 2.4.3 fail to scrape Helidon metrics. Prometheus reports the error no token found
. This error is typically reported by Prometheus when it can't parse the scrapped metrics data.
- job_name: 'helidon'
metrics_path: '/metrics/'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:8080']
You'll see prometheus report:
level=warn ts=2018-10-16T01:35:44.714172501Z caller=scrape.go:697 component="scrape manager" scrape_pool=helidon target=http://localhost:8080/metrics/ msg="append failed" err="no token found"
Update the site generation to include a guides section and then incorporate the new guide into it.
I tried to build a Helidon SE program using maven. After starting the program, I used curl to access it without any problem. When I used the browser to access it, I got the following error:
» java -jar target/quickstart-se.jar
[DEBUG] (main) Using Console logging
2018.09.12 09:40:01 信息 io.netty.util.internal.PlatformDependent Thread[main,5,main]: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2018.09.12 09:40:01 信息 io.helidon.webserver.netty.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '@default' started: [id: 0x1be1a7d7, L:/0:0:0:0:0:0:0:0:8080]
WEB server is up! http://localhost:8080
2018.09.12 09:40:19 警告 io.helidon.webserver.RequestRouting Thread[nioEventLoopGroup-3-3,10,main]: Default error handler: Response wasn't successfully sent.
java.util.concurrent.CompletionException: io.helidon.webserver.SocketClosedException: Response channel is closed!
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:593)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1977)
at io.helidon.webserver.netty.BareResponseImpl.lambda$new$2(BareResponseImpl.java:104)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:504)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:483)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:424)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:103)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1148)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:764)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:740)
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:945)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:360)
at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:901)
at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1376)
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776)
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768)
at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749)
at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115)
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:802)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831)
at io.helidon.webserver.netty.BareResponseImpl.lambda$completeInternal$9(BareResponseImpl.java:184)
at io.helidon.webserver.netty.BareResponseImpl.runOnOutboundEventLoopThread(BareResponseImpl.java:308)
at io.helidon.webserver.netty.BareResponseImpl.completeInternal(BareResponseImpl.java:172)
at io.helidon.webserver.netty.BareResponseImpl.onComplete(BareResponseImpl.java:322)
at io.helidon.webserver.SendHeadersFirstPublisher$DelegatingSubscriber.onComplete(SendHeadersFirstPublisher.java:131)
at io.helidon.common.reactive.ReactiveStreamsAdapter$ReactiveStreamsSubscriber.onComplete(ReactiveStreamsAdapter.java:135)
at reactor.core.publisher.Operators.complete(Operators.java:125)
at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:45)
at reactor.core.publisher.Mono.subscribe(Mono.java:3080)
at io.helidon.common.reactive.ReactiveStreamsAdapter$FlowPublisher.subscribe(ReactiveStreamsAdapter.java:104)
at io.helidon.webserver.SendHeadersFirstPublisher.subscribe(SendHeadersFirstPublisher.java:77)
at io.helidon.webserver.Response.lambda$send$5(Response.java:229)
at io.helidon.webserver.Response$SendLockSupport.execute(Response.java:371)
at io.helidon.webserver.Response$SendLockSupport.access$100(Response.java:358)
at io.helidon.webserver.Response.send(Response.java:226)
at io.helidon.webserver.Response.send(Response.java:240)
at io.helidon.webserver.RequestRouting$RoutedRequest.defaultHandler(RequestRouting.java:405)
at io.helidon.webserver.RequestRouting$RoutedRequest.nextNoCheck(RequestRouting.java:382)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:330)
at io.helidon.webserver.json.JsonSupport.accept(JsonSupport.java:156)
at io.helidon.webserver.RequestRouting$RoutedRequest.next(RequestRouting.java:337)
at io.helidon.webserver.RequestRouting.route(RequestRouting.java:103)
at io.helidon.webserver.netty.ForwardingHandler.channelRead0(ForwardingHandler.java:119)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:745)
Caused by: io.helidon.webserver.SocketClosedException: Response channel is closed!
at io.helidon.webserver.netty.BareResponseImpl.lambda$new$2(BareResponseImpl.java:103)
... 66 more
The problem doesn't seem to come back when I try again, and I think helidon might have some hidden bugs.
helidon 0.10.0 archetype is not available in Maven central repository
Follow the Getting started guide, and ran the following command.
mvn archetype:generate -DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId=helidon-quickstart-se \
-DarchetypeVersion=0.10.0 \
-DgroupId=io.helidon.examples \
-DartifactId=quickstart-se \
-Dpackage=io.helidon.examples.quickstart.se
It failed.
The content-types supported by the current JSON support utility are hard-coded.
We need to provide a way for users to specify the content type that are associated with JSON payload.
Register JSON support, send JSON payload with a post request with content-type application/x-www-form-urlencoded
I tried to start quickstart-se
from the command line, and I started it from the IDE. I press Ctrl+C
or use the IDE to close the program (actually sending the kill -2 signal), and the logic in server.whenshutdown()
is not executed.
shutdown logic
server.whenShutdown().thenRun(()
-> System.out.println("WEB server is DOWN. Good bye!"));
terminal
» java -jar target/quickstart-se.jar
WEB server is up! http://localhost:8080
^C%
IDE
WEB server is up! http://localhost:8080
Disconnected from the target VM, address: '127.0.0.1:49495', transport: 'socket'
Process finished with exit code 130 (interrupted by signal 2: SIGINT)
The maven-javadoc-plugin
configuration works, but is slightly off. In the <additionalJOptions>
stanza:
https://github.com/oracle/helidon/blob/8fbafbd2c46afd9b76f151843300f22630882252/pom.xml#L223-L226
…the -source
option is shoehorned in here. This really should be its own element.
Additionally, to make javadoc links to javadoc.io work properly, there needs to be an explicit user agent set on the HTTP client used by the maven-javadoc-plugin
.
I'll have a fix for this configuration as part of an upcoming PR.
This is an intermittent test failure.
We will track this test failure with this issue.
See relevant snippet from the log.
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in io.helidon.config.KeyTokenResolvingTest
Running io.helidon.config.ListenerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.ListenerTest
Running io.helidon.config.PollingStrategiesTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.PollingStrategiesTest
Running io.helidon.config.spi.AbstractConfigSourceTest
Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractConfigSourceTest
Running io.helidon.config.spi.AbstractOverrideSourceTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractOverrideSourceTest
Running io.helidon.config.spi.AbstractParsableConfigSourceTest
Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractParsableConfigSourceTest
Running io.helidon.config.spi.AbstractSourceTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.AbstractSourceTest
Running io.helidon.config.spi.ConfigSourceConfigMapperTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.087 sec - in io.helidon.config.spi.ConfigSourceConfigMapperTest
Running io.helidon.config.spi.ConfigSourceTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.ConfigSourceTest
Running io.helidon.config.spi.OverrideSourceTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.OverrideSourceTest
Running io.helidon.config.spi.PollingStrategyConfigMapperTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.PollingStrategyConfigMapperTest
Running io.helidon.config.spi.PollingStrategyTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.PollingStrategyTest
Running io.helidon.config.spi.RetryPoliciesTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in io.helidon.config.spi.RetryPoliciesTest
Running io.helidon.config.spi.RetryPolicyConfigMapperTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.RetryPolicyConfigMapperTest
Running io.helidon.config.spi.SourceTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in io.helidon.config.spi.SourceTest
Running io.helidon.config.UseFirstAvailableConfigSourceTest
Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE! - in io.helidon.config.UseFirstAvailableConfigSourceTest
testDescriptionAvailable Time elapsed: 0.001 sec <<< FAILURE!
java.lang.AssertionError:
Expected: a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
but: was "ClasspathConfig[application.yaml]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"
at io.helidon.config.UseFirstAvailableConfigSourceTest.testDescriptionAvailable(UseFirstAvailableConfigSourceTest.java:46)
Results :
Failed tests:
UseFirstAvailableConfigSourceTest.testDescriptionAvailable:46
Expected: a string containing "ClasspathConfig[application.yaml]?->ClasspathConfig[", "io/helidon/config/application.properties]?->ClasspathConfig[", "io/helidon/config/application.conf]->ClasspathConfig[", "io/helidon/config/application.json]?" in order
but: was "ClasspathConfig[application.yaml]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.properties]?->ClasspathConfig[E:\Users\hantsy\temp\helidon-0.10.0\config\config\target\test-classes\io\helidon\config\application.conf]->ClasspathConfig[io/helidon/config/application.json]?"
Tests run: 3306, Failures: 1, Errors: 0, Skipped: 17
This test happens intermittently as part of a full build. (mvn install)
WebServer does not currently have support for multipart Content-Type. It is left up to the developer to get and parse the body contents themselves. We should consider adding support.
PR #179 contains a proposed API for multipart support.
We will use this enhancement to track implementation of phase 1 of the API proposal. Phase 1 APIs support the "buffered model" as described in PR #179.
When a Helidon app starts and finds that it cannot bind to a port in use, it aborts without reporting a friendly message to the user. We should detect the condition and print a message explaining the conflict.
Using quickstart-se and having a process already listening to 8080 (default port).
When running Helidon SE with zipkin on a jvm supporting modules (jigsaw), I get an exception that jersey.client, jersey.server and jersey.common are not found.
These modules are as optional dependencies in maven and should be declared static in module-info.java
requires java.logging;
requires java.json;
requires io.helidon.webserver;
requires io.helidon.metrics;
requires io.helidon.security;
requires io.helidon.security.adapter.webserver;
requires io.helidon.webserver.zipkin;
requires io.helidon.webserver.json;
Netty has support for websocket.
Investigate how the webserver API could be used to handle websockets.
See some netty + websocket blog post: https://medium.com/@irunika/how-to-write-a-http-websocket-server-using-netty-f3c136adcba9
There is currently support to associate a route with a Service
during route building. A step further would be to associate a route with a lambda that could dynamically return a service, akin to a resource locator in JAX-RS.
For example,
private static Routing createRouting() {
return Routing.builder()
.register("/service/{version}", path -> isV1(path) ? new ServiceV1() : new CurrentService())
.build();
}
Note that path
is passed to the function at runtime in order for application code to provide routing instructions.
Currently the Service
provides a update method to define routine rules, but it can not provides concept like Jaxrs Resource and sub resource, the path params can NOT be resolved in register
method.
Imagine the following case.
I want to build comments api under a certain post, I could design APIs like this.
/posts/post-id/comments
I would like register it in the PostService
like this:
@Override
public void update(Routing.Rules rules) {
rules.get("/", this::getAllPosts)
.post("/", this::savePost)
.get("/{id}", this::getPostById)
.put("/{id}", this::updatePost)
.delete("/{id}", this::deletePostById);
.register("/{id}/comments", new CommentService());
}
And in the CommentService
:
@Override
public void update(Routing.Rules rules) {
rules.get("/", this::getAllComments)
.post("/", Handler.of(JsonObject.class, this::saveComment, this::errorHandler));
}
All uri path in CommentService should be appended /{id}/comments, and all path params should be resolved in CommentService, eg post id in the path.
post id in /{id}/comments is null, check my sample, https://github.com/hantsy/helidon-sample/blob/master/quickstart-se/src/main/java/io/helidon/examples/quickstart/se/CommentService.java#L37.
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.