[JBossCache] - Re: ClassCastException/instanceof fails when getting object
by dode
Interesting, I didn't know the PrefixDeploymentSorter.
And I didn't know that it is possible to put a simple JAR in the deploy dir so it would just load the classes inside, either.
Anyway, I have put the JAR in the lib dir, since if I put it in deploy, it seems to get loaded after the cache tries to unmarshal objects it recieved from another node during startup, and a NoClassDefFoundError is thrown.
It is simple user sessions that I put in the cache, so it is nice that they "survive" a restart of a node.
I'm really happy with the setup now - I can restart any node, redeploy the webservice - no problems at all and the replication incl. database persistence through the CacheLoader works perfectly!
The farming deployment is BTW also really cool, since I have 4 nodes in the cluster.
Thanks again for all the help! Now I just have to convince the management... but I'm confident :-)
Torsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094171#4094171
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094171
18Â years, 9Â months
[JBossCache] - org.hibernate.cache.CacheException: org.jboss.cache.lock.Tim
by cry4dawn
I am running jboss 4.2.1 with portal 2.6.2 clustered using oracle. without deploying anything when i start up its fine. as soon as i try to go to the default portal page that ships with 2.6.2 i get the following error.
org.hibernate.cache.CacheException: org.jboss.cache.lock.TimeoutException: failure acquiring lock: fqn=/org/jboss/portal/core/impl/model/portal/O
bjectNode/org.jboss.portal.core.impl.model.portal.ObjectNode#176, caller=GlobalTransaction:<10.0.4.13:4078>:18, lock=write owner=GlobalTransactio
n:<10.0.4.13:4078>:1 (activeReaders=0, activeWriter=Thread[main,5,], waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
at org.hibernate.cache.TreeCache.read(TreeCache.java:57)
at org.hibernate.cache.TransactionalCache.get(TransactionalCache.java:31)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:486)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:357)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:286)
at org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer.getObjectNode(PersistentPortalObjectContainer.java:242)
at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:100)
at org.jboss.portal.core.impl.model.portal.AbstractPortalObjectContainer.getContext(AbstractPortalObjectContainer.java:80)
at org.jboss.portal.core.model.portal.DefaultPortalCommandFactory.doMapping(DefaultPortalCommandFactory.java:72)
at org.jboss.portal.core.controller.Controller.handle(Controller.java:209)
at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTypeInterceptor.java:68)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor.java:96)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.java:245)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterceptor.java:98)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(UserEventBridgeTriggerInterceptor.java:65)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$core$aspects$server$TransactionInterceptor$invoke$aop(Tra
nsactionInterceptor.java:49)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143
606530999904530.java)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143
606530999904530.java)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:140)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:380)
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 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.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:87)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
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: org.jboss.cache.lock.TimeoutException: failure acquiring lock: fqn=/org/jboss/portal/core/impl/model/portal/ObjectNode/org.jboss.porta
l.core.impl.model.portal.ObjectNode#176, caller=GlobalTransaction:<10.0.4.13:4078>:18, lock=write owner=GlobalTransaction:<10.0.4.13:4078>:1 (act
iveReaders=0, activeWriter=Thread[main,5,], waitingReaders=0, waitingWriters=0, waitingUpgrader=0)
at org.jboss.cache.Node.acquire(Node.java:500)
at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:379)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094169#4094169
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094169
18Â years, 9Â months
[JBoss Seam] - TransactionListener not bound
by csaldanh
I have been getting the following error while running my app
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.core.transactionListener
at org.jboss.seam.Component.newInstance(Component.java:1740)
at org.jboss.seam.Component.getInstance(Component.java:1643)
at org.jboss.seam.Component.getInstance(Component.java:1622)
at org.jboss.seam.Component.getInstance(Component.java:1599)
at org.jboss.seam.Component.getInstance(Component.java:1594)
at org.jboss.seam.core.TransactionListener.instance(TransactionListener.java:60)
...
Caused by: javax.naming.NameNotFoundException: TransactionListener not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
This is some of the output from command line which shows that transactionListener is installed
INFO [Component] Component: org.jboss.seam.core.transactionListener, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.core.TransactionListener, JNDI: restoreview/TransactionListener/local
Can someone please tell me what I might be missing? I have added <core:transactionListener/> to the components.xml file. Is there anything else that i need.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094164#4094164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094164
18Â years, 9Â months
[JBoss Seam] - DataModel and DataModelSelection question
by w17chm4n
First of all, the code..
| @Stateless
| @Name("QuestionCategoryController")
| public class QuestionCategoryControllerBean implements QuestionCategoryController {
|
| @Logger
| private Log log;
|
| @In(create = true)
| private QuestionCategoryManager questionCategoryManager;
|
| @In(required = false)
| private QuestionCategory questionCategory;
|
| @DataModel(value = "categories")
| private List<QuestionCategory> categoryList;
|
| @DataModelSelection(value = "categories")
| private List<Question> questionList;
|
| public void addCategory() {
| questionCategory.setCreated(new Date());
| questionCategoryManager.addCategory(this.questionCategory);
| }
|
| public void removeCategory(QuestionCategory questionCategory) { //todo
| log.info("Trying to remove #{questionCategory.categoryName}");
| if(questionCategory == null) {
| log.error("questionCategory is NULL !");
| } else {
| questionCategoryManager.removeCategory(questionCategory);
| }
| }
|
| @Factory("categories")
| public void getAllQuestionsCategories() {
| setCategoryList(questionCategoryManager.getAllQuestionCategories());
| }
|
| public List<QuestionCategory> getCategoryList() {
| return categoryList;
| }
|
| public void setCategoryList(List<QuestionCategory> categoryList) {
| this.categoryList = categoryList;
| }
|
| public List<Question> getQuestionList() {
| return questionList;
| }
|
| public void setQuestionList(List<Question> questionList) {
| this.questionList = questionList;
| }
|
| }
|
and
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib">
| <body>
|
| <h:form>
| <h:inputText value="#{questionCategory.categoryName}" required="true"/>
| <h:commandButton type="submit" value="Add new category" action="#{QuestionCategoryController.addCategory}"></h:commandButton><br/>
| <h:outputText value="Categories rowCount is null" rendered="#{categories.rowCount == null}"/><br/>
| <h:outputText value="Categories rowCount = 0" rendered="#{categories.rowCount == 0}"/><br/>
| <h:outputText value="Available categories: " rendered="#{categories.rowCount > 0}"/><br/>
| <h:dataTable var="cat" value="#{categories}">
| <h:column>
| <h:outputText value="[ #{cat.categoryName} ]"/>
| </h:column>
| <h:column>
| <h:outputText value=" - [ #{cat.created} ]"><f:convertDateTime pattern="dd-MMM-yyyy H:mm"/></h:outputText>
| </h:column>
| <h:column>
| <s:link value="remove" action="#{QuestionCategoryController.removeCategory(cat)}"/>
| </h:column>
| </h:dataTable>
| </h:form>
|
| <ui:debug hotkey="d"/>
|
| </body>
| </html>
|
Whats the problem is that QuestionCategoryController.removeCategory(cat) doesn`t work. I know it`s something about the annotations but I can`t find any answer.
As this controller should be used for adding new QuestionCategory, returning the existing categories and remove them i`ve also tried sth like that:
| @Stateless
| @Name("QuestionCategoryController")
| public class QuestionCategoryControllerBean implements QuestionCategoryController {
|
| @Logger
| private Log log;
|
| @In(create = true)
| private QuestionCategoryManager questionCategoryManager;
|
| @DataModelSelection(value = "categories") @In(required = false) @Out(required = false)
| private QuestionCategory questionCategory;
|
| @DataModel(value = "categories")
| private List<QuestionCategory> categoryList;
|
| public void addCategory() {
| questionCategory.setCreated(new Date());
| questionCategoryManager.addCategory(this.questionCategory);
| }
|
| public void removeCategory(QuestionCategory questionCategory) { //todo
| log.info("Trying to remove #{questionCategory.categoryName}");
| if(questionCategory == null) {
| log.error("questionCategory is NULL !");
| } else {
| questionCategoryManager.removeCategory(questionCategory);
| }
| }
|
| @Factory("categories")
| public void getAllQuestionsCategories() {
| setCategoryList(questionCategoryManager.getAllQuestionCategories());
| }
|
| public List<QuestionCategory> getCategoryList() {
| return categoryList;
| }
|
| public void setCategoryList(List<QuestionCategory> categoryList) {
| this.categoryList = categoryList;
| }
|
| }
|
Oh and the exception, I simply get an NullPointerException (or in logs "questionCategory is NULL !") so as I think, the QuestionCategory object isn`t injected into the removeQuestion method.
Any suggestions how to deal with this problem ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094162#4094162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094162
18Â years, 9Â months
[JBoss Seam] - Seam + Trinidad + Richfaces: IllegalStateException
by sebasfiorent
Hello.
We're developing with Trinidad+Seam+RichFaces. If we add a richfaces component to the page we get the following stacktrace:
07-10-11,12:11:04,177 ERROR (SeamPhaseListener:122) >> uncaught exception
| java.lang.IllegalStateException: No active conversation context
| at org.jboss.seam.faces.FacesMessages.instance(FacesMessages.java:440)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:467)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
| at org.ajax4jsf.resource.ResourceLifecycle.invokePhaseListener(ResourceLifecycle.java:201)
| at org.ajax4jsf.resource.ResourceLifecycle.processPhaseListeners(ResourceLifecycle.java:177)
| at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:147)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:227)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:265)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| 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.servlet.SeamFilter.doFilter(SeamFilter.java:150)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
| at java.lang.Thread.run(Thread.java:595)
| 07-10-11,12:11:04,226 ERROR (SeamPhaseListener:129) >> swallowing exception
| java.lang.IllegalStateException: No active conversation context
| at org.jboss.seam.faces.FacesMessages.instance(FacesMessages.java:440)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:467)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
| at org.ajax4jsf.resource.ResourceLifecycle.invokePhaseListener(ResourceLifecycle.java:201)
| at org.ajax4jsf.resource.ResourceLifecycle.processPhaseListeners(ResourceLifecycle.java:177)
| at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:147)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:227)
| at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:144)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:265)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| 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.servlet.SeamFilter.doFilter(SeamFilter.java:150)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
| at java.lang.Thread.run(Thread.java:595)
| 11/10/2007 12:11:04 org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit createResponseWriter
| GRAVE: No RenderingContext has been created.
|
I've debugged Seam + RichFaces code and it seems that FacesLifeCycle is ended before FacesMessages is called (in seam phaselistener). Is anybody experiencing the same dificulties or have a trick?
Regards
Sebastian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094161#4094161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094161
18Â years, 9Â months