question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

the class loader in pulsar function recognizes jar file as an nar file?

See original GitHub issue

Describe the bug I met an exception when I run a pulsar function, it seems that the class loader in pulsar recognizes it as a nar file, but I don’t use any nar.

To Reproduce Steps to reproduce the behavior:

  1. run a pulsar function ./pulsar-admin functions localrun
    –jar /path/to/xxx.jar
    –tenant xxxtenant --namespace xxxnamespace
    –classname com.xx.functions.xxxxtransformer.XxxxTransfer2xxx
    –inputs persistent://xxxtenant/xxxnamespace/xxxtopic1,persistent://xxxtenant/xxxnamespace/xxxtopic2
    –output persistent://xxxtenant/xxxnamespace/xxxtopic-target
    –logTopic persistent://xxxtenant/xxxnamespace/xxx-topic-logs
    –name xxx-transformer I get the error.

  2. when I delete a dependency about a module which includes a dependency <dependency> <groupId>com.facebook.presto</groupId> <groupId>io.prestosql</groupId> <artifactId>presto-jdbc</artifactId> <version>${presto-jdbc.version}</version> </dependency> it works

Expected behavior don’t show the issue.

Screenshots image

Desktop (please complete the following information):

  • OS: macOS Big Sur, pulsar 2.7.0

Additional context @david-streamlio : There appears to be an issue with your NAR file. Specifically with the pulsar-common jar file. Perhaps you can try changing the scope of that dependency to provided and retry? follow david’s advice, remove denpendency , it works, but I consider that maybe the class loader recognizes wrongly the presto as a nar file?

cc @codelipenghui

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pointearthcommented, Mar 5, 2021

yea, I am in a rush this week, let me write another demo to show you in next days. @lhotari

0reactions
tisonkuncommented, Dec 11, 2022

Closed as stale. Please create a new issue if it’s still relevant to the maintained versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracted Pulsar Function jar file content in /tmp/pulsar-nar ...
[GitHub] [pulsar] lhotari opened a new issue #11340: Extracted Pulsar Function jar file content in /tmp/pulsar-nar directory gets corrupted ...
Read more >
Pulsar Function's cannot reference classes inside NAR file ...
Create the Function using the following command: ... The Pulsar Function should be created and the call to create should complete successfully.
Read more >
How to develop Pulsar connectors
This guide describes how to develop Pulsar connectors to move data between Pulsar and other systems. Pulsar connectors are special Pulsar Functions, ...
Read more >
Developing Connectors - 《Apache Pulsar v2.4 Document》
Pulsar IO connectors are specialized Pulsar Functions. ... the NAR plugin willautomatically create a DEPENDENCIES file in the generated NAR ...
Read more >
NiFi NAR Files Explained - Medium
The bundled-dependencies contains the actual jar files that will be used by the processor and accompanying controller services (if the NAR ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found