I moved my KC 1508.3 application to a new server.
All I did was upgrade one of our testing systems to the 1508.3 version and point it to my 1508.3 database which I had previously been testing.
However now when I start that application I am getting this bitronix error that there is an OverlappingFileLockException.
Shared filelock table ?
Does anyone know how to clear this ?
My old instance isn’t running anymore so don’t understand this error.
This also makes me wonder can more than one copy of KC run against the same database for load balancing ?
Ron
===========
2015-08-29 17:28:00,087 [localhost-startStop-1] u:/d: INFO org.kuali.rice.ksb.m
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerBitronix' defined in class path resource [org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static bitronix.tm.BitronixTransactionManager bitronix.tm.TransactionManagerServices.getTransactionManager()] threw exception; nested exception is bitronix.tm.utils.InitializationException: initialization failed, cannot safely start the transaction manager
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:603)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:953)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 60 more
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static bitronix.tm.BitronixTransactionManager bitronix.tm.TransactionManagerServices.getTransactionManager()] threw exception; nested exception is bitronix.tm.utils.InitializationException: initialization failed, cannot safely start the transaction manager
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:181)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:592)
... 69 more
Caused by: bitronix.tm.utils.InitializationException: initialization failed, cannot safely start the transaction manager
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:102)
at bitronix.tm.TransactionManagerServices.getTransactionManager(TransactionManagerServices.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160)
... 70 more
Caused by: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1075)
at bitronix.tm.journal.TransactionLogAppender.<init>(TransactionLogAppender.java:71)
at bitronix.tm.journal.DiskJournal.open(DiskJournal.java:157)
at bitronix.tm.BitronixTransactionManager.<init>(BitronixTransactionManager.java:85)
... 76 more
I figured out what is causing this issue but I have not yet found a solution.
We have two instances of KC on this machine. One is the test drive out of the box version and the other is our locally modified version.
It seems they can’t both run at the same time. The Bitronix Transaction Manager creates a lock file so you can’t have the Transaction Manager running twice on once machine. I am hoping there is some way to configure the location of this file so I can alter the location for one of my instances. I would think it should be ok to have two transaction managers when they are for completely different instances pointing to different database schemas.
Ron
To unsubscribe from this group and stop receiving emails from it, send an email to kc.tech+u...@kuali.org.
To unsubscribe from this group and stop receiving emails from it, send an email to kc.technical.co...@kuali.org.
Don’t see those set anywhere. Maybe that is the problem, perhaps they are defaulting to something.
KC
[Java8-ronald@infss14-08 kc (uh-modifications)]$ git grep bitronix.tm
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices" lazy-init="true">
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="transactionManagerBitronix" class="bitronix.tm.TransactionManagerServices"
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="dataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="riceDataSourceBitronixXa" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
coeus-impl/src/main/resources/org/kuali/coeus/sys/impl/DataSourceSpringBeans.xml: <bean id="dataSourceBitronixXa" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
coeus-webapp/src/main/resources/log4j.properties:log4j.logger.bitronix.tm.twopc.Preparer=ERROR
RICE
[Java8-ronald@infss14-08 rice (uh-rice-2.5.3)]$ git grep bitronix.tm
rice-framework/krad-it/src/test/resources/KRADTestHarnessSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/RiceDataSourceSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/RiceDataSourceSpringBeans.xml: <bean id="riceDataSourceBitronixXa" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/RiceDataSourceStandaloneClientSpringBeans.xml.template: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/RiceJTASpringBeans.xml: <bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices" lazy-init="true">
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/RiceJTASpringBeans.xml: <bean id="transactionManagerBitronix" class="bitronix.tm.TransactionManagerServices"
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/config/bitronix-default-config.properties:bitronix.tm.allowMultipleLrc=true
rice-middleware/core/impl/src/main/resources/org/kuali/rice/core/config/bitronix-default-config.properties:bitronix.tm.timer.defaultTransactionTimeout=3600
rice-middleware/impl/src/main/resources/META-INF/common-config-defaults.xml: <param name="datasource.pool.class.non.xa" override="false">bitronix.tm.resource.jdbc.lrc.LrcXADataSource</param>
rice-middleware/impl/src/main/resources/bitronix-default-config.properties:bitronix.tm.allowMultipleLrc=true
rice-middleware/impl/src/main/resources/bitronix-default-config.properties:bitronix.tm.timer.defaultTransactionTimeout=3600
rice-middleware/it/core/src/test/resources/CORETestHarnessSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/internal-tools/src/main/resources/TestHarnessSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/kew/src/test/resources/org/kuali/rice/kew/config/TestKEWSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/kim/src/test/resources/KIMTestHarnessSpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/krms/src/test/resources/KRMSTestHarnessSpringBeans.xml: <!-- <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/ksb/src/test/resources/KSBTestHarnessSpring.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/ksb/src/test/resources/org/kuali/rice/ksb/testclient1/resources/TestClient1SpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
rice-middleware/it/ksb/src/test/resources/org/kuali/rice/ksb/testclient2/resources/TestClient2SpringBeans.xml: <bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
src/site/docbook/Intro_To_Rice/TRG_Global.xml: class="bitronix.tm.TransactionManagerServices" lazy-init="true"/>
src/site/docbook/Intro_To_Rice/TRG_Global.xml:<bean id="transactionManagerBitronix" class="bitronix.tm.TransactionManagerServices"
src/site/docbook/Intro_To_Rice/TRG_Global.xml: <programlisting><bean id="riceDataSourceBitronixXa" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
src/site/docbook/Intro_To_Rice/TRG_Global.xml: <programlisting><bean id="riceDataSourceBitronix" class="bitronix.tm.resource.jdbc.PoolingDataSource" init-method="init"
src/site/docbook/Intro_To_Rice/TRG_Global.xml: <property name="className" value="bitronix.tm.resource.jdbc.lrc.LrcXADataSource" />
Looking at my test instance the two files are btm1.tlog and brm2.tlog and they get dropped in whatever folder you were in when you started tomcat. So I think it is a safe bet that you are correct.
Doesn’t look like rice allows this to be configured and if I add a bitronix properties file to my project I lose the rice settings which is OK as long as I always remember to keep my file in sync with any changes made in rice. Having a bad memory I plan NOT to try that J
So I will have to modify rice to allows this as a configurable parameter. But that can wait for Monday.
Thanks Ken! I will report back if modifying rice works.
We run two war files in one Tomcat instance. We start tomcat from a specific folder because KC generates S2S form files where ever you start tomcat from. I find the btm1.tlog and btm2.tlog in this folder so I know it is just dropping the file without a path. From samples I have seen online the files can use full path so I plan to make this a configuration.
I am just not sure yet how to make a properties file use a configuration value. I have seem examples using env variables but that will not work since there will only be one environment in a Tomcat instance. I think KC has some other properties for bitronix in the code somewhere so I play to track them down today and see if I can implement this improvement.
Ron
<bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices" lazy-init="true">
<property name="serverId" value="#{T(org.apache.commons.lang3.RandomStringUtils).randomAlphanumeric(20)}_TM_KC"/>
<property name="logPart1Filename" value=“/example/dir/logs/${app.code}/${environment}/btm1.tlog"/>
<property name="logPart2Filename" value=“/example/dir/logs/${app.code}/${environment}/btm2.tlog"/>
<property name="defaultTransactionTimeout" value="3600”/></bean>
Excellent, fortunately I had another issue to address today which prevented me from doing what I was planning. This is a better solution which I will try now !
Ron