[JBoss Seam] - Re:
by juggernaut
Thank you for your reply.
Yes, it does happen after clean restart. Yes, it goes away when I change everything back.
If I add myfaces jars to WEB-INF/lib directory of my war file this error dissapears, but apperar another one:
| 11:29:31,740 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
| java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
| at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:132)
| at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
| at org.apache.myfaces.context.servlet.ServletFacesContextImpl.<init>(ServletFacesContextImpl.java:88)
| at org.apache.myfaces.context.servlet.ServletFacesContextImpl.<init>(ServletFacesContextImpl.java:81)
| at org.apache.myfaces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:60)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:131)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:613)
|
Looks like when I change context-root something weird happens to classloading.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998190#3998190
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998190
19 years, 3 months
[JBossCache] - Re: Problem with transaction timeout [critical]
by jacek187
Simplest as possible working example for this issue:
| package test;
|
| import javax.naming.InitialContext;
| import javax.transaction.Synchronization;
| import javax.transaction.Transaction;
| import javax.transaction.TransactionManager;
|
| public class RollbackTest {
| public static void test(){
| try{
| InitialContext ic = new InitialContext();
| TransactionManager tm = (TransactionManager)ic.lookup( "javax.transaction.TransactionManager" );
| try {
| tm.setTransactionTimeout(1);//set 1 sec transaction timeout
| tm.begin();//start transaction
| Transaction t = tm.getTransaction();
| t.registerSynchronization(new Synchronization() {//add new synchronization handler
|
| public void afterCompletion(int arg0) {
| System.out.println("After:"+Thread.currentThread().hashCode());
| }
|
| public void beforeCompletion() {
| System.out.println("Before:"+Thread.currentThread().hashCode());
| }
| });
| Thread.sleep(20000);//wait 20 secs
| System.out.println("Transaction before commit:"+Thread.currentThread().hashCode());
| tm.commit();//try commit tranwsaction, TransactionTimedOut exception should be throwed
| System.out.println("Transaction after commit:"+Thread.currentThread().hashCode());
| } catch (Exception e) {
| System.out.println("Fake method error: " + e.getMessage());
| }
| }catch(Exception e){
| e.printStackTrace();
| }
| }
| }
|
Run this code from any non-transactional context, for example from jsp page.
| <jsp:directive.page import="test.RollbackTest"/>Hello!!
| <%
| RollbackTest.test();
| %>
|
Output is:
After:-1257420086
Transaction before commit:668113225
Fake method error: Transaction timed out after 0 seconds
BEA1-00058EF7774602E8BAA1
Note:
when you set sleep() value less than 10 secs, weblogic dosen't create separate thread for rollback!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998182#3998182
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998182
19 years, 3 months