[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1709) seam-gen generated code throws exception
by Ralph Schaer (JIRA)
seam-gen generated code throws exception
----------------------------------------
Key: JBSEAM-1709
URL: http://jira.jboss.com/jira/browse/JBSEAM-1709
Project: JBoss Seam
Issue Type: Bug
Components: Core, Framework
Affects Versions: 2.0.0.BETA1
Environment: Seam (CVS checkout from today), JBoss 4.2.1, Java 6, Windows XP
Reporter: Ralph Schaer
A seam-gen generated application (with generated entities) is throwing the following error, when I click for example on the column header in a list (sort) or when I try to create a new object.
Exception during request processing:
Caused by java.lang.IllegalArgumentException with message: "Could not invoke method by reflection: Instance.getComponent() on: test.CarHome"
org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
Caused by java.lang.IllegalArgumentException with message: "object is not an instance of declaring class"
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
org.jboss.seam.persistence.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:45)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
org.jboss.seam.util.Work.workInTransaction(Work.java:39)
org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
test.CarHome_$$_javassist_2.getComponent(CarHome_$$_javassist_2.java)
org.jboss.seam.core.Validators.getValidator(Validators.java:85)
Steps to reproduce the error
1. Create a table in the database (Example with mysql. I guess the database does not matter)
CREATE TABLE `test`.`Car` (
`id` INTEGER UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`)
)
ENGINE = InnoDB;
2. seam setup (ear or war deployment does not matter. Problem exists in both deployment modes)
3. seam new-project
4. seam generate-entities
5. seam explode (jboss is already running)
6. Start the broser and type http://localhost:8080/name_of_webapp
7. Browser shows the Welcome screen. Everything looks fine.
8. Click on "Car List "
9. Click on "Create car"
10. Exception
--
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-2330) list.xhtml - Create Button disappearing when navigating
by Dupont Dupont (JIRA)
list.xhtml - Create Button disappearing when navigating
-------------------------------------------------------
Key: JBSEAM-2330
URL: http://jira.jboss.com/jira/browse/JBSEAM-2330
Project: JBoss Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.0.0.GA
Reporter: Dupont Dupont
When using seam-gen (2.0.0) I have the following issue : in list page, button 'Create entity' can disappear.
To reproduce the problem, you'll need 2 associated entities (i.e. @ManyToOne) :
1 - navigate to entity A list.
2 - click 'Create entity A' button.
3 - click 'Select entity B' button.
4 - on entity B edit page, just click on the menu link 'Entity A List'
5 - you're back to 'Entity A List' page, but the 'Create entity A' button just disappeared.
This issue is because Create button is rendered only if 'from' parameter is empty :
<s:div styleClass="actionButtons" rendered="#{empty from}">
This isn't the case in interaction 4->5.
Modifying menu.xhtml to force from parameter to '' and resolves this issue :
changed from
<s:link view="/CustomerList.xhtml"
value="Customer List"
propagation="none"/>
to :
<s:link view="/CustomerList.xhtml"
value="Customer List"
propagation="none">
<f:param name="from" value=""/>
</s:link>
--
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-1818) Patch proposed to LocaleSelector
by Marco Pancotti (JIRA)
Patch proposed to LocaleSelector
--------------------------------
Key: JBSEAM-1818
URL: http://jira.jboss.com/jira/browse/JBSEAM-1818
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Affects Versions: 2.0.0.BETA1
Reporter: Marco Pancotti
Priority: Minor
org.jboss.seam.international.LocaleSelector does not implement a getDefaultLocale method. I think it can be useful in a multi-language application. So I propose to apply the following patch in the LocaleSelector class adding the following methods (it can be more complex if you want orthogonal returns respect the return of the specified locale):
public Locale getDefaultLocale(){
return FacesContext.getCurrentInstance().getApplication().getDefaultLocale() ;
}
public String getDefaultLocaleLanguage(){
return FacesContext.getCurrentInstance().getApplication().getDefaultLocale() .getLanguage();
}
Marco Pancotti
--
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-1623) Problems with rendering emails with seam-email and IceFaces 1.6
by Karol Oslowski (JIRA)
Problems with rendering emails with seam-email and IceFaces 1.6
---------------------------------------------------------------
Key: JBSEAM-1623
URL: http://jira.jboss.com/jira/browse/JBSEAM-1623
Project: JBoss Seam
Issue Type: Bug
Components: ICE Faces Integration
Affects Versions: 1.2.1.GA
Environment: JBoss AS 4.0.5 GA with EJB3 installed (1.2.0.GA), project with Seam 1.2.1 GA,
Reporter: Karol Oslowski
Assigned To: Gregory Dick
Bug is quite simple to replicate. All u have to do is install jboss with ejb3 from the net installer http://labs.jboss.com/jemsinstaller/downloads version 1.2.0.GA. You also have to get the example applications from seam 1.2.1 GA, You have to configure the mail example as described in jboss forum linked to this bug and when trying to send an email there will be such exception:
04:18:32,140 INFO [MailSession] Creating JavaMail Session (l***:)
04:18:32,156 INFO [MailSession] connected to mail server
04:18:32,250 ERROR [MailExample] Error sending mail
java.lang.NullPointerException
at org.jboss.seam.mail.ui.UIMessage.getCharset(UIMessage.java:242)
at org.jboss.seam.mail.ui.AddressComponent.getInternetAddress(AddressComponent.java:29)
at org.jboss.seam.mail.ui.UIFrom.encodeBegin(UIFrom.java:27)
at org.jboss.seam.ui.JSF.renderChild(JSF.java:171)
at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:159)
at org.jboss.seam.ui.JSF.renderChild(JSF.java:174)
at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:150)
at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:112)
at org.jboss.seam.example.mail.MailExample.send(MailExample.java:42)
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:20)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:37)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:34)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:151)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:87)
at org.jboss.seam.example.mail.MailExample_$$_javassist_19.send(MailExample_$$_javassist_19.java)
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 com.sun.el.parser.AstValue.invoke(AstValue.java:174)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
at javax.faces.component.UICommand.broadcast(UICommand.java:106)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:57)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:44)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
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.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:359)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
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)
--
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-1228) Add sort option to <s:selectItems>
by Stephan Bublava (JIRA)
Add sort option to <s:selectItems>
----------------------------------
Key: JBSEAM-1228
URL: http://jira.jboss.com/jira/browse/JBSEAM-1228
Project: JBoss Seam
Issue Type: Patch
Components: JSF
Affects Versions: 1.2.1.GA
Reporter: Stephan Bublava
Attachments: sort-selectitems-patch.txt
The attached patch adds a sort option to <s:selectItems>, that allows the entries to be sorted by their label.
Example:
<h:selectOneMenu value="#{person.honorific}">
<s:selectItems value="#{honorifics}" var="honorific" label="#{honorific.label}" noSelectionLabel="Please select" sort="ascending" />
<s:convertEnum />
</h:selectOneMenu>
This version has not been tested in depth (especially interactions with "noSelectionLabel"), but I've been using similar code in our project (based upon Seam SelectItems 1.1.1beta1) for some time now and not encountered any problems.
--
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