Error getting WsnNameService properties while connecting to EJB websphere - websphere

I am trying to access EJB websphere and using below dependency to have the connectivity.
<dependency>
<groupId>ibm</groupId>
<artifactId>com.ibm.ws.ejb.thinclient</artifactId>
<version>8.5.0</version>
</dependency>
<dependency>
<groupId>ibm</groupId>
<artifactId>com.ibm.ws.orb</artifactId>
<version>8.5.0</version>
</dependency>
Log Error: Exception caught: javax.naming.NamingException: Error getting WsnNameService properties [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: 0x4942f000 minor code: 3591 completed: No]
Can anyone update what configuration I am missing here. My code is able to create initial context but while looking up for JNDI path it is failing with above error.
Analysis- Checked the connectivity to the websphere server with telnet - Connectivity is working fine.
Verified the server path it is correct.
server is running at version 8.5
Anything other than this which can help me to trouble shoot this issue. I am stucked here from very long.

Related

After upgrading Spring Boot version to 2.7 Flowable engine not able create table

I have updated spring-boot-starter-parent dependency version to 2.7.1 and flowable-engine to 6.8.0
then after when I am running JUnit test cases then I am getting below error
> nested exception is org.flowable.common.engine.api.FlowableException: couldn’t create db schema: create table ACT_HI_TSK_LOG (column names .....)
..
..
..
Caused by: org.h2.jdbc.JdbcSqlNonTransmissionException: Unknown data type: "IDENTITY"; SQL Statement: create table ACT_HI_TSK_LOG (ID_ identity, TYPE_ varchar(64), TASK_ID_ varchar(64) not null, .....)
Getting same error for creating ACT_EVT_LOG table
I don't have defined or written this tables and I think this is coming from the flowable-engine dependency.
Dependencies which I have used :
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-engine</artifactId>
<version>6.8.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.1</version>
<type>pom</type>
</dependency>
Can someone help me on this please.
If I am using Spring 2.6.x version then it's working fine and all JUnit test cases are getting passed
GETTING BELOW ERROR AFTER UPGRADING THE SPRING-BOOT-STARTER-PARENT v2.7.7
H2 is on v1.4.200 And flowable-engine v6.8.0
Error creating bean with name 'processEngine': FactoryBean threw the exception on object creation; nested exception is java.lang.RuntimeException: Exception while initializing Database connection at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) .........
................
ommitted caused by: java.lang.RuntimeException: Exception while initializing Database connection at
...................
......................
org.flowable.spring/SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:76) at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:59) at
org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169) ... 65 common frames omitted Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The drive could not establish a secure connection to SQL Server by using Secure Socket Layer (SSL) exception. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:a31221-r15-erer-gdf45451 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:3680) at
com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:2047) at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:3204) at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:2833) at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:2671) at

Why RabbitMQ giving AMQP protocol version mismatch; we are version 0-9-1, server sent signature 3,1,0,0 eception?

I have integrated RabbitMQ with the spring boot application. when I try to publish a message, getting exceptions like
AMQP protocol version mismatch; we are version 0-9-1, server sent signature 3,1,0,0
and
An unexpected connection driver error occurred
here is my dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
<version>2.5.3</version>
</dependency
Here i am attaching a full stack trace.

Not able to connect multiple instance of a Spring boot JMS client application running in docker to IBM Mq instance

HI I am running a Spring boot JMS application in docker container in aws ec2 environment. My application running in two containers . While creating a connection to IBM Mq only one instance is connecting while the other is giving the connection error with code -
ERROR org.springframework.jms.listener.DefaultMessageListenerContainer
- Could not refresh JMS Connection for destination 'test.test.queue' - retrying using FixedBackOff{interval=5000, currentAttempts=1689,
maxAttempts=unlimited}. Cause: JMSWMQ0018: Failed to connect to queue
manager 'OM_QMGR' with connection mode 'Client' and host name
'test.test.ibmcloud.com(1415)'.; nested exception is
com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode
'2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').
My POM has this dependency -
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>mq-jms-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-jms</artifactId>
</dependency>
with listener methods -
#JmsListener(destination = TEST_QUEUE)
public void subscribeOmsQueue(String message)

Spring Boot application breaks after upgrade to Apache Derby 10.15 -- why?

During a round of SOUP upgrades in a Spring Boot application, I bumped Apache Derby from 10.14.1.0 to 10.15.1.3. Now the tests fail with this beauty (snipped, full stacktrace here):
Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration':
Unsatisfied dependency expressed through constructor parameter 0
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dataSource':
Invocation of init method failed
Caused by: java.lang.IllegalStateException:
Failed to replace DataSource with an embedded database for tests.
If you want an embedded database please put a supported one on the
classpath or tune the replace attribute of #AutoConfigureTestDatabase.
What is going here? Do I need to change any configuration?
Apache Derby requires Java 9 from 10.15.x on which Spring Boot does currently not support.
See also spring-boot#16433.
I just want to answer with what it took me to get Derby 15.2.0 to work with Spring Boot 2.4.4 with derby in embedded mode, on top of Java 11. Spring Boot 2.4.4 works out of the box with Derby 14, although you will get some warning as spring boot starts. Upgrading apache derby to 15.2.0 fixed that for me.
In pom, both derby and derbytools dependencies defined:
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.15.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>10.15.2.0</version>
</dependency>
Then in your apps properties file:
spring.datasource.driver-class-name=org.apache.derby.iapi.jdbc.AutoloadedDriver
Instead of:
spring.datasource.driver-class-name=org.apache.derby.jdbc.EmbeddedDriver
After that, I now get a good startup of Spring Boot with no warnings or anything that raises concerns.

Session factory issue in setting up hibernate distributed ehcache with terracotta

I am trying to setup EHCache in distributed environment with Terracotta. Here I am able to connect Application server and Terracotta server and in terracotta Developer Console I am able to see replicated objects.
But in application server continiously following exception message is appearing, though rest of the application is running properly:
Hi All, if any body can guide why this exception message appears and how we can resolve it.
Also it would be helpful for me have any comprehensive tutorial for setting up terracotta for hibernate application.
Here [CacheByAmitNode8081] is the name of cache node I have defined in application server.
[DEBUG][04/05/12 12:49:07.973][CacheByAmitNode8081] Running mbean initializer task for ehcache hibernate...
[DEBUG][04/05/12 12:49:07.995][CacheByAmitNode8081] Successfully registered bean
[ERROR][04/05/12 12:49:08.000][CacheByAmitNode8081] Error locating Hibernate Session Factory
java.lang.NullPointerException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:20)
at java.lang.reflect.Field.get(Field.java:358)
at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:152)
at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:117)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
[DEBUG][04/05/12 12:49:08.001][CacheByAmitNode8081] SessionFactory is probably still being initialized... waiting for it to complete before enabling hibernate statistics monitoring via JMX
[DEBUG][04/05/12 12:49:08.001][CacheByAmitNode8081] Running mbean initializer task for ehcache hibernate...
[ERROR][04/05/12 12:49:08.001][CacheByAmitNode8081] Error locating Hibernate Session Factory
java.lang.NullPointerException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:36)
at sun.reflect.UnsafeQualifiedObjectFieldAccessorImpl.get(UnsafeQualifiedObjectFieldAccessorImpl.java:20)
at java.lang.reflect.Field.get(Field.java:358)
at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.locateSessionFactory(ProviderMBeanRegistrationHelper.java:152)
at org.hibernate.cache.ehcache.management.impl.ProviderMBeanRegistrationHelper$RegisterMBeansTask.run(ProviderMBeanRegistrationHelper.java:117)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)*
When you using Terracotta, you need to add specific terracotta jars on your classpath that will replace ehcache implementation. In your exception stack I don't see any terracotta classes output...
In my maven dependencies I have:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core-ee</artifactId>
<version>2.5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-terracotta-ee</artifactId>
<version>2.5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.terracotta</groupId>
<artifactId>terracotta-toolkit-1.5-runtime-ee</artifactId>
<version>4.2.0</version>
<scope>compile</scope>
</dependency>
You can also check Terracotta tutorial on how to plug to Hibernate:
http://terracotta.org/documentation/enterprise-ehcache/get-started-hibernate

Resources