jboss 7.4 remote jndo to access imsconnect pool

48 views
Skip to first unread message

Javier Sanz

unread,
May 29, 2024, 8:31:25 AM5/29/24
to WildFly
Hello,

I got a jboss 7.4 configure to pool host connections, using ibm imsconnect library.
It seems to run ok if i use a local jndi connections ... i can get a connection from jca ims conect pool

But, i need to use the same pool from another jboss servers, as clients, using  remote jndi ... lets'go

I've testing multiple ways, settings providers as remote+http, http invoker,  testing with icf classes ... but no way, not working ...

1)  Trying to use invoker http   /wildfly-services ...
I got the following messages, seems that classes are not serializable, but, checking them, they are...

```
final String INITIAL_CONTEXT_FACTORY = "org.wildfly.naming.client.WildFlyInitialContextFactory";
final String PROVIDER_URL = "http://remoteimsjboss:8080/wildfly-services";
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
properties.put(Context.PROVIDER_URL, PROVIDER_URL);
ConnectionFactory imsConnectConnectionFactory = (ConnectionFactory) context.lookup("jca/ims");
 ```

And testing , shows:

```
Exception in thread "main" javax.naming.CommunicationException: Unexpected class ID 2 [Root exception is java.io.InvalidClassException: Unexpected class ID 2]
        at org.wildfly.httpclient.naming.HttpRootContext.performOperation(HttpRootContext.java:353)
        at org.wildfly.httpclient.naming.HttpRootContext.lambda$processInvocation$1(HttpRootContext.java:270)
        at org.wildfly.httpclient.namin
Caused by: an exception which occurred:
        in field com.imsconnect.jca.IMSConnectConnectionFactory.connectionManager
        in object com.imsconnect.jca.IMSConnectConnectionFactory@2c98e32d
        in object of type com.imsconnect.jca.IMSConnectConnectionFactory

```

com.imsconnect.jca.IMSConnectConnectionFactory.connectionManager  is serializable ... has serialuid field... and all inside the fields


2) Ok, trying using remote+http:

```
                final String INITIAL_CONTEXT_FACTORY = "org.wildfly.naming.client.WildFlyInitialContextFactory";
final String PROVIDER_URL = "remote+http://remoteimsjboss:8080";
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY);
properties.put(Context.PROVIDER_URL, PROVIDER_URL);
                 ConnectionFactory imsConnectConnectionFactory = (ConnectionFactory) context.lookup("jca/ims");
```

The error code say:

```
Exception in thread "main" javax.naming.CommunicationException: WFNAM00020: Remote naming operation failed [Root exception is java.io.EOFException: Read past end of file]
        at org.wildfly.naming.client.remote.RemoteClientTransport.lookup(RemoteClientTransport.java:289)
        at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)
        at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:66)
        at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
        at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
        at jndiremotetest.Main.main(Main.java:62)
Caused by: java.io.EOFException: Read past end of file
        at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:151)
        at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:294)
        at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.jav
Caused by: an exception which occurred:
        in field org.jboss.jca.core.connectionmanager.AbstractConnectionManager.cachedConnectionManager
        in object org.jboss.jca.core.connectionmanager.notx.NoTxConnectionManagerImpl@6fa34d52
        in object of type org.jboss.jca.core.connectionmanager.notx.NoTxConnectionManagerImpl
        in field com.imsconnect.jca.IMSConnectConnectionFactory.connectionManager
        in object com.imsconnect.jca.IMSConnectConnectionFactory@67b9b51a
        in object of type com.imsconnect.jca.IMSConnectConnectionFactory
```

An a error using org.jboss.jca.core.connectionmanager.AbstractConnectionManager.cachedConnectionManager  , ironjacamar ?

How can i do wrong?  any clues to fix it ?
Please, help, running in panic mode
Reply all
Reply to author
Forward
0 new messages