I was trying to configure couchdb with spring but when i deploy the project it gives me java.net.ConnectException: Connection refused.
and the dataSource.xml defined below configs. values are read from property file.
<context:annotation-config />
<context:property-placeholder
location="classpath:properties/dataSource.properties" />
<!-- establish couch db connection -->
<couchbase:couchbase bucket="${couch.dbName}" password="" host="${couch.host}" />
<couchbase:template/>
<couchbase:repositories base-package="com.link.twitter.repository"/>
These are the dependencies I used in my POM
<!-- Spring data couchbase -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-couchbase</artifactId>
<version>${spring.data.couchbase.version}</version>
</dependency>
<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>couchbase-client</artifactId>
<version>${couchbase.client.version}</version>
</dependency>
This is the exception Im getting when its deploying.
DEBUG CouchbaseConfigConnection:84 - Reconnecting due to failure to `connect to {QA sa=/127.0.0.1:11210, #Rops=0, #Wops=0, #iq=0, topRop=null,` topWop=null, toWrite=0, interested=0}
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:677)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:436)
at com.couchbase.client.CouchbaseConnection.run(CouchbaseConnection.java:325)
how can i fix this issue. Thanks in advance
CouchDB listen for requests on port 5984 by default - your request was sent to 127.0.0.1:11210 and gots rejected.
Change the value of the config param bind_address to 11210
Couchbase and CouchDB are two different products. Your trying to use the Couchbase java client against Couchbase and that will not work. See the http://www.couchbase.com/couchbase-vs-couchdb for more information on the difference between the two products.
Related
I am facing an issue while trying to use Camel Debezium SQL server connector. I am trying to capture data changes in SQL server db table using camel Debezium SQL server connector and sink them to message broker. I know the JDBC SQL server connection has the option to make encrypt false to prevent this issue. But I can't find a similar way in Camel Debezium SQL server connector.
To use Camel Debezium SQL server connector, I was following this documentation:
https://camel.apache.org/components/3.18.x/debezium-sqlserver-component.html#_samples
When I run the app it shows me following error:
ERROR io.debezium.embedded.EmbeddedEngine - Error while trying to run connector class 'io.debezium.connector.sqlserver.SqlServerConnector'
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
My POM is as follows:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
<version>3.18.1-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-main</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-debezium-sqlserver</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>11.2.0.jre11</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-kafka</artifactId>
</dependency>
</dependencies>
I am using:
spring-boot:2.7.2
SQL Server:docker image: mcr.microsoft.com/mssql/server:2022-latest
Kafka image: confluentinc/cp-zookeeper:latest
Can anyone help me to resolve this issue?
When dealing with Debezium connectors, to register a new SQL Server connector we might normally POST a JSON configuration like the following:
curl -H "Content-Type: application/json" -XPOST http://127.0.0.1:8083/connectors --data #- << EOF
{
"name": "local-hub-connector",
"config": {
"connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
"database.hostname": "mssql-2019",
"database.port": 1433,
"database.user": "Debezium",
"database.password": "StrongPassw0rd",
"database.dbname": "DebeziumTest",
"database.server.name": "DebeziumTestServer",
"table.include.list": "dbo.tb_CDCTab1",
"database.history.kafka.bootstrap.servers": "broker:29092",
"database.history.kafka.topic": "dbhistory.DebeziumTestServer"
}
}
EOF
This works fine when the connector is using JDBC versions prior to 10.2, but JDBC Driver 10.2 for SQL Server introduced breaking changes, in particular:
BREAKING CHANGE - Default Encrypt to true
This is generally problematic because, by default, SQL Server is installed with a self-signed X.509 certificate so it doesn't appear in any trust stores.
If you're using a new connector container that has JDBC Driver 10.2 for SQL Server (or later) installed you'll need to modify the connector configuration:
Do you not need encryption? Turn it off with encrypt=false in the connection string options.
Do you need encryption? Add trustServerCertificate=true to the connection string options.
We can do this by way of pass-through configuration properties, i.e.: Debezium SQL Server connector pass-through database driver configuration properties:
The Debezium connector provides for pass-through configuration of the database driver. Pass-through database properties begin with the prefix database.*. For example, the connector passes properties such as database.foobar=false to the JDBC URL.
To turn off encryption we would POST the following JSON configuration:
curl -H "Content-Type: application/json" -XPOST http://127.0.0.1:8083/connectors --data #- << EOF
{
"name": "local-hub-connector",
"config": {
"connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
"database.hostname": "mssql-2019",
"database.port": 1433,
"database.user": "Debezium",
"database.password": "StrongPassw0rd",
"database.dbname": "DebeziumTest",
"database.server.name": "DebeziumTestServer",
"table.include.list": "dbo.tb_CDCTab1",
"database.history.kafka.bootstrap.servers": "broker:29092",
"database.history.kafka.topic": "dbhistory.DebeziumTestServer",
"database.encrypt": false
}
}
EOF
To keep encryption and trust SQL Server's self-signed certificate we would POST the following JSON configuration instead:
curl -H "Content-Type: application/json" -XPOST http://127.0.0.1:8083/connectors --data #- << EOF
{
"name": "local-hub-connector",
"config": {
"connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
"database.hostname": "mssql-2019",
"database.port": 1433,
"database.user": "Debezium",
"database.password": "StrongPassw0rd",
"database.dbname": "DebeziumTest",
"database.server.name": "DebeziumTestServer",
"table.include.list": "dbo.tb_CDCTab1",
"database.history.kafka.bootstrap.servers": "broker:29092",
"database.history.kafka.topic": "dbhistory.DebeziumTestServer",
"database.encrypt": true,
"database.trustServerCertificate": true
}
}
EOF
If you can't POST configuration changes then perhaps the camel.component.debezium-sqlserver.additional-properties can provide similar functionality.
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>9.2.1.jre11</version>
</dependency>
Finally I was able to solve the issue by downgrading the mssql-jdbc driver to the above one.
I am facing an issue, while trying to create a javax.jms.ConnectionFactory resource in TomEE server. i am using tomee.xml file to do write the resource entries.
I am able to create javax.jms.Queue and Topic but not this. Getting an error while TomEE startup, when i try to create a JMS ConnectionFactory resource.
Giving below my tomee.xml file. I referred the Apache TomEE documentation for this. As per documentation i should be able to create this resource.
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<!-- see http://tomee.apache.org/containers-and-resources.html -->
<!-- activate next line to be able to deploy applications in apps -->
<!-- <Deployments dir="apps" /> -->
<Resource id="Foo" type="javax.jms.ConnectionFactory">
ResourceAdapter = Default JMS Resource Adapter
TransactionSupport = xa
PoolMaxSize = 10
PoolMinSize = 0
ConnectionMaxWaitTime = 5 seconds
ConnectionMaxIdleTime = 15 Minutes
</Resource>
</tomee>
e, provider-id=Tomcat Security Service)
10-May-2019 11:15:36.532 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
10-May-2019 11:15:36.536 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Foo, type=Resource, provider-id=Default JMS Connection Factory)
10-May-2019 11:15:36.544 INFO [main] org.apache.openejb.util.OptionsLog.info Using 'openejb.deployments.classpath=false'
10-May-2019 11:15:36.600 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating TransactionManager(id=Default Transaction Manager)
10-May-2019 11:15:36.864 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating SecurityService(id=Tomcat Security Service)
10-May-2019 11:15:37.484 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Foo)
10-May-2019 11:15:37.520 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: No existing resource adapter defined with id 'Default JMS Resource Adapter'.
at org.apache.openejb.assembler.classic.Assembler.replaceResourceAdapterProperty(Assembler.java:2942)
at org.apache.openejb.assembler.classic.Assembler.doCreateResource(Assembler.java:3108)
at org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2966)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:586)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:487)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:247)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:168)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:108)
at org.apache.catalina.startup.Catalina.load(Catalina.java:632)
at org.apache.catalina.startup.Catalina.load(Catalina.java:655)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
10-May-2019 11:15:37.524 SEVERE [main] org.apache.tomee.catalina.ServerListener.lifecycleEvent TomEE Listener can't start OpenEJB
org.apache.openejb.OpenEJBException: No existing resource adapter defined with id 'Default JMS Resource Adapter'.
at org.apache.openejb.assembler.classic.Assembler.replaceResourceAdapterProperty(Assembler.java:2942)
at org.apache.openejb.assembler.classic.Assembler.doCreateResource(Assembler.java:3108)
at org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2966)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:586)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:487)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:247)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:168)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:395)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:108)
at org.apache.catalina.startup.Catalina.load(Catalina.java:632)
at org.apache.catalina.startup.Catalina.load(Catalina.java:655)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
10-May-2019 11:15:37.576 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Initialization processed in 8796 ms
10-May-2019 11:15:37.788 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting service [Catalina]
10-May-2019 11:15:37.788 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Starting Servlet Engine: Apache Tomcat/8.5.32
10-May-2019 11:15:37.816 INFO [localhost-startStop-1] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application directory [D:\servers_\apache-tomee-7.1.0-plus\apache-tomee-plus-7.1.0\webapps\docs]
10-May-2019 11:15:37.848 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /docs
WARNING: An illegal reflective access operation has occurred
I really appreciate any help related to this. I am stuck! Thanks in advance.
The configuration you are using (as given in your question)
ConnectionMaxWaitTime = 5 seconds
ConnectionMaxIdleTime = 15 Minutes
is invalid not clearly documented.
According to the documentation under subsection Resources/javax.jms.ConnectionFactory those two parameters should read as follows:
ConnectionMaxWaitMilliseconds = 5000
ConnectionMaxIdleMinutes = 15
Note the different property names and the values (without units). Try to adjust it in your tomee.xml and restart your setup.
EDIT
The pre-final TomEE 8 documentation suggests that your setup might be valid for newer versions. Yet, it seems that this is either "misleading", a bug in the example, or this syntax only works for TomEE releases >= 8.x (e.g., 8.0.0-M2). You might want to test/verify the previous form which I refer to in the original part of the answer and report whether this works as expected.
EDIT-2
I got it working for the following configuration in tomee.xml in TomEE 7.1.0 and TomEE-8.0.0-M2:
<Resource id="myCustomizedJmsConnectionFactory" type="javax.jms.ConnectionFactory">
connectionMaxWaitMilliseconds = 5000
connectionMaxIdleMinutes = 15
poolMaxSize = 10
poolMinSize = 0
resourceAdapter = Default JMS Resource Adapter
transactionSupport = xa
</Resource>
<Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?persistent=true
ServerUrl = tcp://localhost:61616
DataSource = MyDataSource
</Resource>
In which you would have to change MyDataSource into your local data source (name).
Sadly, the current documentation is not entirely clear about the fact that you have to specify
<Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">...
for yourself. For reference and for more (configuration) details, I'd like to point you to this post as well.
Hope it helps.
You should integrate tomee with activemq. There are two work forms: 1) with activemq embedded or 2) with independent activemq
Example:
With activemq embedded (file tomee.xml)
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<!-- see http://tomee.apache.org/containers-and-resources.html -->
<!-- activate next line to be able to deploy applications in apps -->
<!-- <Deployments dir="apps" /> -->
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig =broker:(tcp://localhost:61616)
ServerUrl = tcp://localhost:61616
</Resource>
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter
</Resource>
<Container id="MyJmsMdbContainer" ctype="MESSAGE">
ResourceAdapter = MyJmsResourceAdapter
</Container>
<Resource id="MyQueue" type="javax.jms.Queue"/>
</tomee>
with independent activemq
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<!-- see http://tomee.apache.org/containers-and-resources.html -->
<!-- activate next line to be able to deploy applications in apps -->
<!-- <Deployments dir="apps" /> -->
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
# Do not start the embedded ActiveMQ broker
BrokerXmlConfig =
ServerUrl = tcp://localhost:61616
</Resource>
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter
</Resource>
<Container id="MyJmsMdbContainer" ctype="MESSAGE">
ResourceAdapter = MyJmsResourceAdapter
</Container>
<Resource id="MyQueue" type="javax.jms.Queue"/>
</tomee>
Am using Spring Boot 1.5.4 with Spring JDBC.
Have a Spring Boot Microservice which uses Spring JDBC has the following issue when trying to conduct an HTTP PUT (after a bunch of users try conducting an HTTP PUT) which trickles to this Spring JDBC call:
2018-10-10 19:40:02 [http-nio-8081-exec-4] ERROR c.v.r.RepositoryImpl - Problem in updateData() method:
"org.springframework.dao.DataAccessResourceFailureException: PreparedStatementCallback; SQL [select a.user_id,b.user_id, from user a join user_profile b where a.user_id=b.user_id and a.date=?;]; No operations allowed after connection closed.; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:79)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
at com.mysql.jdbc.Util.getInstance(Util.java:360)
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 28,915,589 milliseconds ago. The last packet sent successfully to the server was 9 milliseconds ago.
at com.myapp.repository.RepositoryImpl.updateData(RepositoryImpl.java:74)
at com.myapp.repository.RepositoryImpl$$FastClassBySpringCGLIB$$1be9dd8e.invoke(<generated>)
... 52 common frames omitted
Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2914)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3337)
... 83 common frames omitted
pom.xml:
<artifactId>MyService</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
</parent>
<properties>
<java.version>1.7</java.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.33</version>
</dependency>
</dependencies>
Am guessing that I need to setup a JDBC connection pool...
Inside my application.properties settings, (I have two different databases - one local and one remote, its losing connection with the remote database; database2):
# Local
spring.datasource.database1.url=jdbc:mysql://localhost/database1?zeroDateTimeBehavior=convertToNull
spring.datasource.database1.username=root
spring.datasource.database1.password=ret2my
spring.datasource.database1.driverClassName=com.mysql.jdbc.Driver
# Remote
spring.datasource.database2.url=jdbc:mysql://read-replica-database-production.cranmichpmc.us-west-2.rds.amazonaws.com/database2?zeroDateTimeBehavior=convertToNull
spring.datasource.database2.username=root
spring.datasource.database2.password=ret2a$$
spring.datasource.database2.driverClassName=com.mysql.jdbc.Driver
Should I add this for the second database:
spring.datasource.database2.hikari.maximum-pool-size=10
spring.datasource.database2.hikari.connection-timeout=60000
Are there other useful params that I should consider?
spring.datasource.url=jdbc:mysql://10.168.143.140:3306/database_name
spring.datasource.username=username
spring.datasource.password=password
spring.datasource.hikari.maximum-pool-size=4
more detailed information can be found at :
https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
From my existing application, i am trying to connect to caasandra but facing some maven issues. Here is what i did:
Added in Maven:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cassandraql</artifactId>
<version>2.15.1.redhat-620133</version>
<!-- use the same version as your Camel core version -->
</dependency>
In camel:
<route="test">
<to uri="cql://127.0.0.1/empdetails?cql=select * from employee;&consistencyLevel=quorum"/>
</route>
But i am experiencing :
Exception in thread "SpringOsgiExtenderThread-9"
org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreate
1/empdetails?cql=select * from employee;&consistencyLevel=quorum] <<< in route:
Route(test)[[From[direct:route
mpdetails?consistencyLevel=quorum&cql=select+*+from+employee%3B due to:
No component found with scheme: cql "
I am i on the right track, please suggest me.
I had some problems When I use Spring boot(1.2.5) with ActiveMQ(5.11.1).
When I set below value in sping boot's application.properties
spring.activemq.broker-url=tcp://localhost:61616
It works well.
When I set another value like below:
spring.activemq.broker-url=stomp://localhost:61613
It throws :
Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost}
Or like
spring.activemq.broker-url=mqtt://localhost:1883
Also Throws
Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost}
Full exception Info:
Exception in thread "main" org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.jms.config.internalJmsListenerEndpointRegistry'; nested exception is org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost, maximumConnections=1000, wireFormat.maxFrameSize=104857600}
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:770)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:140)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
at cn.vamos.Application.main(Application.java:39)
Caused by: org.springframework.jms.UncategorizedJmsException: Uncategorized exception occured during JMS processing; nested exception is javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost, maximumConnections=1000, wireFormat.maxFrameSize=104857600}
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:316)
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
at org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:273)
at org.springframework.jms.config.JmsListenerEndpointRegistry.start(JmsListenerEndpointRegistry.java:167)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173)
... 13 more
Caused by: javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost, maximumConnections=1000, wireFormat.maxFrameSize=104857600}
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:319)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:332)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:305)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:245)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:413)
at org.springframework.jms.listener.AbstractJmsListeningContainer.establishSharedConnection(AbstractJmsListeningContainer.java:381)
at org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:285)
at org.springframework.jms.listener.SimpleMessageListenerContainer.doStart(SimpleMessageListenerContainer.java:209)
at org.springframework.jms.listener.AbstractJmsListeningContainer.start(AbstractJmsListeningContainer.java:270)
... 15 more
Caused by: java.lang.IllegalArgumentException: Invalid connect parameters: {wireFormat.host=localhost, maximumConnections=1000, wireFormat.maxFrameSize=104857600}
at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:122)
at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:64)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:317)
... 24 more
A part of ActiveMq Start Informations like below:
INFO | KahaDB is version 5
INFO | Recovering from the journal ...
INFO | Recovery replayed 480 operations from the journal in 0.066 seconds.
INFO | Apache ActiveMQ 5.11.1 (localhost, ID:LBDZ-20120706QF-18491-1437644294931-0:1) is starting
INFO | Listening for connections at: tcp://LBDZ-20120706QF:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector openwire started
INFO | Listening for connections at: amqp://LBDZ-20120706QF:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector amqp started
INFO | Listening for connections at: stomp://LBDZ-20120706QF:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector stomp started
INFO | Listening for connections at: mqtt://LBDZ-20120706QF:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector mqtt started
INFO | Listening for connections at ws://LBDZ-20120706QF:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector ws started
Pom.xml about activeMQ:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-mqtt</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-amqp</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-stomp</artifactId>
<version>${activemq.version}</version>
</dependency>
Any one can help me out? Thans a lot !
The errors you're getting sound like the ones you'd get if you tried to use STOMP for a broker-to-broker networkConnection (see section #1 in the middle of http://mail-archives.apache.org/mod_mbox/activemq-users/201502.mbox/%3C1424962402912-4692106.post#n4.nabble.com%3E); are you sure that spring.activemq.broker-url is how you're supposed to set the URL at which the broker is listening? (After all, your log shows that you're listening on a number of protocols/ports already, which doesn't seem like it's being controlled by that property.)