Working with SpringBoot, Java 11.
In application.properties i want to configure: camel.component.rabbitmq.args
Documentation by camel using rabbitmq: https://camel.apache.org/components/3.18.x/rabbitmq-component.html#_message_body
Note: I'm not asking about rabbit, just the configuration in application.
Error i have received trying to configure by my way:
application.properties
camel.component.rabbitmq.args={arg.queue.x-message-ttl=3600000}
Error:
Failed to bind properties under 'camel.component.rabbitmq.args' to java.util.Map<java.lang.String, java.lang.Object>:
Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.Object>]
How is the correct way by example? Thanks!!!
In the application.properties, the proper syntax for a component option of type Map is componentOptionName[mapKey]=mapValue so in your case it would be:
camel.component.rabbitmq.args[queue.x-message-ttl]=3600000
Related
I am running a stack of services/applications and would like to deploy these using a single docker-compose file. I tested this and it works flawlessly. But now, when I try to make the docker-compose file more configurable by having an .env file take control of the configuration the spring boot project that has to be deployed gives me the following error:
api | Failed to bind properties under 'spring.data.mongodb.port' to java.lang.Integer:
api |
api | Property: spring.data.mongodb.port
api | Value: '27017'
api | Origin: System Environment Property "spring.data.mongodb.port"
api | Reason: failed to convert java.lang.String to java.lang.Integer (caused by java.lang.NumberFormatException: For input string: "'27017'")
The env file I am using:
SPRING_DATA_MONGODB_PORT=27017
How the back-end is receiving the configuration request in spring boot's application.properties file:
spring.data.mongodb.port=27017
The problem is clear, but how do I make sure that whenever the environment variable arrives, the '27017' in String format is casted to an Integer?
Thanks!
When I upgrade my Spring Boot API to 2.6.1 version, I am getting this error.
URL ant matcher in my API likes: /v1/token/**.
Any solution for this error:
Invalid mapping pattern detected: /**/swagger-ui/**
^
No more pattern data allowed after {*...} or ** pattern element
Action:
Fix this pattern in your application or switch to the legacy parser
implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.
I already added the spring.mvc.pathpattern.matching-strategy=ant_path_matcher to application.properties file, but it not works.
spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER add this in application.properties for me its working
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
while executing the application getting invalid "WDSDataSource" in persistance.xml , could not resolve placeholder "AppEncryptionKey"
Below is snap of persistence.xml of wds configuration.
<bean id="WDSDataSource" class="com.deere.dsfj.utility.datasource.DSFJTomcatDataSource" init-method="initialize"
p:username="${ApplicatinID}"
p:encryptionKey="${AppEncryptionKey}"
p:encryptionPassword="${AppEncryptedPassword}"
p:driverClassName="com.ibm.db2.jcc.DB2Driver"
p:url="${WDSJdbcUrl}"
p:testWhileIdle="false"
p:testOnBorrow="true"
p:testOnReturn="false"
p:validationInterval="300000"
p:timeBetweenEvictionRunsMillis="300000"
p:maxActive="80"
p:initialSize="0"
p:maxWait="300000"
p:removeAbandonedTimeout="300"
p:minEvictableIdleTimeMillis="300000"
p:minIdle="1"
p:maxIdle="10"
p:logAbandoned="true"
p:removeAbandoned="true"/>
Looks like spring is not able to find any value or the Key AppEncryptionKey in your properties file from which you are taking these values.
So ensure that the key AppEncryptionKey is present in the properties file.
I try to Configuring Spring XD to use Hadoop (horthonworks) but when I excute this line In a terminal "./xd-singlenode --hadoopDistro hadoop11" ,I get error 'hadoop11' is not a valid value for option --hadoopDistro Possible values are [cdh5, hdp22, phd21, hadoop27, phd30]
The error message is pretty clear, the Spring Xd version your are trying to use is wrong. For horthonworks configuration you should use hdp22.
Regards