Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException while consuming an API in Micro Integrator #3752

Open
ajit-pendse opened this issue Oct 30, 2024 · 0 comments
Open
Labels

Comments

@ajit-pendse
Copy link

Description

New project is created with a simple Endpoint and API calling this endpoint, hosted on local Micro Integrator through Integration Studio.

While consuming API, client receives a HTTP 500 Error code with body as -

{
    "Fault": {
        "faultcode": "soapenv:Server",
        "faultstring": "Label cannot be null.",
        "detail": null
    }
}

In the server console, following stacktrace is printed -

ERROR {ServerWorker} - Error processing POST request for : /listing/create. java.lang.IllegalArgumentException: Label cannot be null.
	at io.prometheus.client.SimpleCollector.labels(SimpleCollector.java:68)
	at org.wso2.micro.integrator.observability.metric.handler.prometheus.reporter.PrometheusReporter.incrementCount(PrometheusReporter.java:204)
	at org.wso2.micro.integrator.observability.metric.handler.MetricHandler.incrementApiErrorCount(MetricHandler.java:290)
	at org.wso2.micro.integrator.observability.metric.handler.MetricHandler.handleError(MetricHandler.java:171)
	at org.apache.synapse.FaultHandler.executeExtendedSynapseHandlerOnFault(FaultHandler.java:166)
	at org.apache.synapse.FaultHandler.handleFault(FaultHandler.java:80)
	at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:107)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
	at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:401)
	at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:460)
	at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:208)
	at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

Steps to Reproduce

  1. Open Integration Studio
  2. Create a new project containing docker exporter and kubernetes exporter (apart from composite exporters and Configs projects)
  3. Create a new Endpoint pointing to any external backend
  4. Create an API calling this endpoint and exposing a route
  5. Call the exposed route of API from a client like Postman

Version

4.3.0

Environment Details (with versions)

OS - Mac OS Sequoia 15.1
Integration Studio - 8.3.0
Java/JRE -
openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.13+0, mixed mode, sharing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant