"NoSuchMethodError" when using Remote Java KIE API with BPM Suite 6

Solution Unverified - Updated -

Issue

When using remote KIE API following this chapter 13.6. Remote Java API in BPMS 6 development guide, I setup my pom.xml like below:

    <properties>
        <jbpm.version>6.0.2-redhat-6</jbpm.version>
    </properties>

    <repositories>
        <repository>
            <id>redhat-techpreview-all-repository</id>
            <name>Red Hat Tech Preview repository (all)</name>
            <url>http://maven.repository.redhat.com/techpreview/all/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.jbpm</groupId>
            <artifactId>jbpm-test</artifactId>
            <version>${jbpm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-ci</artifactId>
            <version>${jbpm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.kie.remote</groupId>
            <artifactId>kie-services-client</artifactId>
            <version>${jbpm.version}</version>
        </dependency>
    </dependencies>

And my source code looks like this:

        String deploymentId = "org.kie.example:project1:1.0.0";
        URL baseUrl = new URL("http://localhost:8080/business-central/");
        String username = "user";
        String password = "password";

        RemoteRuntimeEngineFactory restSessionFactory = new RemoteRestRuntimeFactory(deploymentId, baseUrl, username, password);
        RemoteRuntimeEngine engine = restSessionFactory.newRuntimeEngine();

        KieSession ksession = engine.getKieSession();
        ksession.startProcess("com.sample.bpmn.hello");
        ......

I can compile this but when I try to run the testing, it gives me NoSuchMethodError:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.http.auth.AuthState.update(Lorg/apache/http/auth/AuthScheme;Lorg/apache/http/auth/Credentials;)V
    at org.kie.services.client.api.command.RemoteConfiguration$PreemptiveAuth.process(RemoteConfiguration.java:439)
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:109)
    at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:176)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:462)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
    at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182)
    at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
    at org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
    at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
    at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:443)
    at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:677)
    at org.jboss.resteasy.client.ClientRequest.post(ClientRequest.java:566)
    at org.jboss.resteasy.client.ClientRequest.post(ClientRequest.java:571)
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:330)
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:116)
    at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232)
    at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
......

Environment

  • Red Hat JBoss BPM Suite (BPMS)
    • 6.0.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content