[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2430) JNDI lookup error when injecting a stateful bean into a stateful bean in glassfish
by Richard Hoffman (JIRA)
JNDI lookup error when injecting a stateful bean into a stateful bean in glassfish
----------------------------------------------------------------------------------
Key: JBSEAM-2430
URL: http://jira.jboss.com/jira/browse/JBSEAM-2430
Project: JBoss Seam
Issue Type: Bug
Reporter: Richard Hoffman
Per Pete's request (http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115521#4115521) I'm making a ticket about the problem I'm facing:
Using glassfish, I'm trying to inject a stateful bean into a stateful bean...instead of describing my specific app and trying to explain exactly what I'm doing and why, I figured I'd demonstrate how to duplicate my problem using the jee5/booking example provided with Seam 2:
1.) Add the following to the top of HotelSearchingAction:
import org.jboss.seam.annotations.In;
.
.
@In(create=true)
private HotelBooking hotelBooking;
2.) Redeploy and run the booking app.
3.) Navigate to the Search page. You should receive a "Could not instantiate Seam component: hotelBooking" error, which is caused by: "javax.naming.NameNotFoundException: No object bound to name java:comp/env/jboss-seam-jee5/HotelBookingAction/local"
Now, granted, in this particular case, there really isn't any functional reason to do this injection, but it demonstrates the same problem I'm having on my particular application (where this kind of injection makes sense). It is also worth noting that if you do the opposite injection (HotelSearching into HotelBookingAction), you have no problems.
One way I found to get around this problem is to put a @Startup at the top of the HotelBookingAction bean, but I'm not sure why this is necessary.
---
My theory as to what's going on is as follows...my apologies if I'm way off, heh:
The page flow of the booking app is Login -> Search (which uses HotelSearchingAction) -> Book Hotel (which uses HotelBookingAction). So, HotelSearchingAction gets (instantiated?) put in the JNDI tree first, as the user progresses through the app. The problem is, when you inject HotelBookingAction into HotelSearchingAction, HotelBookingAction needs to be created when HotelSearchingAction is first used, but it hasn't been put in the JNDI tree yet, so we get a lookup error. And of course, if you put @Startup on HotelBookingAction, HotelBookingAction is now in the JNDI tree way before HotelSearchingAction needs it, so the error is gone. But again, I'm not sure why @Startup should be necessary to inject a not-yet-used stateful bean into a stateful bean.
Thanks in advance to anyone who works on this ticket. :-)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1678) @Begin(flushMode=MANUAL) takes effect AFTER method call instead of before it.
by Frits Jalvingh (JIRA)
@Begin(flushMode=MANUAL) takes effect AFTER method call instead of before it.
-----------------------------------------------------------------------------
Key: JBSEAM-1678
URL: http://jira.jboss.com/jira/browse/JBSEAM-1678
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.BETA1
Environment: J2SE 1.5, Tomcat 6.0.10, Hibernate 3.2.3, HibEM 3.3.1
Reporter: Frits Jalvingh
(See also the end of thead at http://jboss.com/index.html?module=bb&op=viewtopic&p=4064502#4064502)
I have a method marked:
@Begin(flushMode=FlushModeType.MANUAL)
public String createNewTarget()
This method is meant as the start of a 2-screen conversation. This conversation should be rolled back if a user presses cancel so flushmode=MANUAL is used to prevent the persistence context from flushing db changes.
The method starts by creating a new entity and persist()s it. The problem is that this causes an immediate "insert" by Hibernate regardless of the flushmode.
I debugged the code and found that the flushmode gets set AFTER Seam calls the method, not before (ConversationInterceptor). This seems to be wrong, so I placed an extra call to set the mode in aroundInvoke():
setFlushMode(method); // JAL FlushMode should be set BEFORE we call the method!?
Object result = invocation.proceed();
beginConversationIfNecessary(method, result);
endConversationIfNecessary(method, result);
return result;
(flushMode in the original code is set in beginConversation()).
This at least fixes part of the problem; the other part of the problem is a bug in Hibernate where it always forces an insert even if it is not needed. I fixed that too which fixes the entire problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1457) ui example doesnt work in tomcat 5.5.23
by Bieth Bruno (JIRA)
ui example doesnt work in tomcat 5.5.23
---------------------------------------
Key: JBSEAM-1457
URL: http://jira.jboss.com/jira/browse/JBSEAM-1457
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 1.2.1.GA
Environment: Tomcat 5.5.23
Reporter: Bieth Bruno
Can't run the ui example with tomcat 5.5.23 :
After clicking one of the link on the main page I get :
15:10:49,124 ERROR [ExceptionFilter] could not roll back transaction
javax.naming.NamingException: Local server is not initialized
at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
...
15:10:50,265 ERROR [SeamPhaseListener] uncaught exception
javax.faces.el.EvaluationException: Cannot set value for expression '#{personHome.id}' to a new valu
e of type java.lang.Integer
at org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:310)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1000) Propagation of conversations with pageflow in testing environment.
by Denis Karpov (JIRA)
Propagation of conversations with pageflow in testing environment.
------------------------------------------------------------------
Key: JBSEAM-1000
URL: http://jira.jboss.com/jira/browse/JBSEAM-1000
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.0.GA
Environment: windows 2000 jboss-4.0.5.GA
Reporter: Denis Karpov
I think there is bug in testing environment (propagation of conversations with pageflow does not work)
In this test there is 2 requests .
In the first I start conversation and pageflow
In the second conversation is lost.
If I do not start pageflow then conversation propagates.
Code:
public class TOrdTest extends SeamTest{
private static final Log log = LogFactory.getLog( TOrdTest.class );
@Test
public void Test1() throws Exception
{
String id = new FacesRequest(){
@Override
protected void invokeApplication() throws Exception {
Conversation.instance().begin();
Pageflow.instance().begin("val_buy"); // uses start-state
setOutcome("browse");
log.info("##### 1 Conversation_ID "+ Conversation.instance().getId());
assert isLongRunningConversation();
}
@Override
protected void renderResponse() throws Exception {
}
}.run();
id = new FacesRequest("/exchange/buy_readonly.xhtml",id){
@Override
protected void beforeRequest()
{
log.info("#####beforeRequest Conversation_ID "+ getConversationId());
}
@Override
protected void applyRequestValues() throws Exception {
log.info("##### 2 Conversation_ID "+ Conversation.instance().getId()+" "+getConversationId());
}
@Override
protected void invokeApplication() throws Exception {
//Conversation.instance().beginNested();
log.info("##### 3 Conversation_ID "+ Conversation.instance().getId()+" "+getConversationId());
assert isLongRunningConversation();
}
}.run();
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1173) HibernateSessionProxy ClassCastException
by dazhu tang (JIRA)
HibernateSessionProxy ClassCastException
----------------------------------------
Key: JBSEAM-1173
URL: http://jira.jboss.com/jira/browse/JBSEAM-1173
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 1.2.0.GA
Reporter: dazhu tang
Priority: Critical
1. i want to inject the hibernate session in seam,so i config the component.xml as follows:
<core:hibernate-session-factory name="hibernateSessionFactory" />
<core:managed-hibernate-session name="session" auto-create="true"
session-factory-jndi-name="java:/HibernateSessionFactory" />
2. Inside managed Bean , i use @in to inject the Hibernate Session,
but when i am using DetachedCriteria in my application
DetachedCriteria criteria =
DetachedCriteria.forClass(Smartform.class);
criteria.getExecutableCriteria(session)
i got the HibernateSessionProxy ClassCastException,i debug the application and found that seam injected HibernateSessionProxy not the real HibernateSession object . So DetachedCriteria can't work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3187) Sending asynchronous mail is not ok with jsf mojarra 1.2_08
by Julien Buret (JIRA)
Sending asynchronous mail is not ok with jsf mojarra 1.2_08
-----------------------------------------------------------
Key: JBSEAM-3187
URL: https://jira.jboss.org/jira/browse/JBSEAM-3187
Project: Seam
Issue Type: Bug
Components: Mail
Affects Versions: 2.0.2.SP1
Environment: jsf ri mojarra 1.2_08
Reporter: Julien Buret
Assignee: Pete Muir
Priority: Minor
The bug is not present with jsf ri 1.2_04.
With 1.2_08, when a parameter in the mail template is null - for example if #{test} returns null, there is an exception like this :
java.lang.NullPointerException
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:80)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at javax.faces.component.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
at org.jboss.seam.mail.ui.MailComponent.getValue(MailComponent.java:179)
at org.jboss.seam.mail.ui.MailComponent.getString(MailComponent.java:158)
at org.jboss.seam.mail.ui.AddressComponent.getAddress(AddressComponent.java:55)
at org.jboss.seam.mail.ui.AddressComponent.getInternetAddress(AddressComponent.java:28)
at org.jboss.seam.mail.ui.RecipientAddressComponent.encodeBegin(RecipientAddressComponent.java:25)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
at com.sun.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:50)
at com.sun.facelets.component.UIRepeat.process(UIRepeat.java:357)
at com.sun.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:617)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
at org.jboss.seam.ui.renderkit.FragmentRendererBase.doEncodeChildren(FragmentRendererBase.java:29)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:832)
at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:165)
at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:207)
at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:161)
at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:79)
at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:170)
The workaround I found is to subclass FaceletsRenderer like this
@Override
protected void renderFacelet(FacesContext facesContext, Facelet facelet) throws IOException {
if(ApplicationAssociate.getCurrentInstance() == null) {
new ApplicationImpl();
}
super.renderFacelet(facesContext, facelet);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3007) no error message when component cannot be properly created on startup
by Sebastian Hennebrueder (JIRA)
no error message when component cannot be properly created on startup
---------------------------------------------------------------------
Key: JBSEAM-3007
URL: http://jira.jboss.com/jira/browse/JBSEAM-3007
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.2.GA, 2.0.1.GA
Environment: Mac OSX JDK 1.5
Tomcat 6
Reporter: Sebastian Hennebrueder
When a component implements an interface which is not deployed to the application server, the component is not created but silently ignored.
At least an error message during startup would be fine.
I run into this problem when using Groovy components. When the groovy classes are compiled to java classes they implement a groovy interface. If I do not deploy the groovy jars, the component is not loaded.
I reproduced the problem with a class implementing an interface. The interface was part of a jar which was only available at compile time but not deployed to Tomcat. Same problem happens on JBoss 4.2.2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 5 months