[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2311) Injected hibernate session breaks removal of event scoped stateful session bean
by Marcus Schmidke (JIRA)
Injected hibernate session breaks removal of event scoped stateful session bean
-------------------------------------------------------------------------------
Key: JBSEAM-2311
URL: http://jira.jboss.com/jira/browse/JBSEAM-2311
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.0.GA
Environment: JBoss 4.2
Reporter: Marcus Schmidke
When using a JPA delegate as injected Hibernate session as suggested in chapter 8.4 of documentation, the removal of an event scoped SFSB breaks because when Seam intercepts the @Remove method and tries to inject the Hibernate session, the EntityManager will be already closed.
components.xml:
<persistence:managed-persistence-context name="entityManager" auto-create="true" persistence-unit-jndi-name="java:/EntityManagerFactories/Argos3EJBPU" />
<factory name="session" scope="STATELESS" auto-create="true" value="#{entityManager.delegate}" />
SFSB:
@Stateful
@Name("aufgabenliste")
@Scope(ScopeType.EVENT)
public class AufgabenlisteImpl implements Aufgabenliste {
@In
private Session session;
@Remove
public void remove() {
}
}
Gives the following exception upon closing of the event context:
13:02:25,091 WARN [Component] Exception calling stateful session bean default @Remove method: aufgabenliste
javax.ejb.EJBException: javax.el.ELException: Error reading 'delegate' on type org.jboss.seam.persistence.EntityManagerProxy
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
...
Caused by: javax.el.ELException: Error reading 'delegate' on type org.jboss.seam.persistence.EntityManagerProxy
at javax.el.BeanELResolver.getValue(BeanELResolver.java:66)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:112)
at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1906)
...
Caused by: java.lang.IllegalStateException: EntityManager is closed
at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java:42)
at org.hibernate.ejb.AbstractEntityManagerImpl.getDelegate(AbstractEntityManagerImpl.java:570)
at org.jboss.seam.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:95)
--
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
18 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2312) NPE when using JBPM in Seam without a DbPersistenceServiceFactory confirgured
by David Heggie (JIRA)
NPE when using JBPM in Seam without a DbPersistenceServiceFactory confirgured
-----------------------------------------------------------------------------
Key: JBSEAM-2312
URL: http://jira.jboss.com/jira/browse/JBSEAM-2312
Project: JBoss Seam
Issue Type: Bug
Components: BPM
Affects Versions: 2.0.0.GA
Reporter: David Heggie
Priority: Minor
I have noticed that when using JBPM with Seam, a DbPersistenceServiceFactory must be configured in the jbpm.cfg.xml, otherwise a NullPointerException occurs. I know that you can run JBPM by it self without persisence configured and it works just fine.
Is there a specific reason why JBPM must be configured with a persistence service in Seam. If not, there is a simple null check that can be done in the org.jboss.seam.bpm.Jbpm.initJbpmConfiguration() method to fix my problems.
Also the Jbpm class has a few dependancies on Hibernate that would be nice to remove as it is annoying to include the whole jar just for 2-3 classes.
Stacktrace:
INFO 27-11 16:18:00,430 [org.jboss.seam.contexts.Contexts.startup():303] starting up: org.jboss.seam.bpm.jbpm
INFO 27-11 16:18:00,524 [org.jbpm.JbpmConfiguration.getInstance():277] using jbpm configuration resource 'jbpm.cfg.xml'
27-Nov-2007 16:18:00 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
java.lang.NullPointerException
at org.jboss.seam.bpm.Jbpm.initJbpmConfiguration(Jbpm.java:129)
at org.jboss.seam.bpm.Jbpm.getJbpmConfiguration(Jbpm.java:93)
at org.jboss.seam.bpm.Jbpm.installProcessDefinitions(Jbpm.java:245)
at org.jboss.seam.bpm.Jbpm.startup(Jbpm.java:72)
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:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
at org.jboss.seam.Component.callComponentMethod(Component.java:2074)
at org.jboss.seam.Component.callCreateMethod(Component.java:1997)
at org.jboss.seam.Component.newInstance(Component.java:1968)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
at org.jboss.seam.init.Initialization.init(Initialization.java:555)
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
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:566)
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
--
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
18 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2308) model validation failed:java.lang.Double
by Milan Vidakovic (JIRA)
model validation failed:java.lang.Double
----------------------------------------
Key: JBSEAM-2308
URL: http://jira.jboss.com/jira/browse/JBSEAM-2308
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.2.1.GA
Environment: RedHat Developer Studio Beta2
Reporter: Milan Vidakovic
I have a double attribute in my entity. I have a form which submits data. If I have <s:validateAll> tag around my form, I cannot submit data and get a following message:
model validation failed:java.lang.Double
However, if I remove the <s:validateAll> tag from the form, it submits data correctly. The form displays data correctly in both cases.
Here is the xhtml page snippet:
<h:outputLabel value="Name: " for="prodName" />
<h:inputText id="prodName" value="#{productManager.selectedProduct.name}" disabled="#{productManager.mode=='browse'}" required="true"/>
<h:outputLabel value="Price: " for="prodPrice" />
<h:inputText immediate="true" id="prodPrice" value="#{productManager.selectedProduct.price}" disabled="#{productManager.mode=='browse'}" required="true"/>
<a4j:commandButton action="#{productManager.update}" value="Update" disabled="#{productManager.mode != 'edit'}" reRender="forma"/>
Here is the Entity:
@Entity
@Name("product")
@Scope(ScopeType.EVENT)
public class Product implements Serializable {
private static final long serialVersionUID = 9135130737929566839L;
int id;
String name;
double price;
public Product() {
id = -1;
}
public Product(String name, double price) {
this.name = name;
this.price = price;
}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@NotNull
@NotEmpty
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@NotNull(message="Morate uneti broj!")
@NotEmpty(message="Morate uneti broj!")
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Override
public String toString() {
return "[Product] name: " + name +", price: " + price;
}
}
Validation for the double field simply fails if I add <s:validateAll> tag around the form. I have tried with BigDecimal and the same thing happens. All other data types (String, date, etc.) work correctly.
--
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
18 years, 4 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1842) Need javadoc for Home and EntityHome classes
by steve tynor (JIRA)
Need javadoc for Home and EntityHome classes
--------------------------------------------
Key: JBSEAM-1842
URL: http://jira.jboss.com/jira/browse/JBSEAM-1842
Project: JBoss Seam
Issue Type: Feature Request
Components: Documentation
Affects Versions: 2.0.0.BETA1
Reporter: steve tynor
Seamgen generates classes derived from EntityHome which often must be customized by the end user developer. Currently there is no documentation, not even javadocs, for the various functions inherited from Home and EntityHome (what is the "contract" for the wire()/isWired() functions? If a new instance needs to be initialized with default values, where should that be done (createInstance()? wire()? somewhere else?). How is getDefinedInstance() intended to be used? Under what circumstances should setId() be called?
Seamgen is all well and good for getting a sort-of-working CRUD application up and running, but the generated files invariably need to be edited / adapted / customized and without documentation for how they are intended to be used, each end user developer must guess at what the seamgen framework intends.
--
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
18 years, 4 months