Anyone who had troubled with this error?
Cannot create PoolableConnectionFactory (unknown system variable 'language')
Programming with java, mysql, ibatis. Added some codes and existing codes make this error as well.
Below are the error messages.
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown system variable 'language')
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:83)
at kes.db.dao.BaseDao.getObject(BaseDao.java:116)
at ocserver.android.service.dao.TB_OC_USER_BADGE_INFO_DAO.confirmNotification(TB_OC_USER_BADGE_INFO_DAO.java:21)
at ocserver.android.service.action.PushNotificationBadgeModAction.requestTEXT(PushNotificationBadgeModAction.java:66)
at kes.controller.TEXTServletAction.requestTEXT(TEXTServletAction.java:82)
at kes.controller.TEXTServletAction.doPost(TEXTServletAction.java:58)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
And below are my sql statement.
<select id="select_TB_OC_USER_BADGE_INFO_001" parameterClass="TB_OC_USER_BADGE_INFO_VO" resultClass="TB_OC_USER_BADGE_INFO_VO">
<![CDATA[
SELECT
BADGE_MC,
BADGE_WB
FROM
TB_OC_USER_BADGE_INFO
WHERE
USER_ID = #USER_ID#
AND
COMPANY_CODE = #COMPANY_CODE#
]]>
</select>
Belows are TB_OC_USER_BADGE_INFO_VO. Didn't bring getter and setter.
public class TB_OC_USER_BADGE_INFO_VO {
private String USER_ID;
private String COMPANY_CODE;
private String TYPE;
private int BADGE_MC;
private int BADGE_WB; }
The problem was firewall. The firewall had blocked java to access to database on other computer. When permitted the access, my program started working.
I change my java connector library to mysql-connector-java-5.1.23-bin.jar and it works good.
This problem was in mysql-connector-java-5.1.36.jar
Are you maybe using the buggy MySQL Connector/J? See:
https://confluence.atlassian.com/jirakb/unknown-system-variable-language-on-database-setup-page-when-using-mysql-765400069.html
https://bugs.mysql.com/bug.php?id=77665
Related
I am using Crawler controller to crawl all pages of a medium website. It randomly crawls 2-3 pages and then it causes a lock on the IndexWriter
Directory dir = FSDirectory.open(new File(index));
IndexWriterConfig conf = new IndexWriterConfig(org.apache.lucene.util.Version.LUCENE_41,new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_41));
writer = new IndexWriter(dir, conf); // line which throws lock exception.
Logs:
From: SiteSearch.KCCrawlerController.(80): Lock obtain timed out: NativeFSLock#D:\Websites\ccc\WEB-INF\lucene-index\en\write.lock: 05/08/2014 10:57:55
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock#D:\Websites\ccc\WEB-INF\lucene-index\en\write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:84)
at org.apache.lucene.index.IndexWriter.(IndexWriter.java:636)
at SiteSearch.KCCrawlerController.(KCCrawlerController.java:80)
at org.apache.jsp.monitors.siteSearchIndexer_jsp._jspService(siteSearchIndexer_jsp.java:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.tridion.ambientdata.web.AmbientDataServletFilter.doFilter(AmbientDataServletFilter.java:255)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at adminV3.ugc.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:429)
at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:384)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)
at java.lang.Thread.run(Unknown Source)
Adding jsp:
http://example.com/en/consulting/diagnostics.jsp?crawler=yes
From: SiteSearch.KCCrawler.visit(95): Stream closed: 05/08/2014
10:57:55 java.io.IOException: Stream closed at
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
at
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:312)
at
org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342)
at SiteSearch.KCCrawler.visit(KCCrawler.java:95) at
edu.uci.ics.crawler4j.crawler.WebCrawler.processPage(WebCrawler.java:306)
at edu.uci.ics.crawler4j.crawler.WebCrawler.run(WebCrawler.java:189)
at java.lang.Thread.run(Unknown Source)
Why am I getting this exception? Any help.
UPDATE: 17/08/2014 :
When I run the Indexer first time, it completes successfully with the below exception thrown. If I run the search on this, I get my results successfully. However if I run the Indexer again, it throws the lock exception mentioned above. It also shows that my controller class is called twice.
org.apache.catalina.core.StandardWrapperValve invoke SEVERE:
Servlet.service() for servlet jsp threw exception java.io.IOException:
Stream closed at
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:204)
at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:115)
at
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:188)
at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at
org.apache.jsp.monitors.siteSearchIndexer_jsp._jspService(siteSearchIndexer_jsp.java:82)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:386)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
Quoting the Javadocs -
"Opening an IndexWriter creates a lock file for the directory in use. Trying to open another IndexWriter on the same directory will lead to a LockObtainFailedException. The LockObtainFailedException is also thrown if an IndexReader on the same directory is used to delete documents from the index."
"IndexWriter instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexWriter instance as this may cause deadlock; use your own (non-Lucene) objects instead."
https://lucene.apache.org/core/4_1_0/core/org/apache/lucene/index/IndexWriter.html
Are you creating new instances of IndexWriter for each page that you are crawling?
I am having a wicket application and I am using Ebean ORM mapping. I have set all the credential in ebean.properties. But I am getting an error message "Could not initialize class com.avaje.ebean.Ebean" when I deployed it on server, Its gives error as follows
Last cause: Could not initialize class com.avaje.ebean.Ebean
WicketMessage: Can't instantiate page using constructor 'public com.zipgrocery.pages.HomePageNew(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public).
Stacktrace
Root cause:
java.lang.NoClassDefFoundError: Could not initialize class com.avaje.ebean.Ebean
at com.zipgrocery.data.Merchant.getMerchantsByZone(Merchant.java:374)
at com.zipgrocery.pages.HomePageNew.<init>(HomePageNew.java:77)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:311)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Complete stack:
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor 'public com.zipgrocery.pages.HomePageNew(org.apache.wicket.request.mapper.parameter.PageParameters)' and argument ''. Might be it doesn't exist, may be it is not visible (public).
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:196)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:173)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:77)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:47)
at org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:103)
at org.apache.wicket.request.handler.PageProvider.resolvePageInstance(PageProvider.java:264)
at org.apache.wicket.request.handler.PageProvider.getPageInstance(PageProvider.java:165)
at org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)
at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:105)
at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:224)
at org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:167)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
But it works fine when I deploy it on my localhost. I tried to find the solutions for this but not getting. So Help me out...
I'm not familiar with this guy "Ebean ORM", but the error track is pretty generic and seems has nothing really to do with "Ebean ORM" itself. Based on my past exp, it is more like a classloader issue. You said it was running fine locally and then? where is it broken? when you have such issues like "NoClassDefFoundError", always check what classloader is being used. And also it is worth to check whether your broken environment has multiple versions of the class/jar as well as if the server has its embedded version of this class/jar.
I'm trying to add some custom cursors on my app but every time I receive this error:
2012-03-29 14:25:36,013 ERROR org.apache.wicket.request.target.resource.SharedResourceRequestTarget - unable to lazily register shared resource img/link1mc.cur
java.lang.ClassNotFoundException: img
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:114)
at org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:151)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
2012-03-29 14:25:36,013 INFO org.apache.wicket.request.target.resource.SharedResourceRequestTarget - shared resource img/link1mc.cur not found or not allowed access
And the cursor path is valid, the cursor is visible on app but in log I always find this error. Other problem is that on IE8 the performance is highly impacted only for two custom added cursors. I'm wondering if I must add .cur extension on mime types?
If anyone have e suggestion please let me know, thank you.
So my question would be why are you using java for this you can easily modify your cursor with css, which would be the easiest and best practice as a user can easily disable it if they want.
Check out
http://www.w3schools.com/cssref/pr_class_cursor.asp
http://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor&preval=url%28smiley.gif%29,url%28myBall.cur%29,auto
i've created this webpage using jsf,prettyfaces and hibernate
i looked around and most people says that this error is because of cache
most of them found this error after login,logout and try to login back
but i found this error when i log in,and when i try to navigate to any other page,any link that i clicked will produce this error
what makes it harder is that this error doesnt occur everytime
sometimes when i try restart the server,login back,everythin work just fine
but sometimes when this error occur again, i tried restart the server and try login back.the same error still occur
javax.faces.application.ViewExpiredException: viewId:/ePortfolio.jsf - View /ePortfolio.jsf could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:212)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
JSF keeps a (configurable) number of views in the session. You will get this ViewExpiredException if you do a post to a view that cannot be restored anymore, ie. not present anymore in the list of views for that session.
There can be multiple reasons for this. Two possible scenario's I can think of right now are:
Session invalidated/expired
Multiple (> configured number of sessions in view) views being created after the one that should be restored
To my understanding this is caused by the combination of several things:
A JSF-form containing an internal id for a field has been generated.
The JSF-page has been changed, or the whole application redeployed, causing the internal ids to change.
The JSF-form with the old internal id is submitted (a login page?) and the old internal id cannot be found in the new ids for the JSF-page.
You must have the page refreshed in the browser (getting the new id's) before attempting to submit again.
I'm connecting to a mainframe environment from Java using comporsys JCA connector. The java application is deployed in JBOSS. The connector configured in that way:
<connection-factories>
<no-tx-connection-factory>
<jndi-name>ComporsysIMSConnector</jndi-name>
<rar-name>ims_connector_port4027_CreditAuth.rar</rar-name>
<connection-definition>de.comporsys.connector.ims.ConnectionFactory</connection-definition>
<min-pool-size>1</min-pool-size>
<max-pool-size>15</max-pool-size>
<shrinking-enabled>true</shrinking-enabled>
<shrink-period-minutes>2</shrink-period-minutes>
<logging-enabled>true</logging-enabled>
<!-- <log-filename>/opt/jboss/xxxx/logs/ims_connector.log</log-filename> -->
<log-filename>D:\ims_connector.log</log-filename>
</no-tx-connection-factory>
</connection-factories>
The communication must no be 100% ok as I see a lot of error in the logs like this:
[2010-12-16 05:21:10,061] WARN (org.jboss.resource.connectionmanager.NoTxConnectionManager:738) - Pearl 1,DE82000,CGN,D5 ,10450565,768209411 - Connection error occured: org.jboss.resource.connectionmanager.NoTxConnectionManager$NoTxConnectionEventListener#3dcbef2a[state=NORMAL mc=de.comporsys.connector.ims.ManagedConnectionImpl#4743f21b handles=1 lastUse=1292++++++++++++ permit=true trackByTx=false mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool#7afdd15b context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool#2dbbec72]
de.comporsys.connector.ims.imstoc.ImstocException: IMS Connect-Error: Return=40, Reason=59
at de.comporsys.connector.ims.imstoc.Connection.execute(Connection.java:261)
at de.comporsys.connector.ims.imstoc.IMSTOCWorkunit.execute(IMSTOCWorkunit.java:261)
at de.comporsys.connector.ims.imstoc.IMSTOCWorkunit.resumeTPipe(IMSTOCWorkunit.java:167)
at de.comporsys.connector.ims.imstoc.IMSTOCWorkunit.execute(IMSTOCWorkunit.java:98)
at de.comporsys.connector.AbstractStatement.executeRequest(AbstractStatement.java:45)
at de.comporsys.connector.ims.Statement.execute(Statement.java:101)
at com.xxx.ims.access.GenericImsTransaction.executeUCIAysnc(GenericImsTransaction.java:340)
at com.xxx.ims.access.GenericImsTransaction.executeUCI(GenericImsTransaction.java:127)
at com.xxx.ims.access.GenericImsTransaction.execute(GenericImsTransaction.java:60)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:50)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleOverPaymentResponse(UpdateCheckinIMF.java:367)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:219)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:121)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:22)
at com.xxx.core.rental.VehicleCheckinBC.executeUpdateCheckInWizardTransaction(VehicleCheckinBC.java:541)
at com.xxx.core.rental.VehicleCheckinBC.executeVehicleCheckin(VehicleCheckinBC.java:315)
at com.xxx.merlin.vehiclecheckin.VehicleCheckinMH.processMessage(VehicleCheckinMH.java:112)
at com.xxx.merlin.servlet.util.HttpRequestHandler.handleMessage(HttpRequestHandler.java:150)
at com.xxx.merlin.servlet.util.HttpRequestHandler.processRequest(HttpRequestHandler.java:88)
at com.xxx.merlin.servlet.MerlinServlet.doPost(MerlinServlet.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xxx.scope.ServletRequestScopeFilter.doFilter(ServletRequestScopeFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
[2010-12-16 05:21:10,155] WARN (com.xxx.ims.access.GenericImsTransaction:82) - Pearl 1,DE82000,CGN,D5 ,10450565,768209411 - pac71068: ResourceException caught upon IMF execute. IMF body was:/MSKY\/RAN768209411\/MVA10450565\/DOM23021\/DOGY/G8\/COLN\/AGT82000\/OWM\/FLO\/MOPCV\/DLAY\/DOLCGN\/DOD16Dec10/0600\/TAM39058\/ACTA\/RPIY\/ENT\/AUT\/PRTN\#
javax.resource.spi.ResourceAdapterInternalException: de.comporsys.connector.NoActiveTransactionException: connection is not in transaction: de.comporsys.connector.ims.ManagedConnectionImpl#4743f21b
at de.comporsys.connector.AbstractManagedConnection.getActiveTransaction(AbstractManagedConnection.java:216)
at de.comporsys.connector.AbstractStatement.executeRequest(AbstractStatement.java:53)
at de.comporsys.connector.ims.Statement.execute(Statement.java:101)
at com.xxx.ims.access.GenericImsTransaction.executeUCIAysnc(GenericImsTransaction.java:340)
at com.xxx.ims.access.GenericImsTransaction.executeUCI(GenericImsTransaction.java:127)
at com.xxx.ims.access.GenericImsTransaction.execute(GenericImsTransaction.java:60)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:50)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleOverPaymentResponse(UpdateCheckinIMF.java:367)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:219)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:121)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:22)
at com.xxx.core.rental.VehicleCheckinBC.executeUpdateCheckInWizardTransaction(VehicleCheckinBC.java:541)
at com.xxx.core.rental.VehicleCheckinBC.executeVehicleCheckin(VehicleCheckinBC.java:315)
at com.xxx.merlin.vehiclecheckin.VehicleCheckinMH.processMessage(VehicleCheckinMH.java:112)
at com.xxx.merlin.servlet.util.HttpRequestHandler.handleMessage(HttpRequestHandler.java:150)
at com.xxx.merlin.servlet.util.HttpRequestHandler.processRequest(HttpRequestHandler.java:88)
at com.xxx.merlin.servlet.MerlinServlet.doPost(MerlinServlet.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xxx.scope.ServletRequestScopeFilter.doFilter(ServletRequestScopeFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
at de.comporsys.connector.ExceptionHandler.handle(ExceptionHandler.java:46)
at de.comporsys.connector.AbstractStatement.executeRequest(AbstractStatement.java:55)
at de.comporsys.connector.ims.Statement.execute(Statement.java:101)
at com.xxx.ims.access.GenericImsTransaction.executeUCIAysnc(GenericImsTransaction.java:340)
at com.xxx.ims.access.GenericImsTransaction.executeUCI(GenericImsTransaction.java:127)
at com.xxx.ims.access.GenericImsTransaction.execute(GenericImsTransaction.java:60)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:50)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleOverPaymentResponse(UpdateCheckinIMF.java:367)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:219)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:229)
at com.xxx.ims.UpdateCheckinIMF.handleRepromptWithEnter(UpdateCheckinIMF.java:280)
at com.xxx.ims.UpdateCheckinIMF.parseOutput(UpdateCheckinIMF.java:208)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:57)
at com.xxx.ims.UpdateCheckinIMF.executeTransactionInternally(UpdateCheckinIMF.java:28)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:121)
at com.xxx.ims.GenericCheckinOperation.executeTransaction(GenericCheckinOperation.java:22)
at com.xxx.core.rental.VehicleCheckinBC.executeUpdateCheckInWizardTransaction(VehicleCheckinBC.java:541)
at com.xxx.core.rental.VehicleCheckinBC.executeVehicleCheckin(VehicleCheckinBC.java:315)
at com.xxx.merlin.vehiclecheckin.VehicleCheckinMH.processMessage(VehicleCheckinMH.java:112)
at com.xxx.merlin.servlet.util.HttpRequestHandler.handleMessage(HttpRequestHandler.java:150)
at com.xxx.merlin.servlet.util.HttpRequestHandler.processRequest(HttpRequestHandler.java:88)
at com.xxx.merlin.servlet.MerlinServlet.doPost(MerlinServlet.java:22)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xxx.scope.ServletRequestScopeFilter.doFilter(ServletRequestScopeFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: de.comporsys.connector.NoActiveTransactionException: connection is not in transaction: de.comporsys.connector.ims.ManagedConnectionImpl#4743f21b
at de.comporsys.connector.AbstractManagedConnection.getActiveTransaction(AbstractManagedConnection.java:216)
at de.comporsys.connector.AbstractStatement.executeRequest(AbstractStatement.java:53)
... 52 more
Unfortunately I do not have any info what does it mean as composys does not support it any more.
Do you have any idea why this happens?
There is an IMSConnectionFactory which initializes the comporsys stuff
public static ConnectionFactory getIMSConnectionFactory() {
InitialContext context;
ConnectionFactory imsConnectionFactory = null;
try {
// Create a Properties Object and set the JNDI properties
Properties jndiProperties = new Properties();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, WizardContext.getInstance().getWizardProperties().getJndiClass());
// Try obtaining a JNDI context so that the application server can be queried
context = new InitialContext(jndiProperties);
// Request the Connection Factory from the application server using a JNDI context lookup
imsConnectionFactory = (ConnectionFactory) context.lookup(WizardContext.getInstance().getWizardProperties().getConnectionJndi());
Ther transaction handling might be in m_IMSStatementSync.execute, but it is a black box as it is a third party stuff. The IMSConnector registere in JBOSS and we access it in a servlet. Details of the transaction handler:
for (int attempts = 1 + tenaciousness; attempts > 0;) {
try {
// Slightly nervous re. the location of this block.
// It looks like it should be above, where it is now commented out,
// but moving it there coincided with failures.
// This may well have just been a coincidence - but it all happened at cutover time,
// so for the sake of safety I've put it back here for now.
m_IMSStatementSync = m_IMSConnection.createStatement(); /* This created by the connection factory */
m_IMSRequest = m_IMSStatementSync.createRequest();
m_IMSRequest.setTimeout(m_WizardConfiguration.getWizardTimeOut());
m_IMSRequest.setTransaction(p_Input.get_TransactionCode());
m_IMSRequest.setCommArea(p_Input);
m_IMSRequest.setLterm(p_Input.get_TSR().get_ID());
m_IMSRequest.setTimer((byte) WizardOperationConstants.IMS_CONNECT_SYNC_TIMEOUT);
// end of block
// Execute the IMS transaction
m_IMSReply = m_IMSStatementSync.execute(m_IMSRequest); /*pac7102*/
attempts = 0;
}
catch (NoActiveTransactionException e) {
if (--attempts < 1) {
tenaciousness >>= 1;
throw (e);
}
try {
wait(rnd());
}
catch (InterruptedException f) { ... }
}
The reason for the warning is fairly explicit from the stack trace:
de.comporsys.connector.NoActiveTransactionException: connection is not in transaction
.... but you would definitely want to clarify whether or not the interface is actually working or not. At any rate, the warning that the connection is not in a transaction is because you have your JCA pool defined as a non-transactional pool. In order to switch to a transactional pool, it should look something like this:
<connection-factories>
<tx-connection-factory>
<jndi-name>ComporsysIMSConnector</jndi-name>
<rar-name>ims_connector_port4027_CreditAuth.rar</rar-name>
<connection-definition>de.comporsys.connector.ims.ConnectionFactory</connection-definition>
<min-pool-size>1</min-pool-size>
<max-pool-size>15</max-pool-size>
<shrinking-enabled>true</shrinking-enabled>
<shrink-period-minutes>2</shrink-period-minutes>
<logging-enabled>true</logging-enabled>
<!-- <log-filename>/opt/jboss/xxxx/logs/ims_connector.log</log-filename> -->
<log-filename>D:\ims_connector.log</log-filename>
</tx-connection-factory>
</connection-factories>
I am assuming this is supported only because the warning message indicates it expects the connections to be in a transaction which is what the tx-connection-factory will do.
I would give it a spin and see what happens.
Transaction connection factory declaration is necessary, but not sufficient.
You also need to add a declarative transaction to the methods that interact with the database. I'd recommend "PROPAGATION=REQUIRED_NEW".
From what location are you initiating the call to your JCA resource?
In other words, what is
at com.xxx.ims.access.GenericImsTransaction.executeUCIAysnc(GenericImsTransaction.java:340)
?
From the stack trace it seems clear that there is no EJB involved here. The call comes in from a Servlet and then propagates to your own code until the JCA connection is being used.
GenericImsTransaction sounds like it does something transactional, but what exactly? You should verify that there is a JTA transaction being started somewhere. In your Servlet you can get a hold of a UserTransaction, which is a simple interface to start and commit JTA transactions:
#Resource
private UserTransaction tx;
If you're using a pre-Java EE 5 version of JBoss AS, then you can use the following code to obtain a UserTransaction:
private UserTransaction getUserTransaction() {
UserTransaction tx = null;
try {
tx = (UserTransaction)new InitialContext().lookup("java:comp/UserTransaction");
} catch (NamingException e) {
throw new RuntimeException("No UserTransaction available at default location, is a transaction manager installed?", e);
}
return tx;
}
Somewhere in your callstack, you then need to call tx.begin(); and afterwards tx.commit() or tx.rollback().
If you're able to use EJB3, then it's easier to let your Servlet call a stateless session bean (#Stateless) and then let this bean call your other code. You will then automatically have a transaction and the container will take care of committing or rolling it back. If you're not yet using EJBs it may be difficult to retrofit the existing code into using them and the manual JTA code may be easier to insert.