IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Cannot find function javax.jms.ConnectionFactory.createContext()

    Posted 11/12/19 04:22 AM

    Hi Support Team
    I have a problem while connect to JBoss EAP 7

    Product webMethods Integration Server
    Version 10.1.0.0
    Updates None
    Build Number 99

    I use the 3rd library (wildfly-client-all) and copy it to “/data/SoftwareAG/IntegrationServer/lib/jars” and “/data/SoftwareAG/IntegrationServer/instances/default/packages/PACKAGE/code/jars”, restart IS, reload package.

    But I cannot use API javax.jms.ConnectionFactory.createContext() while javax.jms.ConnectionFactory.createConnection() can.
    (All the API work fine if I use Netbean IDE)

    So, why the IS dont use the API in my 3rd library? How can I fix this?

    Thank you


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Cannot find function javax.jms.ConnectionFactory.createContext()

    Posted 11/12/19 01:06 PM

    Hi,

    as IntegrationServer/lib/jars is not part of the classpath of IntegrationServer you should move the jar to IntegrationServer/instances/default/lib/jars/custom instead.

    Remember to restart IS after adding jars to lib/jars/custom.
    Package is automatically reloaded up restart.

    Reloading the package is posssible when just the jar under the packages/PACKAGE/code/jars has been changed.

    Did you check if it might be possible to just add a JNDI/JMS-Connection under Settings → Messaging configuration in IS to connect to the JBoss? If this is possible you can rely on the Built-In-Services under pub.jms-Folder in WmPublic package instead of having to bother with custom Java code.
    You can ask your JBoss partner if they can send you the neccessary common JBoss-Jars.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Cannot find function javax.jms.ConnectionFactory.createContext()

    Posted 11/13/19 05:08 AM

    Thank you for your anwser
    Now I was added the jar library to IS server but cannot work

    String provider_url = “http-remoting://” + host;
    final Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, “org.wildfly.naming.client.WildFlyInitialContextFactory”);
    env.put(Context.PROVIDER_URL, provider_url);
    env.put(Context.SECURITY_PRINCIPAL, userName);
    env.put(Context.SECURITY_CREDENTIALS, password);

        // Create the initial context
    namingContext = new InitialContext(env);
    
    javax.jms.ConnectionFactory connectionFactory 
    = (javax.jms.ConnectionFactory) namingContext.lookup("jms/RemoteConnectionFactory");
    

    =>> this line throw exeption: java.lang.reflect.InvocationTargetException:Could not initialize class org.jboss.remoting3.ConfigurationEndpointSupplier$Holder

    Could you give me some idea ?


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Cannot find function javax.jms.ConnectionFactory.createContext()

    Posted 11/13/19 05:16 AM

    This is the class that IS cannot initialize

    public final class ConfigurationEndpointSupplier
    extends Object
    implements Supplier
    {
    static class Holder
    {
    static final Endpoint CONFIGURED_ENDPOINT = (Endpoint)AccessController.doPrivileged(() → {
    endpoint = null;
    try {
    endpoint = RemotingXmlParser.parseEndpoint();
    } catch (ConfigXMLParseException|IOException e) {
    Messages.log.trace(“Failed to parse endpoint XML definition”, e);
    }
    if (endpoint == null) {
    Iterator iterator = ServiceLoader.load(EndpointConfigurator.class, ConfigurationEndpointSupplier.class.getClassLoader()).iterator();
    while (endpoint == null) { try {
    if (!iterator.hasNext())
    break; EndpointConfigurator configurator = (EndpointConfigurator)iterator.next();
    if (configurator != null) {
    endpoint = configurator.getConfiguredEndpoint();
    }
    } catch (ServiceConfigurationError e) {
    Messages.log.trace(“Failed to configure a service”, e);
    } }

          }  if (endpoint == null)
    try { endpoint = (new EndpointBuilder()).build(); }
    catch (IOException e)
    { throw new IOError(e); }
    
    return new UncloseableEndpoint(endpoint);
    });
    

    }

    IS can initialize class ConfigurationEndpointSupplier but Holder cannot.
    I don’t know why that :expressionless:


    #Integration-Server-and-ESB
    #webMethods