[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
17 years, 8 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
17 years, 8 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
17 years, 8 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
17 years, 8 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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2882) Hard dependency on org.hibernate.ejb.event.EntityCallbackHandler just added (non-JPA environment)
by Przemyslaw Jaskierski (JIRA)
Hard dependency on org.hibernate.ejb.event.EntityCallbackHandler just added (non-JPA environment)
-------------------------------------------------------------------------------------------------
Key: JBSEAM-2882
URL: http://jira.jboss.com/jira/browse/JBSEAM-2882
Project: Seam
Issue Type: Bug
Environment: Pure Tomcat + Hibernate (no JPA), Seeam 2.1 nightly 08/04/12
Reporter: Przemyslaw Jaskierski
Fix For: 2.1.0.BETA1
I've just checked out fresh Seam 2.1 snapshot and apparently someone added direct dependency to Hibernate PersistenceManger.
+- 10 days ago no such dependency existed.
Apr 12, 2008 4:43:08 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: Could not create Component: org.jboss.seam.persistence.hibernatePersistenceProvider
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1008)
at org.jboss.seam.init.Initialization.installComponents(Initialization.java:924)
at org.jboss.seam.init.Initialization.init(Initialization.java:602)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/ejb/event/EntityCallbackHandler
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.jboss.seam.Component.initMembers(Component.java:542)
at org.jboss.seam.Component.<init>(Component.java:258)
at org.jboss.seam.Component.<init>(Component.java:219)
at org.jboss.seam.init.Initialization.addComponent(Initialization.java:992)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.ejb.event.EntityCallbackHandler
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 25 more
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2713) Bean Annotated with @Destroy Fails on any JEE5 Certified Platform.
by Burt Prior (JIRA)
Bean Annotated with @Destroy Fails on any JEE5 Certified Platform.
------------------------------------------------------------------
Key: JBSEAM-2713
URL: http://jira.jboss.com/jira/browse/JBSEAM-2713
Project: JBoss Seam
Issue Type: Bug
Components: EJB3
Affects Versions: 2.1.0.A1
Environment: Any.
Reporter: Burt Prior
Fix For: 2.1.0.A1
Hi Seam Team,
Per Gavin's suggestion and response to my post on the Seam Users Forum (http://seamframework.org/Community/Seam2JEE5CompliantWithTheTCKRequirements), I am submitting the following bug.
Also, please note that I collaborated with the Apache Geronimo engineers on identifying the source of the issue and the best approach to finding a resolution as well.
The following bug occurs when running the 'booking' example on the Geronimo 2.1 AS: (please see the Users Forum entry above for the stack trace).
... 11:25:05,179 ERROR OpenEJB The bean instance business method encountered a system exception: Callback methods cannot access parameters java.lang.IllegalStateException: Callback methods cannot access parameters ...
The code in the 'booking' example that appears to cause the issue is: (on any Bean)
...
@Destroy @Remove public void destroy() {}
...
It appears that running the 'booking' (any?) Seam (2.1.0.A1) app on the Geronimo/OpenEJB (any?) JEE5 Certified container results in the stack trace and that allowing the InvocationContext to supply the parameters during a lifecycle call results in TCK failures.
The Geronimo Engineers mentioned that if OpenEJB did not throw this exception in these circumstances it would fail the TCK.
It appears that any bean using Seam's@Destroy annotation fails on *any* JEE5 certified platform, in our case Geronimo 2.1. We surmise, but have not verified, that this must occur on GlassFish as well. (Jboss 5 beta 4?)
As a test, we removed @Destroy, and still received the error.
Resolution of this error is very important to us. I have detailed stack traces of the Geronimo log should you need them, and I would be happy to help in any way to get this issue resolved quickly. Please don't hesitate to contact me with any questions.
Thank you for your time,
Burt Prior
IT Engineer
Cisco Systems, San Jose, CA
bprior(a)cisco.com
408.853.4199
--
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
17 years, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2799) Overridden components with @Install(value = false) ignores precedence.
by Shane Bryzak (JIRA)
Overridden components with @Install(value = false) ignores precedence.
----------------------------------------------------------------------
Key: JBSEAM-2799
URL: http://jira.jboss.com/jira/browse/JBSEAM-2799
Project: JBoss Seam
Issue Type: Bug
Components: Core
Reporter: Shane Bryzak
Assigned To: Shane Bryzak
Priority: Critical
Fix For: 2.1.0.BETA1
An easy way to reproduce this - take the JpaIdentityStore as an example:
@Name("org.jboss.seam.security.management.jpaIdentityStore")
@Install(precedence=Install.BUILT_IN, value = false)
@Scope(APPLICATION)
@BypassInterceptors
public class JpaIdentityStore implements IdentityStore, Serializable
Overriding it with a component with a higher precedence fails:
@Name("org.jboss.seam.security.management.jpaIdentityStore")
@Install(precedence = Install.APPLICATION)
@Scope(APPLICATION)
@BypassInterceptors
public class CustomJpaIdentityStore extends JpaIdentityStore
With the following stack trace:
java.lang.IllegalStateException: Two components with the same name and precedence: org.jboss.seam.security.management.jpaIdentityStore
at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:484)
at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:755)
at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:702)
at org.jboss.seam.init.Initialization.init(Initialization.java:567)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
--
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
17 years, 8 months