spring integration file splitter does not appear on the integration-graph - spring-tool-suite

I have an issue similar to this problem with items missing from the integration graph. In my case I am using Spring Tool Suite (STS) (Version: 3.9.4, Build Id: 201804120850, Platform: Eclipse Oxygen.1a (4.7.1a) with Spring Integration 4.3.15.
I am using a file splitter. It is working correctly, but does not appear on the integration graph.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int-file="http://www.springframework.org/schema/integration/file"
xmlns:int-mail="http://www.springframework.org/schema/integration/mail"
xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int-stream="http://www.springframework.org/schema/integration/stream"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-4.3.xsd
http://www.springframework.org/schema/tool classpath:org/springframework/beans/factory/xml/spring-tool-4.3.xsd
http://www.springframework.org/schema/context classpath:org/springframework/context/config/spring-context-4.3.xsd
http://www.springframework.org/schema/integration classpath:org/springframework/integration/config/spring-integration-4.3.xsd
http://www.springframework.org/schema/integration/stream classpath:org/springframework/integration/stream/config/spring-integration-stream-4.3.xsd
http://www.springframework.org/schema/integration/file classpath:org/springframework/integration/file/config/spring-integration-file-4.3.xsd
http://www.springframework.org/schema/integration/xml classpath:org/springframework/integration/xml/config/spring-integration-xml-4.3.xsd
http://www.springframework.org/schema/integration/mail classpath:org/springframework/integration/mail/config/spring-integration-mail-4.3.xsd">
<int-file:splitter id="15bfileSplitter"
input-channel="PVDR15bChannel"
output-channel="PVDR15bLineChannel" />

This is a bug. Feel free to raise it here: https://github.com/spring-projects/spring-ide/issues

Related

Multiple annotations found in spring 4.0

I am getting following error in my springconf.xml file
Multiple annotations found at this line:
- Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd). For
more information, right click on the message in the Problems View and select "Show Details..."
- Referenced file contains errors (http://www.springframework.org/schema/context/spring-context-4.0.xsd).
For more information, right click on the message in the Problems View and select "Show Details..."
- Referenced file contains errors (http://www.springframework.org/schema/tool/spring-tool-4.0.xsd). For
more information, right click on the message in the Problems View and select "Show Details..."
My SpringConf.xml file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<mongo:mongo host="com.rg.test" port="10075" />
<mongo:db-factory dbname="young-sierra" />
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
</bean>
If I remove
<mongo:mongo host="com.rg.test" port="10075" />
<mongo:db-factory dbname="young-sierra" />
It works fine.
My all jar files in lib folder have following details. I am not sure if I am using correct version of mongo jars. Please help me if any body have idea
commons-logging-1.1.1.jar
jstl-1.2.jar
mongo-java-driver-3.0.2.jar
spring-aop-4.0.0.RELEASE.jar
spring-aspects-4.0.0.RELEASE.jar
spring-beans-4.0.0.RELEASE.jar
spring-context-4.0.0.RELEASE.jar
spring-core-4.0.0.RELEASE.jar
spring-data-commons-core-1.0.0.RELEASE(1).jar
spring-data-mongodb-1.0.0.RELEASE.jar
spring-expression-4.0.0.RELEASE.jar
spring-framework-bom-4.0.0.RELEASE.jar
spring-web-4.0.0.RELEASE.jar
spring-webmvc-4.0.0.RELEASE.jar
Check the version of spring that the mongodb xsi:schemaLocation is referring to.
**config file 1 schema defination**
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
If the other configuration xmls specify a different spring version then you will have to update this one. Make sure that all the beans use the same schema spring version across your project. For example one bean cant have the following
**config file 2 Schema defination**
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
living alongside with the defination 1. They both need to have the same schema properties. Hope this is clear.

Spring Integration graph of Spring Tool Suite not showing "int-file:tail-inbound-channel-adapter" graphic

I'm currently using Spring Tool Suite (STS) (Version: 3.6.3.CI-B2266066, Build Id: 201411050946, Platform: Eclipse Luna SR1 (4.4.1)) with Spring Integration 4.1.0.
I have a Spring configuration XML file that includes the "integration" and "integration/file" namespaces. I've added a "int-file:tail-inbound-channel-adapter" to the config file. When I go into the integration-graph tab however I'm not seeing the icon/graphic for that component.
Sample config file:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-jms="http://www.springframework.org/schema/integration/jms"
xmlns:int-file="http://www.springframework.org/schema/integration/file"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">
<int-file:tail-inbound-channel-adapter id="apache"
channel="exchangeSpringQueueChannel"
task-executor="exchangeFileReplayTaskExecutor"
file="C:\p2-test.txt"
delay="1"
end="false"
reopen="true"
file-delay="10000" />
<int-jms:message-driven-channel-adapter id="exchangeQueueChannelAdapter"
auto-startup="false"
destination="exchangeQueueJmsDestination"
channel="exchangeSpringQueueChannel"
receive-timeout="1000"
connection-factory="exchangeQueueWMQCachedConnectionFactory"
acknowledge="transacted"
transaction-manager="exchangeQueueWMQTxManager"
error-channel="errorChannel"
recovery-interval="20000"
task-executor="exchangeQueueReader" />
<int:channel id="exchangeSpringQueueChannel" />
<task:executor id="exchangeQueueReader" pool-size="1" />
<task:executor id="exchangeFileReplayTaskExecutor" pool-size="1" />
</beans>
Thanks for reporting this; I have created a JIRA issue against STS for this.

Alfresco activiti workflow deploy

I have a bit of a problem.
I have created a workflow with the Activiti plugin in Eclipse.
I have a model, context file and the bpmn20.xml file.
Everything is deployed in shared/alfresco/extension but:
If I deploy the workflow deleting the entire following tag in the bpmn20.xml file
<bpmndi:BPMNDiagram id="BPMNDiagram_activitiCustomWorkflow">
(so basically without the workflow diagram), everything works fine but I can't see the workflow diagram in the Workflow details page in Alfresco Share .
If I leave that tag (so what Eclipse created in the beginning with the Activiti project),
Alfresco is not starting. (Connection rejected in browser)
Log is not telling me nothing, and Tomcat cannot be stopped normally (I have to delete the catalina.pid and the tomcat temp folder manually).
My bpmn20.xml file header is:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://activiti.org/bpmn20">
Am I missing something? Or maybe Eclipse doesn't create the correct bpmn file?
Ah, Alfresco 4.0.d and Ubuntu server 10.04 LTS x64
I am using Activiti engine, and the jBPM engine is turned off.
Thanks in advance.
You might need to turn up the logging in webapps/alfresco/WEB-INF/classes/log4j.properties.
log4j.logger.org.alfresco.repo.workflow=debug
I've also got that set in webapps/share/WEB-INF/classes/log4j.properties
my Eclipse (activity designer) generates header like this
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="Onlio">
<process id="OnlioWFAdhocMultiNonEsc" name="WF name/description" isExecutable="true">
But I've had also a problem with that, so I'm using this (and this works for me :) ), so you can try it ..
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:activiti="http://activiti.org/bpmn"
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
typeLanguage="http://www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://alfresco.org">
<process id="WFID" name="WF name/description" isExecutable="true">
(there's different in targetNameSpace only)
So, good luck :)
Btw for deploy you will need a context file or workflow console :) (there should be also way how to deploy through data dictionary- I'm not sure how :) )
OT btw2 - for logging I'm setting these 2 params:
(in ..\tomcat\webapps\alfresco\WEB-INF\classes\log4j.properties)
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

Namespace error with spring data neo4j

i´m currently trying to set up a test project with GWT, Maven, Neo4j and Spring Data.
I ran into a problem when I try to start the project in development mode in eclipse
I alway get the error
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/data/neo4j]
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:neo4j="http://www.springframework.org/schema/data/neo4j"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/neo4j
http://www.springframework.org/schema/data/neo4j/spring-neo4j-2.0.xsd">
This is the part of the application-context.xml which gives the error.
In pom.xml I use
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>2.1.0.BUILD-SNAPSHOT</version>
</dependency>
But I also had the problem with the 2.0.0.Release version.
I found the same error here http://neo4j.org/nabble/#nabble-td3428668
but no answer is provided or if there is a fix.
Does someone have an idea where the problem is?
What is your setup? I guess there is a classloader problem in that the neo4j namespace XML is sitting in another bundle and not accessible to the requesting bundles classloader. Could you put all the SDN jars into one big superbundle to get around this_

adding a new namespace declaration to a spring config using Spring IDE

I have a Spring configuration file spring-idol.xml with the following namespace declaration:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
....
</beans>
I want to add the namespace declaration for AOP
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
...
</beans>
Is there a way to do it using Spring IDE? Right now, the only way I can think of is by making a new spring configuration file with the aop namespace declaration and then copy and pasting the declaration from there to the configuration file where my beans are.
Open with -> Spring Config Editor provides you with a tabbed view. One of the tabs is the namespaces tab, where you can add additional namespaces. There you can choose versioned or non-versioned schema files for aop, context, util, batch etc
btw. if you want to add non-spring namespaces (e.g. for apache cxf) use Open with -> XML Editor and do edit namespaces on the root element