Unable to connect to hsqldb from a Seam project using Seam Entity/Seam Generate Entities
by UTISH RAJ
I'm trying to connect to a hsqldb as described in this article:
http://www.redhat.com/docs/en-US/JBoss_Developer_Studio/en/seam/html/crud...
I've already started the server by running runDBServer.bat and was able to
connect using DBVisualizer.
When I run and click on Customers List in the homepage, I'm getting
following error:
13:49:09,713 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,713 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:49:09,713 ERROR [STDERR] Apr 24, 2009 1:49:09 PM
com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/CustomersList.xhtml]
javax.faces.FacesException: javax.el.ELException: /CustomersList.xhtml
@82,62 rendered="#{empty customersList.resultList}": Error reading
'resultList' on type org.domain.crudapp.session.CustomersList_$$_javassist_2
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:373)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:276)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
at
org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
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:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.ELException: /CustomersList.xhtml @82,62
rendered="#{empty customersList.resultList}": Error reading 'resultList' on
type org.domain.crudapp.session.CustomersList_$$_javassist_2
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
... 56 more
Caused by: javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
at org.jboss.seam.framework.EntityQuery.initResultList(EntityQuery.java:74)
at org.jboss.seam.framework.EntityQuery.getResultList(EntityQuery.java:65)
at sun.reflect.GeneratedMethodAccessor708.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:95)
at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
at
org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:89)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
at
org.domain.crudapp.session.CustomersList_$$_javassist_2.getResultList(CustomersList_$$_javassist_2.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueE
13:49:09,713 ERROR [STDERR] xpression.getValue(TagValueExpression.java:71)
... 57 more
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open
connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
... 89 more
Caused by: org.jboss.util.NestedSQLException: You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
at
org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 103 more
Caused by: javax.resource.ResourceException: You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.
at
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:387)
at
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
... 105 more
13:49:09,728 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,728 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:49:09,728 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,728 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:49:09,728 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,728 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:49:09,728 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,728 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:49:09,744 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
13:49:09,744 ERROR [JDBCExceptionReporter] You are trying to use a
connection factory that has been shut down: ManagedConnectionFactory is
null.; - nested throwable: (javax.resource.ResourceException: You are trying
to use a connection factory that has been shut down:
ManagedConnectionFactory is null.)
13:53:27,024 INFO [ConnectionFactoryBindingService] Unbound
ConnectionManager
'jboss.jca:service=DataSourceBinding,name=testSeamDatasource' from JNDI name
'java:testSeamDatasource'
13:53:27,055 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=testSeamDatasource' to JNDI name
'java:testSeamDatasource'
14:09:52,932 INFO [ConnectionFactoryBindingService] Unbound
ConnectionManager
'jboss.jca:service=DataSourceBinding,name=testSeamDatasource' from JNDI name
'java:testSeamDatasource'
14:09:52,963 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding,name=testSeamDatasource' to JNDI name
'java:testSeamDatasource'
16 years, 8 months
[Design of JBossCache] - PCACHE-80 - Eviction and pojo field read race condition
by galder.zamarreno@jboss.com
Re: https://jira.jboss.org/jira/browse/PCACHE-80
I've been looking into how to fix this and I wanted to share this with you and see if you had any comments. Note first that I've updated the JIRA and I can now replicate it with a simple pojo. No need for multi references.
The issue appears when reading a Person object (i.e. p1) and while reading p1's address, this person (p1) gets evicted.
One of the problems I see already in the eviction is that when a node is evicted, the dynamic interceptor is not removed at eviction. Currently, the cache interceptor removal is done in CacheInterceptor.isPojoDetached() next time the pojo is read and it discovers that there's no pojo in the cache any more. If eviction happens between call to isPojoDetached() and call to cache.getObject() in CacheInterceptor.invoke(), then the following issue occurs:
Pojo Cache discovers that a Pojo was evicted but someone else was reading it so it decides to restore p1 in cache but the issue comes when it needs to deal with the cache interceptor is still there. As it's there, it thinks there's the possibility of an object graph so it goes onto setting up reference count and at that point realises that the AOPInstance in that FQN is gone and it then throws that Exception.
So, one option, and my preferred one would be to remove, if present, the cache interceptor during eviction. I've quickly tried this solution and it worked. Dunno however what other implications this could have. Previous experience on this area from Jason/Brian/Manik would be appreciated.
The other option I had in mind would be for ObjectGraphHandler.objectGraphPut() to deal with RuntimeException (obviously, some other more specific exception than that!) coming from InternalDelegate.incrementRefCount() in a more silent way, i.e. return false.
Thoughts? My preference is clear but I'm unsure of potential secondary effects.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226648#4226648
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226648
16 years, 8 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Changes in our JCA Adapter
by clebert.suconic@jboss.com
There are a couple of Activation properties the user can define, that are just ignored (for "backward compatilibity")
But it happens that this is not really compatible. I would prefer the user having to change its properties to something more suitable that works, than our adaptor pretending it's doing the user asked to be done.
It confused me... and it will certainly confuse the user later.
I would prefer an exception for a non-existent property.
Any thoughts?
Follows the code:
| /**
| * The activation spec
| * These properties are set on the MDB ActivactionProperties
|
| ....
| */
| public class JBMActivationSpec implements ActivationSpec
| {
| ...
|
|
| <b> This is actual code from JBMActivationSpec: </b>
|
| //here for backwards compatibilty
| public void setUseDLQ(boolean b)
| {
|
| }
|
| public void setDLQJNDIName(String name)
| {
|
| }
|
| public void setDLQMaxResent(int maxResent)
| {
|
| }
|
| public void setProviderAdapterJNDI(String jndi)
| {
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226647#4226647
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226647
16 years, 8 months