WARN XXX failed and will not be available for authoring.
fernandocantu Feb 1, 2017 10:00 AMHello, I am trying to create a new service task which will send text messages to a phone. To do this I created maven project which would send text message and I import it to Jboss BPM suit as a jar file
The maven project looks like this:
package org.jugvale.jbpm.workitemhandler; import org.drools.core.process.instance.WorkItemHandler; import org.kie.api.runtime.process.WorkItem; import org.kie.api.runtime.process.WorkItemManager; import com.twilio.Twilio; import com.twilio.rest.api.v2010.account.Message; import com.twilio.type.PhoneNumber; import java.net.URI; import java.net.URISyntaxException; public class SMSWorkItemHandler implements WorkItemHandler { public static final String ACCOUNT_SID = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"; public static final String AUTH_TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; public static final String FROM = "##################"; // the XXXXXXXX is not an error I just can't give this information. public void abortWorkItem(WorkItem wi, WorkItemManager wim) { System.out.println("Oh something went wrong"); } public void executeWorkItem(WorkItem wi, WorkItemManager wim) { String to = (String)wi.getParameter("TO"); String text = (String)wi.getParameter("TEXT"); String MediaUrl = (String)wi.getParameter("MEDIA_URL"); assert to != null: "to can't be null"; assert text != null: "text cant be null"; if(MediaUrl == null){ SendSMS(to,text); } else { SendSMS(to,text,MediaUrl); } System.out.println("Message has been succesfully sent"); System.out.println("To: "+to); System.out.println("From: "+FROM); System.out.println("Text: "+text); System.out.println("MediaUrl: "+MediaUrl); wim.completeWorkItem(wi.getId(), null); } public void SendSMS(String to, String text) { Twilio.init(ACCOUNT_SID, AUTH_TOKEN); Message message = Message .creator(new PhoneNumber(to), // to new PhoneNumber(FROM), // from text) .create(); } public void SendSMS(String to, String text, String MediaURL) { Twilio.init(ACCOUNT_SID, AUTH_TOKEN); try { Message message = Message .creator(new PhoneNumber("to"), // to new PhoneNumber(FROM), // from text) .setMediaUrl(new URI(MediaURL)) .create(); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
and here is how my POM looks
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jugvale.jbpm.workitemhandler</groupId>
<artifactId>sms-sender</artifactId>
<version>1.0.2</version>
<packaging>jar</packaging>
<name>sms-sender</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-flow</artifactId>
<version>6.0.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>(7.0,7.9)</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.3</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-internal</artifactId>
<version>6.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
</dependencies>
</project>
So when I add the text messaging jar as a dependency to my project I get a bunch of warnings saying:
09:08:19,779 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.Service$State$4 failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,779 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.Service$State$6 failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,782 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.Striped$SmallLazyStriped failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,786 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.ServiceManager$ServiceListener failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,810 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.Striped$LargeLazyStriped failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,821 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.Futures$ListFuture$ListFutureRunningState failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,833 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.util.concurrent.ServiceManager failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,858 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.collect.ImmutableMap$IteratorBasedImmutableMap failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,859 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.collect.AbstractMapBasedMultimap$KeySet$1 failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,873 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.collect.DenseImmutableTable$Column failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly.
09:08:19,874 WARN [org.kie.workbench.common.services.backend.builder.ClassVerifier] (http-127.0.0.1/127.0.0.1:8080-5) Verification of class com.google.common.collect.FilteredEntryMultimap$Keys failed and will not be available for authoring.Please check the necessary external dependencies for this project are configured correctly. And so on...
This problem was address on the link "Verification of class xxx failed and will not be available for authoring" threw while Build & Deploy in business-centra…
However, I added the dependencies to my POM and I am still getting this warnings.
Additionally when I build the project and run it. I get and error saying
java.lang.NoSuchMethodError:org.apache.http.client.methods.RequestBuilder.setCharset(Ljava/nio/charset/Charset;)Lorg/apache/http/client/methods/RequestBuilder;
This error is address by twilio (the application I use to send text messages) on the link Sample code from the doc don't work · Issue #296 · twilio/twilio-java · GitHub
This error is caused by the fact that setCharset was introduced in httpclient 4.4. This problem is fixed in httpclient 4.5.2, which is the one that I am currently using if you look at my POM file.
Additionally this error doesn't occur when I run the Maven project manually on eclipse. As such this error must be cause due to some interaction between Jboss BPM Suit and my jar file.
Do you guys have any idea of what could be happening?
Message was edited by: Fernando Pena Cantu