I have developed a small spring integration application that reads from several inbound adapters and uses outbound mail adapter to send out email if certain conditions are true. On my development machine (ubuntu 11.10 / tomcat6 / java6_23) it works like a charm and is stable for days (possibly longer).
However, when I install the application on our deployment server (debian sqeeze-sid / tomcat6 /java6_22) soon after start, I get the following exception:
Sometimes this exception comes twice, sometimes only once. Soon thereafter, the polling adapters, which should generate new message each second stop, and application is dead. Anybody recognizes the behavior? What surprises me is that the same .war file works on another, very similar system without any problems.Code:Exception in thread "task-scheduler-1" java.lang.IllegalMonitorStateException at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:155) at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1262) at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:459) at java.util.concurrent.DelayQueue.take(DelayQueue.java:205) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:688) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:681) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679)
I've even tried upgrading to tomcat7, but same behavior even there.
Here's my integration context:
Code:<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2002-2011 the original author or authors. ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <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:si="http://www.springframework.org/schema/integration" xmlns:mail="http://www.springframework.org/schema/integration/mail" xmlns:int-stream="http://www.springframework.org/schema/integration/stream" xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.1.xsd http://www.springframework.org/schema/integration/stream http://www.springframework.org/schema/integration/stream/spring-integration-stream-2.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/integration/mail http://www.springframework.org/schema/integration/mail/spring-integration-mail-2.0.xsd http://www.springframework.org/schema/integration/jdbc http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:property-placeholder location="classpath*:META-INF/spring/*.properties"/> <context:component-scan base-package="se.celink.ipcheck.integration"/> <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="${database.driverClassName}"/> <property name="url" value="${database.url}"/> <property name="username" value="${database.username}"/> <property name="password" value="${database.password}"/> <property name="testOnBorrow" value="true"/> <property name="testOnReturn" value="true"/> <property name="testWhileIdle" value="true"/> <property name="timeBetweenEvictionRunsMillis" value="1800000"/> <property name="numTestsPerEvictionRun" value="3"/> <property name="minEvictableIdleTimeMillis" value="1800000"/> <property name="validationQuery" value="SELECT 1"/> </bean> <si:channel id="input"/> <si:inbound-channel-adapter id="inboundChannel" channel="input" ref="loggingSource"> <si:poller fixed-rate="1000" max-messages-per-poll="100"/> </si:inbound-channel-adapter> <si:channel id="clensedInput"/> <si:transformer input-channel="input" output-channel="clensedInput" ref="transformations" method="cleanInput"/> <si:channel id="clensedInput"/> <si:filter ref="filters" method="accept" input-channel="clensedInput" output-channel="filteredClensedInput"/> <si:service-activator input-channel="filteredClensedInput" ref="serviceActivators" method="handleIncomingIp"> <property name="dataSource" ref="dataSource"/> </si:service-activator> <si:channel id="missingRouters"/> <int-jdbc:inbound-channel-adapter channel="missingRouters" data-source="dataSource" query="SELECT * FROM router"> <si:poller fixed-rate="1000"> <si:transactional /> </si:poller> </int-jdbc:inbound-channel-adapter> <si:channel id="mailInput" /> <si:channel id="unEnrichedOutboundMail" /> <si:channel id="outboundMail" /> <si:service-activator id="routerStatusUpdater" ref="serviceActivators" method="updateRouterStatus" input-channel="missingRouters" output-channel="mailInput"/> <si:splitter input-channel="mailInput" ref="transformations" method="splitEmails" output-channel="unEnrichedOutboundMail"/> <mail:header-enricher input-channel="unEnrichedOutboundMail" output-channel="outboundMail"> <mail:to value="vanja.banja@gmail.com" /> <mail:from value="vanja@celink.se" /> <mail:subject value="Info from ipCheck" /> </mail:header-enricher> <mail:outbound-channel-adapter channel="outboundMail" mail-sender="mailSender" /> </beans>


Reply With Quote
