-
Notifications
You must be signed in to change notification settings - Fork 585
Weblogic Thin T3 client
Javax based Helidon 2.x works well with wlthint3client.jar, you can use it directly or with Helidon messaging JMS connector:
https://medium.com/helidon/helidon-messaging-with-weblogic-jms-7e6ecccdd82d
Since Helidon 3.x and higher is jakartified(dropping javax.* packages and fully-embracing jakarta.* packages),
no libraries using older javax based HK2 injection engine work on the same classpath.
This is the case of Weblogic wlthint3client.jar client library,
most commonly used for connecting to JMS resources hosted by Weblogic server.
Startup error when javax based wlthint3client.jar is on classpath:
Caused by: java.lang.NoSuchMethodException: The class GlobalServiceLocator has no constructor marked @Inject and no zero argument constructor
at org.jvnet.hk2.internal.Utilities.findProducerConstructor(Utilities.java:1326)
...
java.lang.IllegalStateException: Could not find an implementation of ClassAnalyzer with name default
at org.jvnet.hk2.internal.ServiceLocatorImpl.getAnalyzer(ServiceLocatorImpl.java:2468)
While with Helidon 2.x it was possible to use messaging JMS connector with wlthint3client.jar.
With Helidon 3.x and newer specialized Weblogic messaging connector is needed:
<dependency>
<groupId>io.helidon.messaging.wls-jms</groupId>
<artifactId>helidon-messaging-wls-jms</artifactId>
</dependency>Weblogic connector isolates the wlthint3client.jar in specialized classloader, keeping it from crashing Helidon's HK2.
mp:
messaging:
connector:
helidon-weblogic-jms:
# JMS factory configured in Weblogic
jms-factory: jms/TestConnectionFactory
# Path to the WLS Thin T3 client jar
thin-jar: /path/to/wlthint3client.jar
url: t3://localhost:7001
principal: jms_user
credentials: Welcome1
incoming:
from-wls:
connector: helidon-weblogic-jms
# WebLogic CDI Syntax(CDI stands for Create Destination Identifier)
destination: ./TestJMSModule!TestQueue
outgoing:
to-wls:
connector: helidon-weblogic-jms
destination: ./TestJMSModule!TestQueuewlthint3client.jar on Helidon classpath, client library location needs to be
configured and loaded by Helidon messaging connector.
--add-opens=java.base/java.io=ALL-UNNAMED to allow
wlthint3client use reflection.