Pular para o conteúdo principal

Postagens

Hello World, Kogito!

Kogito is what you need to bring business automation to the cloud! Kogito Quarkus extension allows you to build applications on top of quarkus, bringing native business applications, developer joy and multiple useful extensions that can be used along with Kogito. Here are some interesting links for you to get started with Kogito: Kogito Get Started Guide Kogito Quarkus Extension Guide Kogito Examples Kogito Tooling Installation Kogito + Quarkus on VS Code Tutorial If you are a video person there's also this: Wondering about where Kogito came from? Read this blog from Kris. Happy Coding!

Hello World, Quarkus!

Today JBoss community released Quarkus . I could not wait to test it. Projects can be generated using the following archetype: mvn io.quarkus:quarkus-maven-plugin:0.11.0:create      \     -DprojectGroupId=org.fxapps                        \     -DprojectArtifactId=quarkus-getting-started        \     -DclassName="org.fxapps.GreetingResource"          \     -Dpath="/hello"              With the project that was generated you can create native binaries and docker images from it. See the following video for a quick demo of a hello world application:

Adding dynamic properties to a Javascript object in a GWT + JSInterop context

GWT is a framework that allows you to program the user interface of your application in Java and later it is compiled to Javascript, which will work across all browsers. The main advantage is that you don't have to care about minification of Javascript and compatibility across browsers, easy communication with server side and it is Java, you can use Java on server and client side. With Errai you have CDI (and more) on the client side, which means that you can make your application flexible and create pluggable components. GWT in its later versions introduced JSInterop , a great way to call Javascript using Java. During the compilation the Java bean will be compiled to an equivalent Javascript code. This is good for Javascript objects with static properties, but knowing Javascript you will always find cases where the attribute name is dynamic, where the attribute is created "on the fly", for example: var myObject = {     someAttributeIJustCreated : "the value...

Debugging error "Could not import XML from stream: invalid LOC header (bad signature)" when building a Thorntail application

Tl;DR: Check if there's corrupted JARs in your maven repository When building a Thorntail 2.2.0.Final application I faced the error  Could not import XML from stream: invalid LOC header (bad signature) when trying to build the JAR using mvn clean install . I could not find what is wrong, I just downloaded the application using Thorntail generator but I was not able to run it, so frustrating. When I used the -X flag I could see the error stack trace. The part that was causing the error was: Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)     at java.util.zip.ZipFile.read (Native Method)     at java.util.zip.ZipFile.access$1400 (ZipFile.java:60) (...)     at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:339)     at javax.xml.parsers.DocumentBuilder.parse (DocumentBuilder.java:121)     at org.jboss.shrinkwrap.descriptor.spi.node.dom.XmlDom...

Very simple chat using JGroups and JavaFX

I just wanted to share this small application using JGroups and JavaFX. JGroups is "a toolkit for reliable messaging" and one of the oldest and stable Java libraries. The chat code I used was the same one from JGroups sample code page , we need less than 5 codes to implement all the chat functionality!

The Image Classifier Microservice is public on Docker repository

Using fabric8 docker plugin and the project from A Java microservice for image classification using Thorntail and DeepLearning4J  post I was able to build a docker image and I pushed it to my Docker repository! In this post I am sharing the steps I followed to build the docker image and publish it. Next post I hope to show you how to run on Openshift with some real world application. Step 1: Build an image from the Thorntail project This is simple, you will need just a configuration in the maven descriptor, see the changes in the project pom.xml . Notice that I had to made a manual copy of a JAR file as described in Thorntail's issue #951 , however, I am probably missing something, that may not be a bug,. Let's wait to see what Thorntail team will provide as a feedback for that issue. I wasn't a bug, Bob just commented on the issue, the solution is not use the thin mode. For having help I pinged Thorntail users on #thorntail IRC channel in freenode and Ken Finin...

A Java microservice for image classification using Thorntail and DeepLearning4J

If you want to consume a trained neural network from an application you will probably not want to package the model within your app. Models usually occupies ~50mb of disk size, see these keras trained models for example. A good approach for allowing other applications to use your model is a separated microservice and, if you are a Java developer, Thorntail is the best choice: Native CDI; Native Eclipse Microprofile support; Seamless Integration with JAX-RS; Plugin for creating docker images For image classification nowadays we use CNN neural networks and for Java developers DeepLearning4J is the API you are looking for. You can consume some of the multiple pre-trained models , build your own model or even use a Keras Model ! So yes, we need a microservice for image classification. The microservice should be responsible to run a model that we configure and if we don't provide a model, it should use a default one. It should be accessible using REST and it should cach...