Coder Social home page Coder Social logo

apiman / apiman Goto Github PK

View Code? Open in Web Editor NEW
831.0 831.0 351.0 62.86 MB

Extensible and flexible API Management. Add your own functionality with simple Java plugins.

Home Page: https://www.apiman.io

License: Apache License 2.0

Java 79.55% Shell 0.30% JavaScript 0.27% CSS 0.96% HTML 7.04% TypeScript 11.05% Dockerfile 0.13% Batchfile 0.01% PLpgSQL 0.06% SCSS 0.63%
api-gateway api-management api-manager apiman java jvm

apiman's Introduction

Verify Build Workflow Apiman Cypress

Apiman (Open Source API Management)

⚡️⚡️ Apiman 4 is under active development ⚡️⚡️

Apiman is a flexible and open source API Management platform.

With just a few clicks you can get Apiman running, putting a platform at your fingertips that covers the whole API Management lifecycle. Whether you want to offer existing APIs to external consumers in a secure way, or have a centralised location to discover and govern APIs, Apiman has you covered.

But that's not all. Apiman is designed to be easy to customise, and you can implement your own functionality by writing simple Java plugins.

🗞️ Apiman Newsletter

Did you know, we have an Apiman newsletter now! We'll inform you of the latest Apiman releases as soon as they happen, along with great Apiman-related content. The latest Apiman news, blogs, tutorials, software engineering topics, and more. No spam, no nonsense.

⚡️ Quick links

🐒 Monorepo

⚠️ We may move stuff around as we settle on a finalised monorepo structure post-merge.

📖 Requirements

  • Java 11+
  • To build Apiman with tests: Docker or an equivalent container engine. This is for running tests with testcontainers.
  • Naturally, if you're using an Apiman container, you'll need it for runtime too!

🏃‍♂️ Quickstart

You can look at the Apiman quickstarts on apiman.io.

Or, you can build and run our 'server-all' quickstart to try everything out immediately.

Here's what you need to do:

echo "Cloning Apiman"
git clone https://github.com/apiman/apiman.git && cd apiman

echo "Building Apiman"
./fastbuild.sh

echo "Starting a Keycloak container with a demo Apiman realm"
cd tools/server-all/target/docker
docker compose up -d

echo "Starting Apiman WildFly Quickstart" && cd ../
./wildfly-dev-server/bin/standalone.sh

Once Apiman has started up, and if all went well, you can point your browser to the API Manager via http://localhost:8080/apimanui/ and log in (either register a new user or log in as the admin):

  • Username: admin
  • Password: admin123!

You can log into the Keycloak admin console via http://localhost:8085/admin (same credentials as above).

This quickstart seeds a bunch of content into apiman. This is not strictly necessary, but it does populate the API Manager with some data so that it doesn't feel so lonely the first time you log in.

There's also a handy echo service available at http://localhost:8080/services/echo - it's useful for demos. You're welcome!

⚠️ Please don't use Apiman's default usernames, passwords, keys, certificates, etc., in production.

⚒️ Build Apiman

Fast and easy

The easiest way to build quickly (without tests) is to run our fastbuild script. It's in the root of the project. If you have mvnd the build will be faster.

git clone https://github.com/apiman/apiman.git && cd apiman
./fastbuild.sh 

I want to run the tests

First, build the parent pom (it's in /parent), then you can build the main project from the top level.

echo "Building Apiman Parent..."
cd parent
../mvnw clean install

cd ..
echo "Building the main Apiman project..."
./mvnw clean install

👷 Contribute to Apiman

Apiman is open source, and we welcome anybody who wants to participate and contribute!

If you want to fix a bug or make any changes, please log an issue in GitHub Issues describing the bug or new feature.

You can also join our discussion forums if you want help, or to discuss a more complex issue.

There are lots of different workflows for contributing. Feel free to use one that suits you. We're endeavouring to pull together a more detailed contribution document that we'll upload soon 🙌.

🔎 Developer Portal

Apiman also comes with a skinnable developer portal which you can let external developers sign up to your APIs in a streamlined API marketplace experience.

🙋 Looking for support?

Check out Apiman's support page where you can find Apiman experts to help you.

apiman's People

Contributors

alesuffleur avatar apiman-ci avatar arunabh123 avatar aymandf avatar bastiangem avatar bekihm avatar bennetelli avatar bgaisford avatar brmeyer avatar dbayub avatar dependabot[bot] avatar ericwittmann avatar jcechace avatar jhauray avatar jorgemoralespou avatar kahboom avatar ldimaggi avatar msavy avatar objectiser avatar outofcoffee avatar pcornish avatar renovate-bot avatar renovate[bot] avatar rnc avatar ruromero avatar snyk-bot avatar tevosouza avatar veinhorn avatar volkflo avatar wtrocki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apiman's Issues

External database for Apiman (postgres)

Hi everyone,

Is there a similar procedure of setting up an external database as in the case with Keycloak? Meaning that provided a proper apiman-ds.xml file and doing some magic - you get a working Apiman instance with external db out of the box.
Right now I have this config:

apiman-ds.xml

<?xml version="1.0" encoding="UTF-8"?>
<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
    <datasource enabled="true" jndi-name="jdbc/ApiManagerDS" pool-name="ApiManagerDS" use-java-context="true">
        <connection-url>jdbc:postgresql://${env.POSTGRES_PORT_5432_TCP_ADDR}:${env.POSTGRES_PORT_5432_TCP_PORT:5432}/${env.POSTGRES_ENV_POSTGRES_DB:ApiManagerDS}</connection-url>
        <driver>postgresql</driver>
        <pool>
            <max-pool-size>30</max-pool-size>
        </pool>
        <security>
            <user-name>${env.POSTGRES_ENV_POSTGRES_USER:apiman}</user-name>
            <password>${env.POSTGRES_ENV_POSTGRES_PASSWORD:apiman}</password>
        </security>
    </datasource>
</datasources>

apiman.properties

# ---------------------------------------------------------------------
# Some hibernate settings only useful when JPA is the storage.type.
# ---------------------------------------------------------------------
apiman.hibernate.connection.datasource=jdbc/ApiManagerDS
apiman.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
apiman.hibernate.hbm2ddl.auto=update

However, I get the following error at apiman boot:

00:14:10,010 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "apiman-ds.xml")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.data-source.java:/jdbc/ApiManagerDS is missing [jboss.jdbc-driver.postgresql]"]}
00:14:10,126 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apiman-ds.xml" (runtime-name : "apiman-ds.xml")
00:14:10,127 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
       service jboss.jdbc-driver.postgresql (missing) dependents: [service jboss.data-source.java:/jdbc/ApiManagerDS] 

Any thoughts?

Suggestion: define code conventions with walkmod

Hi,

If you tell me the list of PMD, Checkstyle or Sonar rules you would like to establish in your project as code conventions, I can send you a pull request with the required walkmod configuration to apply them in the project.

Walkmod is an open source project to automatically fix those parts of code that is not following the set of code conventions of your project.

What do you think?

HTTP DEL operation is not supported

When using ApiMan 1.1.3.Final, we can't perform a HTTP DEL operation and we get as response :

Request :
curl -v -k -X DEL -H "Authorization: Bearer $TOKEN" https://127.0.0.1:8443/apiman-gateway/Newcastle/CustomerService/2.0/124

Response :

HTTP/1.1 501 Not Implemented
Method DEL is not defined in RFC 2068 and is not supported by the Servlet API

Is there a workaround ?

"Component not found: io.apiman.gateway.engine.components.IHttpClientComponent"

I am writing my own policy plugin and I am trying to use the IHttpClientComponent which the developer docs say is available. However I receive a ComponentNotFoundException when my plugin tries to retrieve it. On further inspection I can't find an implementation of the component in the repo. Is this component actually available anywhere? This is on 1.2.1.Final.

Component not found: io.apiman.gateway.engine.components.IHttpClientComponent","trace":"io.apiman.gateway.engine.beans.exceptions.ComponentNotFoundException: Component not found: io.apiman.gateway.engine.components.IHttpClientComponent\n\tat io.apiman.gateway.engine.impl.ConfigDrivenComponentRegistry.createAndRegisterComponent(ConfigDrivenComponentRegistry.java:115)\n\tat io.apiman.gateway.engine.impl.ConfigDrivenComponentRegistry.getComponent(ConfigDrivenComponentRegistry.java:71)\n\tat io.apiman.gateway.engine.policy.PolicyContextImpl.getComponent(PolicyContextImpl.java:81

Thanks
David

No options to delete or rename organisations, services, applications.

Hi There,

i was playing around apiman-ui from the wildfly container. I created a couple of test organisation and then when i understood what they are used for i wanted to model them the way they are in our organisation.
However i didn't find any documentation that explained this or found a way from the UI to achieve this.

I had to delete the database and start from scratch.

Is this functionality hidden or missing?

Regards

Andrea

Authenticate to an external Keycloak instance

Hi Eric!

I'm trying to setup an Apiman 1.2.2.Final instance in Wildfly 10 to work with an external Keycloak 1.7 instance and it is getting difficult to correctly login with the admin user into the Apiman console ([apiman_server]:[port]/apimanui). I followed the setup steps of the Production Guide.
It is throwing this validation error message in Apiman's output:

11:49:32,468 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator](default task-2) failed to turn code into token
11:49:32,469 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator](default task-2) status from server: 400
11:49:32,470 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator](default task-2) {"error_description":"Client secret not provided in request","error":"unauthorized_client"}

Keycloak's output:

12:42:39,443 WARN [org.keycloak.events](default task-11) type=CODE_TO_TOKEN_ERROR, realmId=apiman, clientId=apimanui, userId=null, ipAddress=127.0.0.1, error=
invalid_client_credentials, grant_type=authorization_code

It is apparently obvious that it is because a wrong Client Secret. So I copied the client secrets of each client (apiman, apimanui, apiman-gateway-api) from Apiman realm in Keycloak to the standalone-apiman.xml, matching each secret with its corresponding secure-deployment tag, I didn't find another config where I can set the client secret. I've also set the corresponding realm values in the realm-public-key and auth-server-url tags of the standalone-apiman.xml and disabled the internal Keycloak instance.
I did also try to authenticate with a new Keycloak 1.9 instance, but I got the same result.

Am I missing some configuration or doing something wrong?

Added part of my standalone-apiman.xml below.

Thanks a lot in advance!

  • Santiago
    <subsystem xmlns="urn:jboss:domain:keycloak:1.1">
        <realm name="apiman">
            <realm-public-key>MIGfM...........AB</realm-public-key>
            <auth-server-url>http://localhost:8180/auth</auth-server-url>
            <ssl-required>none</ssl-required>
            <enable-cors>false</enable-cors>
            <principal-attribute>preferred_username</principal-attribute>
        </realm>
        <secure-deployment name="apiman.war">
            <realm>apiman</realm>
            <resource>apiman</resource>
            <bearer-only>true</bearer-only>
            <enable-basic-auth>true</enable-basic-auth>
            <disable-trust-manager>true</disable-trust-manager>
            <credential name="secret">9475b660-0035-432c-bf03-ca736f1e7391</credential>
        </secure-deployment>
        <secure-deployment name="apimanui.war">
            <realm>apiman</realm>
            <resource>apimanui</resource>
            <public-client>true</public-client>
            <disable-trust-manager>true</disable-trust-manager>
            <credential name="secret">5a140d95-eeab-4499-8020-bbc0909de8a8</credential>
        </secure-deployment>
        <secure-deployment name="apiman-gateway-api.war">
            <realm>apiman</realm>
            <resource>apiman-gateway-api</resource>
            <bearer-only>true</bearer-only>
            <enable-basic-auth>true</enable-basic-auth>
            <disable-trust-manager>true</disable-trust-manager>
            <credential name="secret">9c32a99c-5d6a-408d-bd69-a7cff6d1092b</credential>
        </secure-deployment>
    </subsystem>

io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig["requestUnmatched"])

With the endpoint of the service created and reported here I get this error :

http -a demo:demo --verify=no GET https://localhost:8443/apiman-gateway/demo/CustomerService/2.0/123
HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Date: Thu, 09 Jul 2015 15:52:50 GMT
Server: WildFly/8
Transfer-Encoding: chunked
X-Exception: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "requestUnmatched" (Class io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig), not marked as ignorable
X-Powered-By: Undertow/1
at [Source: java.io.StringReader@635a79b4; line: 1, column: 22] (through reference chain: io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig["requestUnmatched"])

io.apiman.gateway.engine.beans.exceptions.ConfigurationParseException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "requestUnmatched" (Class io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig), not marked as ignorable
 at [Source: java.io.StringReader@635a79b4; line: 1, column: 22] (through reference chain: io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig["requestUnmatched"])
    at io.apiman.gateway.engine.policies.AbstractMappedPolicy.parseConfiguration(AbstractMappedPolicy.java:51)
    at io.apiman.gateway.engine.policy.PolicyFactoryImpl.loadConfig(PolicyFactoryImpl.java:63)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$5.handle(ServiceRequestExecutorImpl.java:362)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$5.handle(ServiceRequestExecutorImpl.java:356)
    at io.apiman.gateway.engine.policy.PolicyFactoryImpl.loadPolicy(PolicyFactoryImpl.java:81)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl.loadPolicies(ServiceRequestExecutorImpl.java:356)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl.access$1400(ServiceRequestExecutorImpl.java:76)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$3.handle(ServiceRequestExecutorImpl.java:265)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl$3.handle(ServiceRequestExecutorImpl.java:251)
    at io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:105)
    at io.apiman.gateway.engine.impl.SecureRegistryWrapper$1.handle(SecureRegistryWrapper.java:97)
    at io.apiman.gateway.engine.impl.InMemoryRegistry.getService(InMemoryRegistry.java:196)
    at io.apiman.gateway.engine.impl.SecureRegistryWrapper.getService(SecureRegistryWrapper.java:97)
    at io.apiman.gateway.engine.impl.ServiceRequestExecutorImpl.execute(ServiceRequestExecutorImpl.java:250)
    at io.apiman.gateway.platforms.servlet.GatewayServlet.doAction(GatewayServlet.java:234)
    at io.apiman.gateway.platforms.servlet.GatewayServlet.doGet(GatewayServlet.java:80)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "requestUnmatched" (Class io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig), not marked as ignorable
 at [Source: java.io.StringReader@635a79b4; line: 1, column: 22] (through reference chain: io.apiman.gateway.engine.policies.config.BasicAuthenticationConfig["requestUnmatched"])
    at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
    at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
    at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
    at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
    at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
    at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725)
    at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703)
    at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
    at org.codehaus.jackson.map.ObjectReader._bindAndClose(ObjectReader.java:768)
    at org.codehaus.jackson.map.ObjectReader.readValue(ObjectReader.java:460)
    at io.apiman.gateway.engine.policies.AbstractMappedPolicy.parseConfiguration(AbstractMappedPolicy.java:49)
    ... 43 more

Support Spring Boot microservice for gateway

It would be nice to have the gateway available on Spring Boot as an additional platform.

Our environment is based primarily on Spring Boot services and it would be nice to have the gateway integrate into our stack consistently.

Create a branch to support deployment of apiman on OSGI container (Karaf, JBoss Fuse)

The existing project is not really OSGI compliant and can'y be deployed as such within the OSGI containers as Apache Karaf, Felix or JBoss Fuse

So, we should crate a branch within the project to manage these things :

  • Convert the JAR into Bundles (-> add the Apache Felix Maven plugin to generate the OSGI METADATA)
  • Create a feature file to deploy the project on Karaf - JBoss Fuse
  • Add some pax-exam tests to "test" apiman into a OSGI container
  • Contact JBoss Logging & Resteasy project to request that they deliver their project as OSGI bundles too (https://issues.jboss.org/browse/RESTEASY-1267)
  • Fix issue with Weld - weld/core#1229

Docker images missing/out of date for 1.2.x

Following the merge of these PRs:

...the Docker images for 1.2.1 are not in Docker Hub.

$ docker run -it -p 8080:8080 -p 8443:8443 jboss/apiman-wildfly:1.2.1.Final
Unable to find image 'jboss/apiman-wildfly:1.2.1.Final' locally
Pulling repository docker.io/jboss/apiman-wildfly
Tag 1.2.1.Final not found in repository docker.io/jboss/apiman-wildfly

Are we able to push these to Docker Hub?

Current state

init scripts for wildfly 10

This may be a question for the wildfly repo, but I am trying to setup 1.2.2.Final as a service on redhat. I'm not seeing the init.d scripts under the wildfly/bin directory. Is there a reason that is no longer present? Can the init script from v9 still be used? Will apiman 1.2.2 run with wildfly 9?

Thanks
David

Cannot find module dateformat

Build is failing this morning:
[10:45:33] Error: Cannot find module 'dateformat' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\dev\apiman-github\apiman\manager\ui\hawtio\node_modules\gulp-notify\node_modules\gulp-util\index.js:5:9) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17)

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:gulp (gulp build) on project apiman-manager-ui-hawtio: Failed to run task: 'gulp build --no-color' failed. (error code 1) -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:gulp (gulp build) on project apiman-manager-ui-hawtio: Failed to run task at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214) at org.apache.maven.cli.MavenCli.main(MavenCli.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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) Caused by: org.apache.maven.plugin.MojoFailureException: Failed to run task at com.github.eirslett.maven.plugins.frontend.mojo.GulpMojo.execute(GulpMojo.java:71) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more Caused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'gulp build --no-color' failed. (error code 1) at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:38) at com.github.eirslett.maven.plugins.frontend.mojo.GulpMojo.execute(GulpMojo.java:69) ... 21 more

When using the docker image and 8443 logjam vulnerability

When attempting to access an endpoint I run into the following error

[rcook@goku ~]$ curl -k https://localhost:8443/apiman-gateway/test/etcd/1.0
curl: (35) SSL received a weak ephemeral Diffie-Hellman key in Server Key Exchange handshake message.

Insecure works as planned
[rcook@goku ~]$ curl -k http://localhost:8080/apiman-gateway/test/etcd/1.0
etcd 0.4.6

This may easily be resolved by updating the image and pushing it to repository but I do not know the underlying OS

Create a code style file for IntelliJ based on the Eclipse Code Style

Create a code style file for IntelliJ based on the Eclipse Code Style

<code_scheme name="apiman">
  <option name="RIGHT_MARGIN" value="110" />
  <codeStyleSettings language="JAVA">
    <option name="KEEP_LINE_BREAKS" value="false" />
    <option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
    <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false" />
    <option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
    <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
    <option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
    <option name="INDENT_CASE_FROM_SWITCH" value="false" />
    <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
    <option name="ALIGN_MULTILINE_RESOURCES" value="false" />
    <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" />
    <option name="SPACE_BEFORE_ARRAY_INITIALIZER_LBRACE" value="true" />
    <option name="CALL_PARAMETERS_WRAP" value="1" />
    <option name="METHOD_PARAMETERS_WRAP" value="1" />
    <option name="RESOURCE_LIST_WRAP" value="5" />
    <option name="EXTENDS_LIST_WRAP" value="1" />
    <option name="THROWS_LIST_WRAP" value="1" />
    <option name="EXTENDS_KEYWORD_WRAP" value="1" />
    <option name="THROWS_KEYWORD_WRAP" value="1" />
    <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
    <option name="BINARY_OPERATION_WRAP" value="1" />
    <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" />
    <option name="TERNARY_OPERATION_WRAP" value="5" />
    <option name="ARRAY_INITIALIZER_WRAP" value="1" />
    <option name="METHOD_ANNOTATION_WRAP" value="0" />
    <option name="CLASS_ANNOTATION_WRAP" value="0" />
    <option name="FIELD_ANNOTATION_WRAP" value="0" />
    <indentOptions>
      <option name="SMART_TABS" value="true" />
    </indentOptions>
  </codeStyleSettings>
</code_scheme>

Reuse data of the testing plans

The gateway and manager data used for their testing plans data could be reused also to test Karaf osgi container, ...

test-plan-data
test-plans
test-configs

I propose to generate a test-jar file containig them or to move them under another maven module

Can't get apiman to work

Hi guys, I tried to give it for a spin, and I found a bunch of issues.

When downloading and following the docs from apiman.io, the standalone version, fails as wildfly fails to find anypath on Could not find resource for full path: http://localhost:8080/apimanui/, I tried Could not find resource for full path: http://localhost:8080/apiman/ with no luck.

The docker image seems to have some issues with SSL redirects :(

So I tried grabbing the source code and running mvn to install and run. I got the console up :) great, time to test.

But when I tried to create an org, I get a permission error 403 non authorized. Although the previous screen seems to indicate that I'm an admin.

I'm really looking forward to try apiman, anything else I could try to get it running?

SAML 2.0 integration pingfederate.

Hi,

We are trying to integrate apiman saml 2.0 with pingfederate but while configuring the saml option of apiman the NameID Policy Format configuration in the following screen does not provide any options.

We are seeing the following error in my SAML response:

Cannot provide requested name identifier with format urn:oasis:names:tc:SAML:2.0:nameid- format:persistent

We would like to have the following available in this list

urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified

image

Does ApiMan log requests ?

We need to find out the statistics like which API was used how many times, which user (Application) used the service how many times (metering).

I see the word metering in the docs but all that I could find in the console was RateLimitingPolicy

CLI for apiman to allow scripting/control/configuration from command line

Hi @EricWittmann @msavy,

I've been working on a CLI for apiman, so you can do things like this

Create a new service:

$ ./apiman service create \
        --server http://localhost:8080/apiman \
        --name example \
        --endpoint http://example.com \
        --initialVersion 1.0 \
        --publicService \
        --orgName test

Add a gateway:

$ ./apiman gateway create \
        --server http://localhost:8080/apiman \
        --name test-gw \
        --endpoint http://localhost:1234 \
        --username apimanager \
        --password "apiman123!" \
        --type REST

You can find the project at https://github.com/outofcoffee/apiman-cli

It uses the management API documented at http://www.apiman.io/latest/api-manager-restdocs.html to perform common operations such as:

Manage Gateways:

apiman gateway test [args...]
apiman gateway show [args...]
apiman gateway create [args...]
apiman gateway list [args...]

Manage Plugins:

apiman plugin show [args...]
apiman plugin create [args...]
apiman plugin list [args...]

Manage Organisations:

apiman org show [args...]
apiman org create [args...]

Manage Services:

apiman service create [args...]
apiman service policy [add|remove] [args...]
apiman service publish [args...]

Would you be interested in adopting this as part of the main project at some point?

Pete

SOAP gateway?

At the moment if you invoke a SOAP service through Apiman gateway the original WSDL is returned, together with original port address URLs which means you can freely invoke SOAP service bypassing Apiman completely after you get the initial WSDL. Am I doing something wrong or is SOAP not completely finished yet?

Apiman 1.2.2 external Keycloak Issue

Hi,
not sure if it's actually myself doing something wrong here. Anyway,

Apiman 1.2.2-Final
KeyCloak 1.9.0-Final

I am trying to get apiman to authenticate against an external existing working keycloak with existing realms which work fine.

For the moment, for convenience, I am running Apiman and Keycloak on the same machine using
-Djboss.socket.binding.port-offset=1000 parameter when invoking Apiman standalone.

Apiman start command, where standalone-apiman,xml is in the "bin" directory:
./standalone.sh -Djboss.socket.binding.port-offset=1000 -Djboss.bind.address=10.0.2.15 -c standalone-apiman.xml

Using DNSMasq for name resolution locally.

Both Apiman and Keycloak are under https://scamps.cit.ie
Self Signed Certs.
API Man https port 9443
Keycloak https port 8443

  1. I've imported the apiman realm into the existing Keycloak server using this file:
    https://github.com/apiman/apiman/blob/master/distro/data/src/main/resources/data/apiman- realm.json

and set the redirect URL's for apimanui client.

  1. I've modified standalone-apiman.xml auth-server element to point to

https://scamps.cit.ie:8443/auth

  1. I login to Apiman using:

https://scamps.cit.ie:9443/apimanui

Issue:

After attempting to login the redirect to keycloak occurrs, however it is to:

https://scamps.cit.ie:9443/auth ... ... ..

rather than the external keycloak server

https://scamps.cit.ie:8443/auth

As a result it does not work.

Wondering if this is a known issue or if it's my own mistake.

Gateway default credentials

When creating a gateway via UI which Configuration Endpoint and Configuration Endpoint credentials should I use?

Using this

Configuration Endpoint: http://localhost:8080/apiman-gateway-api/
Username: apimanager
Password: apimanager

results in:

Authentication to the gateway failed.  Perhaps check that your credentials are correct.

Eclipse error in persistence.xml due to unexisting class

Fresh Eclipse import gives a JPA error:

Class "[Ljava.lang.String;@50841467" cannot be resolved persistence.xml /apiman-manager-api-jpa/src/main/resources/META-INF     JPA Problem

I narrowed it down to <class>io.apiman.manager.api.beans.services.EndpointPropertyValueBean</class> in persiatance.xml which does not seem to exist in the referenced package. After removing the entry the error goes away.

issue regarding breaking a contract

Hi there,

I think i have found an bug, but i'm not sure.

I'm testing the capabilities of apiman, and one feature which i'm trying to simulate is the ability to revoke an apikey.

So keeping this in mind, I've created one service based on the apiman-echo service from the tutorial and i've setup an client-app called test-app.

I've created a contract from the the service and the application which has given me an client-api with URL as follows:

http://localhost:8081/apiman-gateway/test-organisation/echo/1.3?apikey=480dac84-829c-4d24-8402-2020eec4a982

Now if i test the url, it works it returns me the correct response. BTW, i'm using the latest and grates 1.2.0. (which i got it from here)

The interesting bit happens when i go back to my test-app under the Contract section and i click on "Break Contract" button. I would have expected to see that the previous request would have thrown some sort of error but this is not the case.

I can call the URL indefinitely and it is only when i create a new contract that the URL (apikey) stops working.

N.B. I've "Re-Register" the application after i've broken the contract.

Is this the intended behaviour.

You help is extremely appreciated.

Regards

Andrea

Add a test case covering system variable to externalize endpoint host

Following our discussion about how to externalize the host defined within the Api Implementation http://${api_host}/service/echo, it could be interesting to include a test case covering that

Questions :

No auto-grant roles have been configured. Please create at least one auto-grant role.

I have launched vertx3

apiman-core/gateway/platforms/vertx3/vertx3$ java -jar target/apiman-gateway-platforms-vertx3-1.2.0-SNAPSHOT-fat.jar -conf src/conf/conf.json 

and the manager-es

apiman-servers/manager-es/mvn exec:java -Dexec.mainClass="io.apiman.servers.manager_es.Starter"

When I try to create a new organisation with the Admin user in the UI screen, I get this error

io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: No auto-grant roles have been configured.  Please create at least one auto-grant role.
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.create(OrganizationResourceImpl.java:242)
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy.create(Unknown Source)
    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:497)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:168)
    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227)
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216)
    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:541)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:523)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at io.apiman.manager.api.micro.ManagerApiMicroServiceTxWatchdogFilter.doFilter(ManagerApiMicroServiceTxWatchdogFilter.java:57)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.RootResourceFilter.doFilter(RootResourceFilter.java:59)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.AuthenticationFilter.doFilterChain(AuthenticationFilter.java:270)
    at io.apiman.common.servlet.AuthenticationFilter.doBasicAuth(AuthenticationFilter.java:238)
    at io.apiman.common.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:194)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.DisableCachingFilter.doFilter(DisableCachingFilter.java:59)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.ApimanCorsFilter.doFilter(ApimanCorsFilter.java:71)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at io.apiman.common.servlet.LocaleFilter.doFilter(LocaleFilter.java:61)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:497)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)

Metrics API for hits per resource

One interesting addition to the Metrics would be to get number of hits per resource. This would tell you which of the endpoints get hit the most. I am new to ElasticSearch but I tried to first write a query to see if I can retrieve this data (very simplified GitHub API used as producer):

{
    "size": 0,
    "aggs" : {
        "resources" : {
            "terms" : { 
                "field" : "resource"
            }
        }
    }
}

Result:



    {
        "took": 0,
        "timed_out": false,
        "_shards":
        {
            "total": 5,
            "successful": 5,
            "failed": 0
        },
        "hits":
        {
            "total": 27,
            "max_score": 0,
            "hits":
            [
            ]
        },
        "aggregations":
        {
            "resources":
            {
                "buckets":
                [
                    {
                        "key": "cen1",
                        "doc_count": 21
                    },
                    {
                        "key": "users",
                        "doc_count": 13
                    },
                    {
                        "key": "repos",
                        "doc_count": 4
                    },
                    {
                        "key": "user",
                        "doc_count": 2
                    }
                ]
            }
        }
    }

This is not really what we want because ES broke the resource field apart. What I wanted are the full endpoints: /users/cen1 and /users/cen1/repos for example. Googling around revealed that this happened because the resource field is "analyzed" and in order to solve the issue it would need to be set to "not_analyzed", but that hinders performance. Some other suggestions were multi field types and script field, the latter didn't work for me.

I'd greatly appreciate if someone with greater ES knowledge could give opinion on this matter.

http://stackoverflow.com/questions/10093638/how-to-prevent-facet-terms-from-tokenizing
http://stackoverflow.com/questions/26212808/get-complete-term-contents-with-aggregations-in-elasticsearch

Is FullTestSuite class still up to date

Is the FullTestSuite testing class still up to date as we have to change using a sys env variable the endpoint gateway to check an external Apiman Server (1.1.9, 1.2, ...) ?

mvn test -Dapiman.full-test-suite.gateway-endpoint=https://localhost:8443/apiman-gateway

NPE during bootstrap in apiman-manager-ui bower component

When adding to a project via bower install, during bootstrap I see:

Uncaught TypeError: Cannot read property 'auth' of undefined

I'm guessing it's coming from here?

apiman-manager-js

It'd be good to avoid hitting these NPEs so that the rest of the app can still bootstrap.

Cannot import data from JSON

Hi everyone.

I try to import JSON data to an empty Apiman. Apiman use Oracle Database Express Edition 11g. By the way. Are there any plans to add official support for Oracle databases in the future?
Db config:

apiman.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
apiman.hibernate.hbm2ddl.auto=update

In logs all is OK:

INFO: ----------------------------
INFO: Starting apiman data import.
INFO: Importing data from apiman version: 1.2.1.Final
INFO: Importing a user: admin
INFO: Importing a gateway: The Gateway
INFO: Importing a role: Organization Owner
INFO: Importing a role: Client App Developer
INFO: Importing a role: API Developer
INFO: Importing a policy definition: IP Whitelist Policy
INFO: Importing a policy definition: IP Blacklist Policy
INFO: Importing a policy definition: BASIC Authentication Policy
INFO: Importing a policy definition: Rate Limiting Policy
INFO: Importing a policy definition: Ignored Resources Policy
INFO: Importing a policy definition: Authorization Policy
INFO: Importing a policy definition: Quota Policy
INFO: Importing a policy definition: Caching Policy
INFO: Importing a policy definition: Transfer Quota Policy
INFO: Importing an organization: System Technologies
INFO:   Importing a role membership: admin+OrganizationOwner=>SystemTechnologies
INFO:   Importing a plan: Anti DDOS
INFO:     Importing a plan version: 1.0
INFO:       Importing a plan policy: Rate Limiting Policy
INFO:     Importing an API: Tokenizer API
INFO:     Importing an API version: 1.0
INFO:     Importing an API version: 1.01
INFO:   Importing a client: STPP Console
INFO:     Importing a client version: 1.0
INFO:   Importing an audit entry: 1
INFO:   Importing an audit entry: 3
INFO:   Importing an audit entry: 5
INFO:   Importing an audit entry: 6
INFO:   Importing an audit entry: 8
INFO:   Importing an audit entry: 10
INFO:   Importing an audit entry: 11
INFO:   Importing an audit entry: 13
INFO:   Importing an audit entry: 14
INFO:   Importing an audit entry: 15
INFO:   Importing an audit entry: 16
INFO:   Importing an audit entry: 17
INFO:   Importing an audit entry: 19
INFO:   Importing an audit entry: 20
INFO:   Importing an audit entry: 21
INFO:   Importing an audit entry: 22
INFO:   Importing an audit entry: 24
INFO:   Importing an audit entry: 25
INFO:   Importing an audit entry: 26
INFO:   Importing an audit entry: 27
INFO:   Importing an audit entry: 28
INFO:   Importing an audit entry: 29
INFO:   Importing an audit entry: 31
INFO:   Importing an audit entry: 32
INFO:   Importing an audit entry: 33
INFO:   Importing an audit entry: 34
INFO: +Importing a client contract: 37fbaf07-3ec5-43f1-acbb-ed4ec82a5394
INFO: Publishing APIs to the gateway.
INFO:  Publishing API: SystemTechnologies / TokenizerAPI -> 1.01

But I get a bunch of exceptions in stdout:

12:42:53,922 INFO  [stdout] (default task-23) java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: java.security.cert.Certific[226/1940]
on: Certificates does not conform to algorithm constraints
12:42:53,923 INFO  [stdout] (default task-23) java.lang.RuntimeException: java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: java.sec$
rity.cert.CertificateException: Certificates does not conform to algorithm constraints
12:42:53,923 INFO  [stdout] (default task-23)   at io.apiman.manager.api.exportimport.manager.StorageImportDispatcher.publishApis(StorageImportDisp$
tcher.java:501) ~[apiman-manager-api-export-import-api-1.2.1.Final.jar:?]
12:42:53,923 INFO  [stdout] (default task-23)   at io.apiman.manager.api.exportimport.manager.StorageImportDispatcher.close(StorageImportDispatcher$
java:431) ~[apiman-manager-api-export-import-api-1.2.1.Final.jar:?]
12:42:53,923 INFO  [stdout] (default task-23)   at io.apiman.manager.api.exportimport.manager.StorageImportDispatcher$Proxy$_$$_WeldClientProxy.clo$
e(Unknown Source) ~[apiman-manager-api-export-import-api-1.2.1.Final.jar:?]
12:42:53,923 INFO  [stdout] (default task-23)   at io.apiman.manager.api.exportimport.json.JsonImportReader.read(JsonImportReader.java:159) [apiman$
manager-api-export-import-api-1.2.1.Final.jar:?]
12:42:53,923 INFO  [stdout] (default task-23)   at io.apiman.manager.api.rest.impl.SystemResourceImpl$2.write(SystemResourceImpl.java:235) [apiman-$
anager-api-rest-impl-1.2.1.Final.jar:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.plugins.providers.StreamingOutputProvider.writeTo(StreamingOutputProvider.java
:32) [resteasy-jaxrs-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.plugins.providers.StreamingOutputProvider.writeTo(StreamingOutputProvider.java
:17) [resteasy-jaxrs-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.writeTo(AbstractWriterInter
ceptorContext.java:129) [resteasy-jaxrs-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterIntercept
orContext.java:62) [resteasy-jaxrs-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInter
ceptorContext.java:118) [resteasy-jaxrs-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.security.doseta.DigitalSigningInterceptor.aroundWriteTo(DigitalSigningIntercep
tor.java:143) [resteasy-crypto-3.0.11.Final.jar!/:?]
12:42:53,923 INFO  [stdout] (default task-23)   at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInte$
12:42:53,937 INFO  [stdout] (default task-23) Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Cert[66/1940]
does not conform to algorithm constraints
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:?]
12:42:53,937 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:?]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactor
y.java:290) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java
:259) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:
125) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionM
anager.java:319) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363) ~[httpclien
t-4.3.6.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219) ~[httpclient-4.3.6
.jar:4.3.6]
12:42:53,938 INFO  [stdout] (default task-23)   at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) ~[httpclient-4.3.6.ja$
12:42:53,939 INFO  [stdout] (default task-23) Caused by: java.security.cert.CertificateException: Certificates does not conform to algorithm constra
ints
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.AbstractTrustManagerWrapper.checkAlgorithmConstraints(SSLContextImpl.java:1055)
~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.AbstractTrustManagerWrapper.checkAdditionalTrust(SSLContextImpl.java:981) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:923) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:?]
12:42:53,939 INFO  [stdout] (default task-23)   at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:?]
12:42:53,944 INFO  [stdout] (default task-23)   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactor
y.java:290) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,945 INFO  [stdout] (default task-23)   at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java
:259) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,945 INFO  [stdout] (default task-23)   at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:
125) ~[httpclient-4.3.6.jar:4.3.6]
12:42:53,945 INFO  [stdout] (default task-23)   at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionM

Standalone manager can't be started using mvn -Prun

location : /home/dabou/Repos/apiman/apiman-core-forked/tools/dev-server

[dabou@localhost manager-api] $ mvn install -Prun
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building apiman-tools-dev-server-manager-api 1.2.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.glassfish:javax.el:jar:3.0.1-b06-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.glassfish:javax.el:jar:3.0.1-b07-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.glassfish:javax.el:jar:3.0.1-b08-SNAPSHOT is missing, no dependency information available
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ apiman-tools-dev-server-manager-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ apiman-tools-dev-server-manager-api ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ apiman-tools-dev-server-manager-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ apiman-tools-dev-server-manager-api ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ apiman-tools-dev-server-manager-api ---
[INFO] 
[INFO] >>> exec-maven-plugin:1.2.1:java (run) > validate @ apiman-tools-dev-server-manager-api >>>
[INFO] 
[INFO] <<< exec-maven-plugin:1.2.1:java (run) < validate @ apiman-tools-dev-server-manager-api <<<
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:java (run) @ apiman-tools-dev-server-manager-api ---
**** Starting Server (ManagerApiTestServer)
08:56:32,713  INFO Logging initialized @3592ms
DataSource created and bound to JNDI.
08:56:33,345  INFO jetty-9.2.10.v20150310
08:56:33,430  INFO WELD-ENV-001007: Initialize Weld using ServletContextListener
08:56:33,452  INFO WELD-000900: 2.3.0 (Final)
08:56:33,767  INFO WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
08:56:33,819  WARN WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
08:56:33,820  WARN WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
08:56:33,942  INFO WELD-000411: Observer method [BackedAnnotatedMethod] public org.jboss.resteasy.cdi.ResteasyCdiExtension.observeResources(@Observes ProcessAnnotatedType<T>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
08:56:34,129  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,129  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$3 because of underlying class loading error: Type org.junit.runners.model.Statement not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,132  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$1 because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,137  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$4 because of underlying class loading error: Type org.junit.runners.model.Statement not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,138  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$2 because of underlying class loading error: Type org.junit.runners.model.Statement not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,143  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$GatewayAssertionTestInfo because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,145  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$PublishPayloadTestInfo because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,146  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$TestInfo because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,148  INFO WELD-000119: Not generating any bean definitions from io.apiman.manager.test.junit.ManagerRestTester$TestPlanInfo because of underlying class loading error: Type org.junit.runners.ParentRunner not found.  If this is unexpected, enable DEBUG logging to see the full error.
08:56:34,356  INFO WELD-ENV-001201: Jetty 7.2+ detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported.
08:56:34,924  WARN FAILED o.e.j.s.ServletContextHandler@4b342442{/apiman,null,STARTING}: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:367)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)
08:56:34,961  WARN FAILED org.eclipse.jetty.server.handler.ContextHandlerCollection@652a9d04[o.e.j.s.ServletContextHandler@4b342442{/apiman,null,STARTING}, o.e.j.s.ServletContextHandler@450909a7{/mock-gateway,null,null}]: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:367)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)
08:56:34,974  INFO Started ServerConnector@41c22894{HTTP/1.1}{0.0.0.0:7070}
08:56:34,975  WARN FAILED org.eclipse.jetty.server.Server@a7e8e2a: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:367)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)
[WARNING] 
java.lang.reflect.InvocationTargetException
    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:497)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type ApiManagerConfig with qualifiers @Default
  at injection point [BackedAnnotatedField] @Inject io.apiman.manager.api.rest.impl.PluginResourceImpl.config
  at io.apiman.manager.api.rest.impl.PluginResourceImpl.config(PluginResourceImpl.java:0)
  Possible dependencies: 
  - Managed Bean [class io.apiman.manager.test.server.ManagerApiTestServerConfig] with qualifiers [@Any @Default],
  - Managed Bean [class io.apiman.tools.devsvr.manager.api.ManagerApiDevServerConfig] with qualifiers [@Any @Default]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:367)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:155)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:518)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:63)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    ... 1 more

Policies don't get updated with plugins

It appears that when a plugin is updated in the system (for example from 1.0.0-SNAPSHOT to 1.0.1-SNAPSHOT), the plugin-managed policy definition remains pointing at the implementation class of 1.0.0-SNAPSHOT. Because of this, it becomes impossible to upgrade plugin versions without changing their names or manually importing policies with different names for them. Is the idea to include the version of a particular plugin/policy directly in the name? The example plugins don't use this convention.

Cannot register client app

When I try to register client app with contract I get such error:

Error aggregating policies for contract with API Key: 913638dd-d267-433f-827b-72671fe95f0e

or

io.apiman.manager.api.core.exceptions.StorageException: Transaction already active.

io.apiman.manager.api.rest.contract.exceptions.ActionException: Error aggregating policies for contract with API Key: 913638dd-d267-433f-827b-72671fe95f0e
    at io.apiman.manager.api.rest.impl.util.ExceptionFactory.actionException(ExceptionFactory.java:308)
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.aggregateContractPolicies(ActionResourceImpl.java:490)
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.registerClient(ActionResourceImpl.java:369)
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.performAction(ActionResourceImpl.java:111)
    at io.apiman.manager.api.rest.impl.ActionResourceImpl$Proxy$_$$_WeldClientProxy.performAction(Unknown Source)
    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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
    at io.apiman.common.servlet.RootResourceFilter.doFilter(RootResourceFilter.java:59)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.manager.api.war.TransactionWatchdogFilter.doFilter(TransactionWatchdogFilter.java:57)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.DisableCachingFilter.doFilter(DisableCachingFilter.java:59)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.ApimanCorsFilter.doFilter(ApimanCorsFilter.java:71)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.LocaleFilter.doFilter(LocaleFilter.java:61)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
    at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
    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: io.apiman.manager.api.core.exceptions.StorageException: javax.persistence.RollbackException: Transaction marked as rollbackOnly
    at io.apiman.manager.api.jpa.AbstractJpaStorage.commitTx(AbstractJpaStorage.java:98)
    at io.apiman.manager.api.jpa.JpaStorage.commitTx(JpaStorage.java:132)
    at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.IStorage$816713466$Proxy$_$$_WeldClientProxy.commitTx(Unknown Source)
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.aggregateContractPolicies(ActionResourceImpl.java:485)
    ... 69 more
Caused by: javax.persistence.RollbackException: Transaction marked as rollbackOnly
    at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:74)
    at io.apiman.manager.api.jpa.AbstractJpaStorage.commitTx(AbstractJpaStorage.java:91)
    ... 77 more

or

io.apiman.manager.api.rest.contract.exceptions.SystemErrorException: io.apiman.manager.api.core.exceptions.StorageException: Transaction already active.
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.getClient(OrganizationResourceImpl.java:449)
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.listClientVersions(OrganizationResourceImpl.java:703)
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl$Proxy$_$$_WeldClientProxy.listClientVersions(Unknown Source)
    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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
    at io.apiman.common.servlet.RootResourceFilter.doFilter(RootResourceFilter.java:59)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.manager.api.war.TransactionWatchdogFilter.doFilter(TransactionWatchdogFilter.java:57)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.DisableCachingFilter.doFilter(DisableCachingFilter.java:59)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.ApimanCorsFilter.doFilter(ApimanCorsFilter.java:71)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.apiman.common.servlet.LocaleFilter.doFilter(LocaleFilter.java:61)
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
    at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:774)
    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: io.apiman.manager.api.core.exceptions.StorageException: Transaction already active.
    at io.apiman.manager.api.jpa.AbstractJpaStorage.beginTx(AbstractJpaStorage.java:75)
    at io.apiman.manager.api.jpa.JpaStorage.beginTx(JpaStorage.java:124)
    at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.IStorage$816713466$Proxy$_$$_WeldClientProxy.beginTx(Unknown Source)
    at io.apiman.manager.api.rest.impl.OrganizationResourceImpl.getClient(OrganizationResourceImpl.java:436)
    ... 68 more

ERROR [io.undertow.request] (default task-88) UT005023: Exception handling request to /apiman/actions: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException

Scenario followed :

  1. Install wildfly 8.8.1 & apiman

unzip wildfly-8.2.0.Final.zip
unzip -o apiman-distro-wildfly8-1.1.3.Final-overlay.zip -d wildfly-8.2.0.Final
cd wildfly-8.2.0.Final

  1. start wildfly
    ./bin/standalone.sh -c standalone-apiman.xml

  2. Open web console http://localhost:8080/apimanui/api-manager

  3. Create demo organization

  4. Add a service (see screenshots)

screenshot 2015-07-09 17 37 04
screenshot 2015-07-09 17 36 56
screenshot 2015-07-09 17 36 46
screenshot 2015-07-09 17 36 36

  1. When we publish, I get this error
17:30:53,740 ERROR [io.undertow.request] (default task-88) UT005023: Exception handling request to /apiman/actions: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
    at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.10.Final.jar:]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.apiman.manager.api.war.TransactionWatchdogFilter.doFilter(TransactionWatchdogFilter.java:57) [classes:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.apiman.manager.api.security.impl.DefaultSecurityContextFilter.doFilter(DefaultSecurityContextFilter.java:56) [apiman-manager-api-security-1.1.3.Final.jar:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.apiman.common.servlet.DisableCachingFilter.doFilter(DisableCachingFilter.java:59) [apiman-common-servlet-1.1.3.Final.jar:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.apiman.common.servlet.ApimanCorsFilter.doFilter(ApimanCorsFilter.java:71) [apiman-common-servlet-1.1.3.Final.jar:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.apiman.common.servlet.LocaleFilter.doFilter(LocaleFilter.java:61) [apiman-common-servlet-1.1.3.Final.jar:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.keycloak.adapters.undertow.UndertowAuthenticatedActionsHandler.handleRequest(UndertowAuthenticatedActionsHandler.java:66) [keycloak-undertow-adapter-1.2.0.CR1.jar:1.2.0.CR1]
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.keycloak.adapters.undertow.ServletPreAuthActionsHandler.handleRequest(ServletPreAuthActionsHandler.java:69) [keycloak-undertow-adapter-1.2.0.CR1.jar:1.2.0.CR1]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.NullPointerException
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.publishService(ActionResourceImpl.java:148) [apiman-manager-api-rest-impl-1.1.3.Final.jar:]
    at io.apiman.manager.api.rest.impl.ActionResourceImpl.performAction(ActionResourceImpl.java:103) [apiman-manager-api-rest-impl-1.1.3.Final.jar:]
    at io.apiman.manager.api.rest.impl.ActionResourceImpl$Proxy$_$$_WeldClientProxy.performAction(Unknown Source) [apiman-manager-api-rest-impl-1.1.3.Final.jar:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_79]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_79]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_79]
    at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_79]
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.10.Final.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.10.Final.jar:]
    ... 53 more

Spurious CI failures (tracking issue & possible solutions)


10:50:53,807  INFO Deploying javax.ws.rs.core.Application: class io.apiman.manager.test.server.TestManagerApiApplication$Proxy$_$$_WeldClientProxy
10:50:54,104  WARN FAILED o.e.j.s.ServletContextHandler@e8c75ad{/apiman,null,STARTING}: javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:57)
    at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    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:163)
    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:387)
    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.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at io.apiman.manager.test.server.ManagerApiTestServer.start(ManagerApiTestServer.java:113)
    at io.apiman.distro.db.CreateH2Database.startServer(CreateH2Database.java:61)
    at io.apiman.distro.db.CreateESDatabase.main(CreateESDatabase.java:40)
    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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:150)
    at io.apiman.manager.test.server.TestCdiFactory.provideIdmStorage(TestCdiFactory.java:132)
    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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
    at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:95)
    at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:167)
    at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
    at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
    at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
    at org.jboss.weld.proxies.IIdmStorage$874355397$Proxy$_$$_WeldClientProxy.createUser(Unknown Source)
    at io.apiman.manager.test.server.DefaultTestDataSeeder.seed(DefaultTestDataSeeder.java:44)
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:55)
    ... 25 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:150)
    at java.net.SocketInputStream.read(SocketInputStream.java:121)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.JestClient$874355404$Proxy$_$$_WeldClientProxy.execute(Unknown Source)
    at io.apiman.manager.api.es.EsStorage.createIndex(EsStorage.java:163)
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:147)
    ... 44 more
10:50:54,126  WARN FAILED org.eclipse.jetty.server.handler.ContextHandlerCollection@44ec9abd[o.e.j.s.ServletContextHandler@e8c75ad{/apiman,null,STARTING}, o.e.j.s.ServletContextHandler@342c13a5{/mock-gateway,null,null}]: javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:57)
    at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    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:163)
    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:387)
    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.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at io.apiman.manager.test.server.ManagerApiTestServer.start(ManagerApiTestServer.java:113)
    at io.apiman.distro.db.CreateH2Database.startServer(CreateH2Database.java:61)
    at io.apiman.distro.db.CreateESDatabase.main(CreateESDatabase.java:40)
    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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:150)
    at io.apiman.manager.test.server.TestCdiFactory.provideIdmStorage(TestCdiFactory.java:132)
    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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
    at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:95)
    at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:167)
    at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
    at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
    at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
    at org.jboss.weld.proxies.IIdmStorage$874355397$Proxy$_$$_WeldClientProxy.createUser(Unknown Source)
    at io.apiman.manager.test.server.DefaultTestDataSeeder.seed(DefaultTestDataSeeder.java:44)
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:55)
    ... 25 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:150)
    at java.net.SocketInputStream.read(SocketInputStream.java:121)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.JestClient$874355404$Proxy$_$$_WeldClientProxy.execute(Unknown Source)
    at io.apiman.manager.api.es.EsStorage.createIndex(EsStorage.java:163)
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:147)
    ... 44 more
10:50:54,132  INFO Started ServerConnector@54020a4e{HTTP/1.1}{0.0.0.0:7070}
10:50:54,132  WARN FAILED org.eclipse.jetty.server.Server@6def40c4: javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:57)
    at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    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:163)
    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:387)
    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.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at io.apiman.manager.test.server.ManagerApiTestServer.start(ManagerApiTestServer.java:113)
    at io.apiman.distro.db.CreateH2Database.startServer(CreateH2Database.java:61)
    at io.apiman.distro.db.CreateESDatabase.main(CreateESDatabase.java:40)
    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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:150)
    at io.apiman.manager.test.server.TestCdiFactory.provideIdmStorage(TestCdiFactory.java:132)
    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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
    at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:95)
    at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:167)
    at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
    at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
    at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
    at org.jboss.weld.proxies.IIdmStorage$874355397$Proxy$_$$_WeldClientProxy.createUser(Unknown Source)
    at io.apiman.manager.test.server.DefaultTestDataSeeder.seed(DefaultTestDataSeeder.java:44)
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:55)
    ... 25 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:150)
    at java.net.SocketInputStream.read(SocketInputStream.java:121)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.JestClient$874355404$Proxy$_$$_WeldClientProxy.execute(Unknown Source)
    at io.apiman.manager.api.es.EsStorage.createIndex(EsStorage.java:163)
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:147)
    ... 44 more
[WARNING] 
java.lang.reflect.InvocationTargetException
    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.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.distro.db.CreateH2Database.startServer(CreateH2Database.java:63)
    at io.apiman.distro.db.CreateESDatabase.main(CreateESDatabase.java:40)
    ... 6 more
Caused by: javax.servlet.ServletException: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:57)
    at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
    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:163)
    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:387)
    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.Server.doStart(Server.java:354)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at io.apiman.manager.test.server.ManagerApiTestServer.start(ManagerApiTestServer.java:113)
    at io.apiman.distro.db.CreateH2Database.startServer(CreateH2Database.java:61)
    ... 7 more
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Read timed out
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:150)
    at io.apiman.manager.test.server.TestCdiFactory.provideIdmStorage(TestCdiFactory.java:132)
    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.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
    at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:95)
    at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:167)
    at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)
    at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
    at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:101)
    at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:141)
    at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
    at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)
    at org.jboss.weld.proxies.IIdmStorage$874355397$Proxy$_$$_WeldClientProxy.createUser(Unknown Source)
    at io.apiman.manager.test.server.DefaultTestDataSeeder.seed(DefaultTestDataSeeder.java:44)
    at io.apiman.manager.test.server.DatabaseSeedFilter.init(DatabaseSeedFilter.java:55)
    ... 25 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:150)
    at java.net.SocketInputStream.read(SocketInputStream.java:121)
    at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
    at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
    at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
    at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
    at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
    at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
    at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
    at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
    at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.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.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:38)
    at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    at org.jboss.weld.proxies.JestClient$874355404$Proxy$_$$_WeldClientProxy.execute(Unknown Source)
    at io.apiman.manager.api.es.EsStorage.createIndex(EsStorage.java:163)
    at io.apiman.manager.api.es.EsStorage.initialize(EsStorage.java:147)
    ... 44 more

ElasticSearch version

Apiman uses version 1.3.2 of elasticsearch. I don't know if that was a conscious decision, or just what was available at the time, but Kibana 4 doesn't work with that version of ES index. I recompiled apiman 1.1.7.Final with Elastic Search version 1.7 and ran the tests successfully. The metrics were recorded fine as well and I was able to connect to the index using Kibana 4 and generate some reports. Is there a reason I missed as to why you are not using the latest ES version?

Cannot login

When I try to navigate to http://192.168.5.109:8080/apimanui apiman redirects to realm auth page but here I get message:

we're sorry

Logs:
13:54:23,516 WARN [org.keycloak.events] (default task-25) type=LOGIN_ERROR, realmId=apiman, clientId=apimanui, userId=null, ipAddress=10.57.31.102, error=invalid_redirect_uri, response_type=code, redirect_uri=http://192.168.5.109:8080/apimanui/, response_mode=query

Stack trace lost during service publication

In GatewayClient, the method readRegistrationException() makes certain assumptions about the stack trace string returned by the GatewayApiErrorBean. Unfortunately, in some cases, where the stack trace cannot be parsed by the parseStackTrace() method, a null value is returned and the following happens:

  1. readRegistrationException() attempts to set a null stack trace on the exception object, causing a NullPointerException to be thrown
  2. The actual stack trace is never logged and the reason for the failure is lost, making debugging difficult

Example

If the ES instance is unreachable, an io.apiman.gateway.engine.beans.exceptions.PublishingException is thrown at io.apiman.gateway.engine.es.ESRegistry.publishService(ESRegistry.java:81). This is passed to readPublishingException(), which throws an exception trying to parse the stack trace, resulting in null being returned and the behaviour above occurring.

The end result is that the original issue (actually java.net.ConnectException: Connection refused) is masked by the NullPointerException in the logs.

Suggestions

  1. Check the value returned by readPublishingException() is non-null before calling setStackTrace()
  2. If an exception is thrown by the parsing code, at least log the original stack trace string at ERROR level

[elasticsearch][apiman_gateway] error

Hi,

I am trying to start apiman on a local machine and here is what I got:

apiman_1 | 11:08:24,675 INFO  [stdout] (MSC service thread 1-2) -----------------------------
apiman_1 | 11:08:24,675 INFO  [stdout] (MSC service thread 1-2) apiman-es started!
apiman_1 | 11:08:24,675 INFO  [stdout] (MSC service thread 1-2) -----------------------------
apiman_1 | 11:08:24,679 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017534: Registered web context: /apiman-es
apiman_1 | 11:08:24,710 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apimanui.war" (runtime-name : "apimanui.war")
apiman_1 | 11:08:24,710 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 51) JBAS018559: Deployed "main-auth-server.war" (runtime-name : "main-auth-server.war")
apiman_1 | 11:08:24,711 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apiman-gateway-api.war" (runtime-name : "apiman-gateway-api.war")
apiman_1 | 11:08:24,711 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apiman-gateway.war" (runtime-name : "apiman-gateway.war")
apiman_1 | 11:08:24,711 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apiman-es.war" (runtime-name : "apiman-es.war")
apiman_1 | 11:08:24,711 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 29) JBAS018559: Deployed "apiman.war" (runtime-name : "apiman.war")
apiman_1 | 11:08:24,720 INFO  [org.elasticsearch.gateway] (elasticsearch[SuperPro][clusterService#updateTask][T#1]) [SuperPro] recovered [1] indices into cluster_state
apiman_1 | 11:08:24,750 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://0.0.0.0:9990/management
apiman_1 | 11:08:24,751 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://0.0.0.0:9990
apiman_1 | 11:08:24,751 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 11219ms - Started 722 of 815 services (158 services are lazy, passive or on-demand)
apiman_1 | 11:08:33,597 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Using multi thread/connection supporting pooling connection manager
apiman_1 | 11:08:33,608 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Using multi thread/connection supporting pooling connection manager
apiman_1 | 11:08:33,627 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Using default GSON instance
apiman_1 | 11:08:33,628 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Node Discovery disabled...
apiman_1 | 11:08:33,628 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Idle connection reaping disabled...
apiman_1 | 11:08:33,639 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Using default GSON instance
apiman_1 | 11:08:33,640 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Node Discovery disabled...
apiman_1 | 11:08:33,640 INFO  [io.searchbox.client.JestClientFactory] (PollCachingESInvalidator) Idle connection reaping disabled...
apiman_1 | 11:08:33,834 INFO  [org.elasticsearch.cluster.metadata] (elasticsearch[SuperPro][clusterService#updateTask][T#1]) [SuperPro] [apiman_gateway] creating index, cause [api], templates [], shards [5]/[1], mappings [application, service, serviceContract]
apiman_1 | 11:08:33,965 ERROR [stderr] (PollCachingESInvalidator) Exception in thread "PollCachingESInvalidator" java.lang.RuntimeException: java.lang.Exception: Failed to create index: apiman_gateway
apiman_1 | 11:08:33,965 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.initializeClient(ESClientFactory.java:200)
apiman_1 | 11:08:33,965 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.createJestClient(ESClientFactory.java:140)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.createJestClient(ESClientFactory.java:101)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.createClient(ESClientFactory.java:66)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.AbstractESComponent.getClient(AbstractESComponent.java:45)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.PollCachingESRegistry.checkCacheVersion(PollCachingESRegistry.java:195)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.PollCachingESRegistry$6.run(PollCachingESRegistry.java:168)
apiman_1 | 11:08:33,966 ERROR [stderr] (PollCachingESInvalidator)   at java.lang.Thread.run(Thread.java:745)
apiman_1 | 11:08:33,967 ERROR [stderr] (PollCachingESInvalidator) Caused by: java.lang.Exception: Failed to create index: apiman_gateway
apiman_1 | 11:08:33,967 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.createIndex(ESClientFactory.java:216)
apiman_1 | 11:08:33,967 ERROR [stderr] (PollCachingESInvalidator)   at io.apiman.gateway.engine.es.ESClientFactory.initializeClient(ESClientFactory.java:197)
apiman_1 | 11:08:33,967 ERROR [stderr] (PollCachingESInvalidator)   ... 7 more

Any ideas what's wrong?

apiman.properties

# Remote maven repositories to use when looking for plugins.  Comma separated
# list of URLs.
apiman.plugins.repositories=https://repo1.maven.org/maven2/,http://repository.jboss.org/nexus/content/groups/public/
apiman-manager.plugins.registries=http://rawgit.com/apiman/apiman-plugin-registry/master/registry.json

# Apiman Manager logging. standard, json or a FQDN implementing IApimanLogger
apiman-manager.config.logger=standard

# ---------------------------------------------------------------------
# The following are settings for using elasticsearch for various
# apiman components.
# ---------------------------------------------------------------------
apiman.es.protocol=http
apiman.es.host=localhost
apiman.es.port=19200
apiman.es.username=
apiman.es.password=
apiman.es.timeout=10000

# ---------------------------------------------------------------------
# Some hibernate settings only useful when JPA is the storage.type.
# ---------------------------------------------------------------------
apiman.hibernate.connection.datasource=java:jboss/datasources/apiman-manager
apiman.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
apiman.hibernate.hbm2ddl.auto=update

# How the API Manager UI authenticates to the API Manager REST services
apiman-manager-ui.api.authentication.type=bearerToken
apiman-manager-ui.api.authentication.token.generator=io.apiman.manager.ui.server.wildfly8.KeyCloakBearerTokenGenerator

# Security context settings.
apiman-manager.security-context.type=keycloak

# API Manager storage settings.
apiman-manager.storage.type=jpa
#apiman-manager.storage.es.protocol=${apiman.es.protocol}
#apiman-manager.storage.es.host=${apiman.es.host}
#apiman-manager.storage.es.port=${apiman.es.port}
#apiman-manager.storage.es.username=${apiman.es.username}
#apiman-manager.storage.es.password=${apiman.es.password}
#apiman-manager.storage.es.timeout=${apiman.es.timeout}
#apiman-manager.storage.es.initialize=true

# API Manager metrics settings.
apiman-manager.metrics.type=es
apiman-manager.metrics.es.protocol=${apiman.es.protocol}
apiman-manager.metrics.es.host=${apiman.es.host}
apiman-manager.metrics.es.port=${apiman.es.port}
apiman-manager.metrics.es.username=${apiman.es.username}
apiman-manager.metrics.es.password=${apiman.es.password}
apiman-manager.metrics.es.timeout=${apiman.es.timeout}

# API Manager Service Catalog
apiman-manager.service-catalog.type=io.apiman.manager.api.core.catalog.JsonServiceCatalog
apiman-manager.service-catalog.catalog-url=http://rawgit.com/apiman/apiman-service-catalog/master/catalog.json


# API Gateway components
apiman-gateway.plugin-registry=io.apiman.gateway.engine.impl.DefaultPluginRegistry
apiman-gateway.plugin-registry.pluginsDir=${jboss.server.data.dir}/apiman/plugins
apiman-gateway.plugin-registry.pluginRepositories=${apiman.plugins.repositories}
apiman-gateway.connector-factory=io.apiman.gateway.platforms.servlet.connectors.HttpConnectorFactory
apiman-gateway.policy-factory=io.apiman.gateway.engine.policy.PolicyFactoryImpl
apiman-gateway.components.IPolicyFailureFactoryComponent=io.apiman.gateway.platforms.servlet.PolicyFailureFactoryComponent
apiman-gateway.components.IBufferFactoryComponent=io.apiman.gateway.engine.impl.ByteBufferFactoryComponent

apiman-gateway.public-endpoint=https://localhost/apiman-gateway/

# ---------------------------------------------------------------------
# Connector factory options
# ---------------------------------------------------------------------
apiman-gateway.connector-factory.http.timeouts.read=30
apiman-gateway.connector-factory.http.timeouts.write=30
apiman-gateway.connector-factory.http.timeouts.connect=10

# ---------------------------------------------------------------------
# Elasticsearch Metrics Settings
# ---------------------------------------------------------------------

apiman-gateway.metrics=io.apiman.gateway.engine.es.ESMetrics
apiman-gateway.metrics.client.type=jest
apiman-gateway.metrics.client.protocol=${apiman.es.protocol}
apiman-gateway.metrics.client.host=${apiman.es.host}
apiman-gateway.metrics.client.port=${apiman.es.port}
apiman-gateway.metrics.client.initialize=true
apiman-gateway.metrics.client.username=${apiman.es.username}
apiman-gateway.metrics.client.password=${apiman.es.password}
apiman-gateway.metrics.client.timeout=${apiman.es.timeout}

# ---------------------------------------------------------------------
# SSL/TLS settings for the gateway connector(s).
# ---------------------------------------------------------------------

# Enable devMode for HTTPS connections (gateway trusts any certificate).
# This should *NOT* be used in production mode. *Use with great care.*
apiman-gateway.connector-factory.tls.devMode=false

# Trust store contains certificate(s) trusted by gateway.
#apiman-gateway.connector-factory.tls.trustStore=<PATH_TO_TRUST_STORE>
#apiman-gateway.connector-factory.tls.trustStorePassword=<PASSWORD_IF_ANY>

# Key store contains gateway's keys (including private components: keep it safe).
apiman-gateway.connector-factory.tls.keyStore=apiman_gateway.jks
apiman-gateway.connector-factory.tls.keyStorePassword=secret
apiman-gateway.connector-factory.tls.keyPassword=secret
# By default all keys can be used (will try all). If alias list provided, will only attempt to use listed keys.
apiman-gateway.connector-factory.tls.keyAliases=apiman_gateway_cert

# Allowed TLS/SSL protocols and ciphers suites as CSV. Availability will vary depending on your JVM impl.
# Uses JVM defaults depending if not explicitly provided.
# See: https://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html
# You may wish to consider global JVM settings by modifying java.security
#apiman-gateway.connector-factory.tls.allowedProtocols=TLSv1.2,TLSv1.1
#apiman-gateway.connector-factory.tls.disallowedProtocols=SSLv1,SSLv2
#apiman-gateway.connector-factory.tls.allowedCiphers=TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
#apiman-gateway.connector-factory.tls.disallowedCiphers=RC4

# Whether certificate host checks should be bypassed. *Use with great care.*
apiman-gateway.connector-factory.tls.allowAnyHost=false

# Whether self-signed certificates should be automatically trusted. *Use with great care.*
apiman-gateway.connector-factory.tls.allowSelfSigned=false

# ---------------------------------------------------------------------
# Registry Settings
# ---------------------------------------------------------------------

apiman-gateway.registry=io.apiman.gateway.engine.es.PollCachingESRegistry
apiman-gateway.registry.client.type=jest
apiman-gateway.registry.client.protocol=${apiman.es.protocol}
apiman-gateway.registry.client.host=${apiman.es.host}
apiman-gateway.registry.client.port=${apiman.es.port}
apiman-gateway.registry.client.initialize=true
apiman-gateway.registry.client.username=${apiman.es.username}
apiman-gateway.registry.client.password=${apiman.es.password}
apiman-gateway.registry.client.timeout=${apiman.es.timeout}
apiman-gateway.registry.cache-polling-interval=15

# ---------------------------------------------------------------------
# Shared State Component Settings
# ---------------------------------------------------------------------

apiman-gateway.components.ISharedStateComponent=io.apiman.gateway.engine.es.ESSharedStateComponent
apiman-gateway.components.ISharedStateComponent.client.type=jest
apiman-gateway.components.ISharedStateComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.ISharedStateComponent.client.host=${apiman.es.host}
apiman-gateway.components.ISharedStateComponent.client.port=${apiman.es.port}
apiman-gateway.components.ISharedStateComponent.client.initialize=true
apiman-gateway.components.ISharedStateComponent.client.username=${apiman.es.username}
apiman-gateway.components.ISharedStateComponent.client.password=${apiman.es.password}
apiman-gateway.components.ISharedStateComponent.client.timeout=${apiman.es.timeout}


# ---------------------------------------------------------------------
# Rate Limiter Component Settings
# ---------------------------------------------------------------------

apiman-gateway.components.IRateLimiterComponent=io.apiman.gateway.engine.es.ESRateLimiterComponent
apiman-gateway.components.IRateLimiterComponent.client.type=jest
apiman-gateway.components.IRateLimiterComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.IRateLimiterComponent.client.host=${apiman.es.host}
apiman-gateway.components.IRateLimiterComponent.client.port=${apiman.es.port}
apiman-gateway.components.IRateLimiterComponent.client.initialize=true
apiman-gateway.components.IRateLimiterComponent.client.username=${apiman.es.username}
apiman-gateway.components.IRateLimiterComponent.client.password=${apiman.es.password}
apiman-gateway.components.IRateLimiterComponent.client.timeout=${apiman.es.timeout}

# ---------------------------------------------------------------------
# Cache Store Component Settings
# ---------------------------------------------------------------------

apiman-gateway.components.ICacheStoreComponent=io.apiman.gateway.engine.es.ESCacheStoreComponent
apiman-gateway.components.ICacheStoreComponent.client.type=jest
apiman-gateway.components.ICacheStoreComponent.client.protocol=${apiman.es.protocol}
apiman-gateway.components.ICacheStoreComponent.client.host=${apiman.es.host}
apiman-gateway.components.ICacheStoreComponent.client.port=${apiman.es.port}
apiman-gateway.components.ICacheStoreComponent.client.initialize=true
apiman-gateway.components.ICacheStoreComponent.client.username=${apiman.es.username}
apiman-gateway.components.ICacheStoreComponent.client.password=${apiman.es.password}
apiman-gateway.components.ICacheStoreComponent.client.timeout=${apiman.es.timeout}

# ---------------------------------------------------------------------
# JDBC Component Settings
# ---------------------------------------------------------------------
apiman-gateway.components.IJdbcComponent=io.apiman.gateway.engine.impl.DefaultJdbcComponent

apiman ui - angularjs can't be loaded when using 'gulp'

When we start the nodejs server using gulp command and next we access the web server using the browser, then angularjs can't be loaded

├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
dabou:~/Code/redhat/apiman/apiman-core/manager/ui/hawtio$ gulp
[19:02:15] Using gulpfile ~/Code/redhat/apiman/apiman-core/manager/ui/hawtio/gulpfile.js
[19:02:15] Starting 'default'...
[19:02:15] Starting 'build'...
[19:02:15] Starting 'browserify'...
[19:02:15] Starting 'css'...
[19:02:15] Starting 'fonts'...
[19:02:16] Starting 'images'...
[19:02:16] Finished 'build' after 80 ms
[19:02:16] Starting 'watch'...
[19:02:16] Finished 'watch' after 30 ms
[19:02:16] Starting 'connect'...
[19:02:16] Finished 'connect' after 18 ms
[19:02:16] Finished 'default' after 133 ms
[19:02:16] Server started http://localhost:2772
[19:02:16] Finished 'css' after 640 ms
[19:02:24] Finished 'images' after 8.18 s
[19:02:26] Finished 'browserify' after 11 s
[19:02:26] Finished 'fonts' after 11 s
[19:02:26] Starting 'path-adjust'...
[19:02:26] Finished 'path-adjust' after 50 ms
[19:02:26] Starting 'clean-defs'...
[19:02:26] Finished 'clean-defs' after 15 ms
[19:02:26] Starting 'tsc'...
[19:02:31] Finished 'tsc' after 4.83 s
[19:02:31] Starting 'template'...
[19:02:32] Finished 'template' after 286 ms
[19:02:32] Starting 'concat'...
[19:02:32] Finished 'concat' after 9.13 ms
[19:02:32] Starting 'clean'...
[19:02:32] Finished 'clean' after 6.41 ms

screenshot 2015-11-12 19 03 34

This warning message is repeated continuously : apiman [7:11:22 PM]>> |Dash| >> Loading page.
VM510:34942 WARNING: Tried to load angular more than once.

Schema Update error on 1.1.6

ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate](default task-1) HHH000299: Could not complete schema update: java.lang.UnsupportedOperationException: The application must supply JDBC connections

I'm trying to get apiman connected to a PGSql database. I'm using the same config that worked with version 1.1.4, but something has changed. Should I be using a different jndi name now?

standalone-apiman.xml has been patched to include the following:

<datasource jndi-name="java:/jdbc/ApiManagerDS" pool-name="apiman-manager-api" enabled="true" use-java-context="true">
                    <connection-url>jdbc:postgresql://host:port/DBname</connection-url>
                    <driver>postgresql-9.4-1201.jdbc41.jar</driver>
                    <security>
                        <user-name>xxx</user-name>
                        <password>xxx</password>
                    </security>
                </datasource>

Again, this configuration worked on 1.1.4, but no longer works on 1.1.6. I also noticed that the persistence.xml no longer has the reference to this data source.

What am I doing wrong?

Can't build with tests skip

I usually like to skip tests when building Apiman to save some time but there seems to be a problem with 1.1.7. With tests enabled it builds fine.

Command: mvn clean -Dmaven.test.skip=true install -Pinstall-all-wildfly8

Error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:50 min
[INFO] Finished at: 2015-09-04T10:08:47+02:00
[INFO] Final Memory: 122M/642M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project apiman-gateway-test: Could not resolve
dependencies for project io.apiman:apiman-gateway-test:jar:1.1.7.Final: Could n
ot find artifact io.apiman:apiman-gateway-platforms-vertx3:jar:tests:1.1.7.Final
in nexus (redacted-local-nexus) -> [H
elp 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command

[ERROR] mvn -rf :apiman-gateway-test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.