[JBoss Seam] - No page context active - ICEFACES
by costeen21
Anyone?
Has anyone seen this one? I'm using ICEFACES and Seam 1.1.0.CR1. This exception happens in my application when I'm doing something similar to clicking on the "View Hotel" link after doing a search in the ICEFaces Booking example. The example doesn't throw this exception for me. I've compared my classes and configuration files to the example and I can't find the problem. The other side-effect is that I keep seeing the details of the first selected item everytime I click on a selection link.
Thanks,
Crayton O'Steen
11:28:08,021 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) beforePhase.
java.lang.IllegalStateException: No page context active
at org.jboss.seam.core.FacesPage.instance(FacesPage.java:83)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:219)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:51)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:392)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
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:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990147#3990147
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990147
18Â years, 1Â month
[JBoss jBPM] - Re: JBPM3 with tomcat
by meghanai_99
I am sorry but following this thread did not lead me to anything useful. In my console log I can see that it cannot connect to the database. Actually there is nothing created in jbpm\build\db. I am faily new to jBoss and hibernate so it is relatively hard to debug the problem. The first stack trace I get on my console is -
[jbpmschema] 16:30:26,014 [main] INFO DriverManagerConnectionProvider : using d
river: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost:1701
[jbpmschema] 16:30:26,014 [main] INFO DriverManagerConnectionProvider : connect
ion properties: {user=sa, password=****}
[jbpmschema] 16:30:27,086 [main] ERROR SchemaExport : schema export unsuccessful
[jbpmschema] java.sql.SQLException: socket creation error
[jbpmschema] at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
[jbpmschema] at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
[jbpmschema] at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
[jbpmschema] at org.hsqldb.jdbcDriver.connect(Unknown Source)
[jbpmschema] at java.sql.DriverManager.getConnection(DriverManager.java:525)
[jbpmschema] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[jbpmschema] at org.hibernate.connection.DriverManagerConnectionProvider.getC
onnection(DriverManagerConnectionProvider.java:110)
[jbpmschema] at org.hibernate.tool.hbm2ddl.SchemaExport$ProviderConnectionHel
per.getConnection(SchemaExport.java:467)
[jbpmschema] at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.
java:183)
[jbpmschema] at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.j
Do I need to run some other script before the creation of schema starts? to get database created in that folder?
- Meghana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990146#3990146
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990146
18Â years, 1Â month
[EJB 3.0] - ManyToMany constraints problem
by MelampO
Hello.
I have some problems using a ManyToMany relationship model. I think that it is an error in my implementation (probably with the CascadeType), but I don't know how to mend it.
I have this model:
| public class Libro implements Serializable {
|
| ...
| @ManyToMany (cascade = {CascadeType.PERSIST})
| @JoinTable(name = "LibrosEtiquetas", joinColumns = { @JoinColumn(name = "idLibro") }, inverseJoinColumns = { @JoinColumn(name = "idEtiqueta") })
| private List<Etiqueta> etiquetas;
| ...
|
|
| public class Etiqueta implements Serializable {
|
| ....
| @ManyToMany(cascade = { CascadeType.PERSIST }, mappedBy = "etiquetas")
| private List<Libro> libros;
| ....
|
When I persist a "libro" and the List is filled with "etiquetas" that doesn't exist in the database, it woks ok. It create the new "libro", the new "etiquetas" and the relation in the join table.
But if I persist with any existent "etiqueta" in the List it returns me an exception because it tries to create the "etiqueta" again... I don't know how can get that it does not try to create an "etiqueta" which is already created.
| Caused by: java.sql.BatchUpdateException: Duplicate entry 'dos' for key 1
| at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:657)
| at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:517)
| at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
| at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
|
Thank, and sorry for my english :D
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990145#3990145
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990145
18Â years, 1Â month
[JBoss Seam] - Extended EL and JSTL c:forEach. Plus, setting a component's
by antispart
I'm trying to iterate over a list and pass the index from each item in that list to an actionlistener method. I've tried two methods - ui:repeat and c:forEach, but both approaches have drawbacks.
Note, I also need to have an html "id" attribute assigned to each (a4j:commandLink) dynamically - via the EL. This is so that my javascript can reference these elements later.
<c:forEach items="${personList}" var="person">
| <a:commandLink id="person#{person.index}" action="#{foo.bar(person.index)}">#{person.name}</a:commandLink>
| </c:forEach>
public String bar(Long index) {
| log.info(index);
| return null;
| }
With c:forEach, the html "id" of each <a:commandLink> component is set properly - it sends up being id="testForm:person1" ... id="testForm:personN" . But, the bar() method's "index" is properly is null instead of being set to the value passed in with #{person.index}
Now with ui:repeat:
<ui:repeat value="${personList}" var="person">
| <a:commandLink id="person#{person.index}" action="#{foo.bar(person.index)}">#{person.name}</a:commandLink>
| </ui:repeat>
In the 2nd case, the bar() method's "index" is properly set to the value passed in with #{person.index}. But, the html "id" of the <a:commandLink> is not set (instead it is something like "testForm:j_id62:1:person").
I've found that html "ids" cannot be set with EL on components within <h:dataTable> or <ui:repeat>. But, the html "id" can be set on a component that is inside a <c:forEach> as in the 1st example.
So, this is a case where one solution works for one thing but not for the other and vice versa. I would greatly appreciate any advice. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990142#3990142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990142
18Â years, 1Â month
[EJB 3.0] - SFSB cache runtime exceptions on an idle system
by osc3
Hi,
we are using JBoss 4.0.5.GA (from jems-installer-1.2.0.CR1.jar in the ejb3-cluster configuration).
Our application contains a SFSB. After the application is deployed and used in a 2-node cluster) for about 10 minutes, we see these messages in the server.log even when the system is idle:
2006-11-30 17:12:13,947 ERROR [STDERR] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalStateException: StatefuleTreeCache.nodeActivate(): null bean instance.
| 2006-11-30 17:12:13,963 ERROR [STDERR] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5526)
| 2006-11-30 17:12:13,963 ERROR [STDERR] at org.jboss.cache.TreeCache.evict(TreeCache.java:3716)
| 2006-11-30 17:12:13,978 ERROR [STDERR] at org.jboss.cache.eviction.BaseEvictionPolicy.evict(BaseEvictionPolicy.java:34)
| 2006-11-30 17:12:13,978 ERROR [STDERR] at org.jboss.cache.eviction.BaseEvictionAlgorithm.evictCacheNode(BaseEvictionAlgorithm.java:210)
| 2006-11-30 17:12:13,994 ERROR [STDERR] at org.jboss.cache.eviction.LRUAlgorithm.evict(LRUAlgorithm.java:90)
| 2006-11-30 17:12:13,994 ERROR [STDERR] at org.jboss.cache.eviction.LRUAlgorithm.prune(LRUAlgorithm.java:121)
| 2006-11-30 17:12:14,010 ERROR [STDERR] at org.jboss.cache.eviction.BaseEvictionAlgorithm.process(BaseEvictionAlgorithm.java:98)
| 2006-11-30 17:12:14,010 ERROR [STDERR] at org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:80)
| 2006-11-30 17:12:14,010 ERROR [STDERR] at java.util.TimerThread.mainLoop(Timer.java:512)
| 2006-11-30 17:12:14,025 ERROR [STDERR] at java.util.TimerThread.run(Timer.java:462)
| 2006-11-30 17:12:14,025 ERROR [STDERR] Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: StatefuleTreeCache.nodeActivate(): null bean instance.
| 2006-11-30 17:12:14,041 ERROR [STDERR] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5526)
| 2006-11-30 17:12:14,041 ERROR [STDERR] at org.jboss.cache.TreeCache.get(TreeCache.java:3367)
| 2006-11-30 17:12:14,057 ERROR [STDERR] at org.jboss.ejb3.cache.tree.StatefulTreeCache$ClusteredStatefulCacheListener.nodePassivate(StatefulTreeCache.java:285)
| 2006-11-30 17:12:14,057 ERROR [STDERR] at org.jboss.cache.TreeCache.notifyNodePassivate(TreeCache.java:5739)
| 2006-11-30 17:12:14,072 ERROR [STDERR] at org.jboss.cache.interceptors.PassivationInterceptor.invoke(PassivationInterceptor.java:62)
| 2006-11-30 17:12:14,072 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,072 ERROR [STDERR] at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:345)
| 2006-11-30 17:12:14,088 ERROR [STDERR] at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156)
| 2006-11-30 17:12:14,088 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,103 ERROR [STDERR] at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:179)
| 2006-11-30 17:12:14,150 ERROR [STDERR] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
| 2006-11-30 17:12:14,166 ERROR [STDERR] ... 9 more
| 2006-11-30 17:12:14,166 ERROR [STDERR] Caused by: java.lang.IllegalStateException: StatefuleTreeCache.nodeActivate(): null bean instance.
| 2006-11-30 17:12:14,182 ERROR [STDERR] at org.jboss.ejb3.cache.tree.StatefulTreeCache$ClusteredStatefulCacheListener.nodeActivate(StatefulTreeCache.java:266)
| 2006-11-30 17:12:14,182 ERROR [STDERR] at org.jboss.cache.TreeCache.notifyNodeActivate(TreeCache.java:5714)
| 2006-11-30 17:12:14,197 ERROR [STDERR] at org.jboss.cache.interceptors.ActivationInterceptor.remove(ActivationInterceptor.java:162)
| 2006-11-30 17:12:14,197 ERROR [STDERR] at org.jboss.cache.interceptors.ActivationInterceptor.invoke(ActivationInterceptor.java:152)
| 2006-11-30 17:12:14,213 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,213 ERROR [STDERR] at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
| 2006-11-30 17:12:14,213 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,228 ERROR [STDERR] at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
| 2006-11-30 17:12:14,244 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,244 ERROR [STDERR] at org.jboss.cache.interceptors.PassivationInterceptor.invoke(PassivationInterceptor.java:69)
| 2006-11-30 17:12:14,260 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,260 ERROR [STDERR] at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:345)
| 2006-11-30 17:12:14,275 ERROR [STDERR] at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156)
| 2006-11-30 17:12:14,275 ERROR [STDERR] at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
| 2006-11-30 17:12:14,275 ERROR [STDERR] at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:183)
| 2006-11-30 17:12:14,291 ERROR [STDERR] at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520)
| 2006-11-30 17:12:14,291 ERROR [STDERR] ... 19 more
|
This message repeats every 5 seconds (or whatever is configured for wakeUpIntervalSeconds in ejb3-clustered-sfsbcache-service.xml)
What causes this message and how can this be stopped ?
Regards,
Olaf
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990140#3990140
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990140
18Â years, 1Â month
[EJB 3.0] - EntityManager.merge() very slow compared to fetch-update-sto
by twwwt
Hi all,
I played with this simple code in a session EJB and realised that the merge operation of EntityManager is very slow (more than one second):
| public void transfer(Account from, Account to, double value) throws AccountOverdrawException, IllegalArgumentException {
| try
| {
| to.deposit(value);
| em.merge(to);
| from.withdraw(value);
| em.merge(from);
|
| }
| catch (AccountOverdrawException e)
| {
| context.setRollbackOnly();
| throw e;
| }
| catch (IllegalArgumentException e)
| {
| context.setRollbackOnly();
| throw e;
| }
| }
|
After that, I tried this version which is much faster (about 10ms):
| public void transfer(Account from, Account to, double value) throws AccountOverdrawException, IllegalArgumentException {
| try
| {
| Account f = em.find(Account.class, from.getAccountID());
| Account t = em.find(Account.class, to.getAccountID());
| t.deposit(value);
| f.withdraw(value);
|
| }
| catch (AccountOverdrawException e)
| {
| context.setRollbackOnly();
| throw e;
| }
| catch (IllegalArgumentException e)
| {
| context.setRollbackOnly();
| throw e;
| }
| }
|
My first guess was that it might be slow because of cascaded merge of associated objects inside Account (see code below). But then I read in the EJB specification that by default there is no cascading, i.e., it has to be explicetly set in the annotations. Is there any other thing I'm currently not aware of that causes the difference.
Thanks,
Thorsten
| @Entity
| public class Account implements Serializable
| {
| private static final long serialVersionUID = 7443656659402964861L;
|
| private double balance;
| private long accountID;
| private Customer customer;
| private Bank bank;
|
| Account()
| {
| super();
| }
|
| public Account(Customer owner)
| {
| this.customer = owner;
| }
|
| @Id
| @GeneratedValue(strategy = GenerationType.SEQUENCE)
| public long getAccountID()
| {
| return accountID;
| }
|
| void setAccountID(long newID)
| {
| this.accountID = newID;
| }
|
| @Column
| public double getBalance()
| {
| return balance;
| }
|
| void setBalance(double newBalance)
| {
| this.balance = newBalance;
| }
|
| @ManyToOne
| public Bank getBank()
| {
| return bank;
| }
|
| public void setBank(Bank bank)
| {
| this.bank = bank;
| }
|
| @ManyToOne
| public Customer getCustomer()
| {
| return customer;
| }
|
| void setCustomer(Customer newCustomer)
| {
| this.customer = newCustomer;
| }
|
| /**
| * @param amount Deposit the given amount to the account.
| * @throws IllegalArgumentException if the given amount is less than zero.
| */
| public void deposit(double amount)
| {
| if (amount < 0) throw new IllegalArgumentException("Deposit of negative amount is not allowed");
| setBalance(getBalance() + amount);
| }
|
| /**
| * @param amount Withdraw the given amount from the account.
| * @throws IllegalArgumentException if the given amount is less than zero.
| * @throws AccountOverdrawException in case given amout is greather than acount balance.
| */
| public void withdraw(double amount) throws AccountOverdrawException
| {
| if (amount < 0) throw new IllegalArgumentException("Withdraw of negative amount is not allowed");
| if (amount > balance) throw new AccountOverdrawException("The operation would lead to overdrawing the account and was rejected.");
| setBalance(getBalance() - amount);
| }
| }
|
Note that Customer in turn has a list of Account(s) and Bank has a list of Customer(s) and Account(s), whereby the fetch type of those properties is set to lazy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990132#3990132
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990132
18Â years, 1Â month