Spring Cloud Contract Producer Flow: FileNotFoundException is thrown when running generated ContractsTest - spring-boot

The ContractsTest and corresponding yml file is beeing generated correctly in the same folder. I'am getting a FileNotFoundException when running the test though.
testClass.getClass().getResource(relativePath) in fileToBytes Method is returning null value.
stacktrace:
java.lang.IllegalStateException: java.io.FileNotFoundException: test_status_tracking_update.yml
at org.springframework.cloud.contract.verifier.util.ContractVerifierUtil.fileToBytes(ContractVerifierUtil.java:83)
at org.springframework.cloud.contract.verifier.util.ContractVerifierUtil.contract(ContractVerifierUtil.java:136)
at de.test.bla.test.cdc.base.ContractsTest.validate_test_status_tracking_update(ContractsTest.java:26)

Related

Getting an error while pushing message to IBM -MQ from apache camel spring application

I am getting below error while pushing a message from apache camel component to IBM-MQ.
Error:-
Caused by: com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCC0050: The property name 'JMS_Solace_DeadMsgQueueEligible' is reserved and cannot be set.
Below are my pom jars i am using -
<camel-spring-boot-starter.version>2.21.0</camel-spring-boot-starter.version>
<camel-spring.version>2.21.0</camel-spring.version>
<camel-jms.version>2.21.0</camel-jms.version>
I am running the application using spring boot container.
Try to remove that header, something a like:
from solace
removeHeaders("JMS_Solace*")
to ibmmq

"Connection cannot be null when hibernate.dialect is not set" and sessionFactory error

I want to import in eclipse and connect with PostgreSQL database. PostgreSQL is configured on another machine.
I have imported the war file in eclipse and changed 3 file with IP address of the machine where PostgreSQL is installed. Three files were hibernate.cnf.xml, spring-database.xml, na-dispatcher.xml. Like
jdbc:postgresql://192.168.1.15:5432/mydatabase.
After that I tried running the application in tomcat server with eclipse IDE.
I got error like
./web-inf/sping-security.xml
1
Connection cannot be null when 'hibernate.dialect' not set
Also an error regarding session factory and all.
I can't paste the code because we can't use internet in office. Please help me in resolving this. Tomorrow is the deadline. no code
2
Error creating bean with name ‘sessionFactory’ defined in ServletContext resource [/WEB-INF/spring-servlet.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set

Extract failed java.lang.IllegalArgumentException: Invalid container object in Jmeter

I added all the jar in lib and lib/ext, but still getting error in Jmeter tool
My Config is Jmeter 2.9 and java 7.
error is
com.atlantbh.jmeter.plugins.jsonutils.jsonpathextractor.JSONPathExtractor: Extract failed java.lang.IllegalArgumentException: Invalid container object

Setting JAVA_OPTS in open shift is not working

I am trying to set java options for my spring application in open shift and its not working. I tried exporting JAVA_OPTIONS and _JAVA_OPTIONS in my app and still I see a file not found exception in my spring initialization exception.
I am trying to load a properties file in spring which is picked based on the environment variable
stack trace:
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/config_${targetEnv}.properties]
any help is appreciated.
You should be using the JAVA_OPTS_EXT environment variable to set any extra JAVA_OPTS that you would like your application to use.

Weblogic deployment error

I have deployed ear files in oracle weblogic server and i also configured datasource for that project. When i try to test it it is giving me this error.
"Message icon - Error weblogic.application.ModuleException: :org.springframework.beans.factory.BeanDefinitionStoreException:Invalid bean definition with name 'userContext' defined in class path resource [voyager-seats-usercontext.xml]: Could not resolve placeholder 'IDM.USERNAME'
Message icon - Warning Errors were encountered while performing this operation."
I restarted and reconfigured this app still it is giving error.

Resources