Launch4J exe - WildlFlyRootContext WFNAM00026: No provider for found for URI: null

95 views
Skip to first unread message

Holger

unread,
Apr 9, 2024, 3:45:16 AM4/9/24
to WildFly
Hi again, another long shot.
This might be somewhat off topic because as far as i can tell the problem lies with launch4j, not Wildfly itself.
When i run the application client from eclipse it gets the topicconnectionfactory as ActiveMQConnectionFactory and the application works.
If i run it from the created .EXE i get:
org.wildfly.naming.client.WildFlyRootContext.getProviderContext(WildFlyRootContext.java:811)
WFNAM00026: No provider for found for URI: null

From what i can tell there have to be dependencies which do not get rolled into the shaded jar which is the basis for the .EXE but i am clueless as to which.
I'd be very grateful for pointers as to possible culprits.
I'd be happy to provide additional info, obviously.

Regards,
Holger

Eduardo Martins

unread,
Apr 9, 2024, 4:52:23 AM4/9/24
to Holger, WildFly
Long shot but perhaps there is a JNDI lookup somewhere in your client code, or in an APIs it uses, that relies on a JNDI name that is a system/env property, which is not set for the exe?

What in concrete are you trying to achieve?

—E

--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/3210e3f6-2de4-49f9-93a8-38a53a2bc2f6n%40googlegroups.com.

Holger

unread,
Apr 9, 2024, 7:16:37 AM4/9/24
to WildFly
Hi, thanks for having a look.

It's trying to contact a JMS Topic. Both instances use identical properties for the initial context, and it gets names for most things, just nothing related to JMSTopics.

The point of Failure in my source is
TopicConnectionFactory tcf = (TopicConnectionFactory) initialContext.lookup("RemoteConnectionFactory");

This lookup fails from the EXE, but not from Eclipse.
If i try to do the lookup with "java:jboss/exported/jms/RemoteConnectionFactory" the errormessage  changes from URI: NULL to URI: java.
This confuses me even more since to me this indicates it is working with the string but somehow looses (?!) it underway.

Eduardo Martins

unread,
Apr 9, 2024, 7:21:02 AM4/9/24
to Holger, WildFly
I mean, the name seems ok, my wild guess was wrong and the issue should be elsewhere.

On Tue, 9 Apr 2024 at 12:19, Eduardo Martins <emar...@redhat.com> wrote:
No that message is just about the uri scheme, in your original value it’s null since the name is just 
RemoteConnectionFactory, and it is java: after the change.

Eduardo Martins

unread,
Apr 9, 2024, 7:24:35 AM4/9/24
to Holger, WildFly
No that message is just about the uri scheme, in your original value it’s null since the name is just 
RemoteConnectionFactory, and it is java: after the change.
On Tue, 9 Apr 2024 at 12:16, Holger <holger.h...@li-its.de> wrote:

Holger

unread,
Apr 10, 2024, 4:17:53 AM4/10/24
to WildFly
I kept digging, still havent figured it out, but might  be closer.
First a correction: TopicConnectionFactory tcf = (TopicConnectionFactory) initialContext.lookup("RemoteConnectionFactory");  is wrong it has to be
TopicConnectionFactory tcf = (TopicConnectionFactory) initialContext.lookup("jms/RemoteConnectionFactory");  Else it also fails from Eclipse.

I've been debugging through the lookup from Eclipse and far as i can tell it is AbstractFederatingContext: getNativeNameParser().parse(RemoteConnectionFactory) which then returns ActiveMQJMSConnectionFactory in Eclipse, but not in the EXE.
I still have the Problem that i can't debug the EXE or add prints in there since its in the wildfly naming client jar.

Holger

unread,
Apr 16, 2024, 10:13:57 AM4/16/24
to WildFly
I am still on this and stumped.

I can see no reason why it would work from Eclipse but not from the shaded Jar / the EXE.
It seems to be limited to jms calls and in the mvn package output are the lines:
[INFO] Including org.wildfly:wildfly-naming-client:jar:2.0.1.Final in the shaded jar.
[INFO] Skipping pom dependency org.wildfly:wildfly-jms-client-bom:pom:27.0.1.Final in the shaded jar.

Since this is a pom i cant include it 'by force', but something in the classpath seems to be wrong though i am clueless as to how i would go about finding out what.
I need an adult.

If this is too far off topic please let me know

Holger

unread,
Apr 16, 2024, 10:52:59 AM4/16/24
to WildFly
Just in case somebody stumbles on this: immediately after posting that last one i found my solution: i needed to add
 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer"/>
To my maven shade plugin config area in the pom.

On Wednesday, April 10, 2024 at 10:17:53 AM UTC+2 Holger wrote:
Reply all
Reply to author
Forward
0 new messages