You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/09/18 18:42:30 UTC

[GitHub] [pulsar] YArane opened a new issue #8089: Jersey library conflict in Pulsar Functions

YArane opened a new issue #8089:
URL: https://github.com/apache/pulsar/issues/8089


   **Describe the bug**
   Making a call to the Pulsar Admin API from a Pulsar Function throws a `java.lang.IllegalStateException: InjectionManagerFactory not found` exception.
   
   **To Reproduce**
   1. Run pulsar standalone 2.6.1
   2. Deploy a Function which creates a PulsarAdmin object and make any call using the api
   Example:
   ```java
   public class CursorManagementFunction implements Function<String, Void> {
   
       PulsarAdmin admin = PulsarAdmin.builder()
         .connectionTimeout(120, TimeUnit.SECONDS)
         .readTimeout(120, TimeUnit.SECONDS)
         .serviceHttpUrl("http://127.0.0.1:8080")
         .build()
   
       MessageId prevMessageId;
   
       @Override
       public void process(String input, Context context) {
          String topic = context.getCurrentRecord().getTopicName()
          String subName = context.getFunctionName
          admin.topics().resetCursor(topic, subName, prevMessageId);
       }
   }
   ```
   
   **Expected behavior**
   Call to PulsarAdmin is successful 
   
   **Error thrown**
   ```
   java.lang.IllegalStateException: InjectionManagerFactory not found.
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:98) ~[?:?]
   	at java.util.Optional.orElseThrow(Optional.java:290) ~[?:1.8.0_242]
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:98) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientConfig$State.initRuntime(ClientConfig.java:432) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.internal.util.collection.Values$LazyValueImpl.get(Values.java:341) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientConfig.getRuntime(ClientConfig.java:826) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.ClientRequest.getConfiguration(ClientRequest.java:285) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation.validateHttpMethodAndEntity(JerseyInvocation.java:143) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:112) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:108) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation.<init>(JerseyInvocation.java:99) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.method(JerseyInvocation.java:706) ~[?:?]
   	at org.apache.pulsar.shade.org.glassfish.jersey.client.JerseyInvocation$AsyncInvoker.get(JerseyInvocation.java:566) ~[?:?]
   	at org.apache.pulsar.client.admin.internal.BaseResource.asyncGetRequest(BaseResource.java:168) ~[org.apache.pulsar-pulsar-client-admin-original-2.6.1.jar:2.6.1]
   ```
   **Desktop (please complete the following information):**
    - OS: MacOS
    - Pulsar Standalone 2.6.1
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijie closed issue #8089: Jersey library conflict in Pulsar Functions

Posted by GitBox <gi...@apache.org>.
sijie closed issue #8089:
URL: https://github.com/apache/pulsar/issues/8089


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] sijie closed issue #8089: Jersey library conflict in Pulsar Functions

Posted by GitBox <gi...@apache.org>.
sijie closed issue #8089:
URL: https://github.com/apache/pulsar/issues/8089


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org