[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1371) Unable to use TestNG groups with SeamTest
by Samuel Mendenhall (JIRA)
Unable to use TestNG groups with SeamTest
-----------------------------------------
Key: JBSEAM-1371
URL: http://jira.jboss.com/jira/browse/JBSEAM-1371
Project: JBoss Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 1.2.1.GA
Reporter: Samuel Mendenhall
Priority: Minor
testng xml in build.xml
++++++++++++++++++++++++++++++
<testng outputdir="${basedir}/test-report" groups="SomeGroups">
<classfileset dir="classes" includes="**/*.class" />
<classpath path="${test.dir}" />
<classpath path="${embedded-ejb3.dir}" />
<classpath refid="build.classpath" />
</testng>
++++++++++++++++++++++++++++++
EmptyTest.java
++++++++++++++++++++++++++++++
public class EmptyTest extends SeamTest {
@Test(groups = {"SomeGroups"})
public void testNothing() throws Exception {
new FacesRequest() {
@Override
protected void invokeApplication() throws Exception {
assert true;
}
}.run();
}
@Test
public void testNothingAgain() throws Exception {
assert true;
}
}
++++++++++++++++++++++++++++++
command:
++++++++++++++++++++++++++++++
ant test
++++++++++++++++++++++++++++++
Exception:
++++++++++++++++++++++++++++++
[testng] java.lang.NullPointerException
[testng] at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:418)
[testng] at com.mydomain.convotest.EmptyTest.testNothing(EmptyTest.java:10)
..
++++++++++++++++++++++++++++++
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2365) parametized page definitions
by koen handekyn (JIRA)
parametized page definitions
-----------------------------
Key: JBSEAM-2365
URL: http://jira.jboss.com/jira/browse/JBSEAM-2365
Project: JBoss Seam
Issue Type: Feature Request
Affects Versions: 2.0.0.GA
Reporter: koen handekyn
Priority: Minor
for typical administration pages one typicalle has a ' list + search ' with corresponding details page.
for each of the details pages of all of the editable entities i'm repeating the below
<page
view-id="/up/admin/portalConfiguration.xhtml"
conversation="portalConfigurationConversation"
>
<begin-conversation nested="true" />
<navigation from-action="#{backingBean['persist']">
<end-conversation />
<redirect view-id="/up/admin/portalConfigurationList.xhtml" />
</navigation>
<navigation from-action="#{backingBean['update']}">
<end-conversation />
<redirect view-id="/up/admin/portalConfigurationList.xhtml" />
</navigation>
<navigation from-action="#{backingBean['remove']">
<end-conversation />
<redirect view-id="/up/admin/portalConfigurationList.xhtml" />
</navigation>
</page>
as GK started of seam with DRY in mind, this repetion should be avoidable.
i propose a solution like the following
<page
view-id="/up/admin/*.xhtml"
conversation="%{page}Conversation"
>
<begin-conversation nested="true" />
<navigation from-action="#{backingBean['persist']">
<end-conversation />
<redirect view-id="/up/admin/%{page}List.xhtml" />
</navigation>
<navigation from-action="#{backingBean['update']}">
<end-conversation />
<redirect view-id="/up/admin/%{page}List.xhtml" />
</navigation>
<navigation from-action="#{backingBean['remove']">
<end-conversation />
<redirect view-id="/up/admin/%{page}List.xhtml" />
</navigation>
</page>
i.e.
when a page matches " view-id="/up/admin/*.xhtml" " the * is matched and assigned to a variable " page " that can be used below.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1858) Ability to avoid view path repetition in pages.xml
by Matt Drees (JIRA)
Ability to avoid view path repetition in pages.xml
--------------------------------------------------
Key: JBSEAM-1858
URL: http://jira.jboss.com/jira/browse/JBSEAM-1858
Project: JBoss Seam
Issue Type: Feature Request
Reporter: Matt Drees
Priority: Minor
It would be fantastic if instead of this:
<page view-id="/admin/modules/additionalExpenses/registrantTypeSettings.xhtml">
<navigation from-action="#{additionalExpensesAdminManager.newExpense}">
<redirect view-id="/admin/modules/additionalExpenses/editExpense.xhtml"/>
</navigation>
<navigation from-action="#{additionalExpensesAdminManager.newSectionHeader}">
<redirect view-id="/admin/modules/additionalExpenses/editSectionHeader.xhtml"/>
</navigation>
</page>
I could do this:
<pages view-scope="/admin/modules/additionalExpenses/">
<page view-id="registrantTypeSettings.xhtml">
<navigation from-action="#{additionalExpensesAdminManager.newExpense}">
<redirect view-id="editExpense.xhtml"/>
</navigation>
<navigation from-action="#{additionalExpensesAdminManager.newSectionHeader}">
<redirect view-id="editSectionHeader.xhtml"/>
</navigation>
</page>
</pages>
It would be best if <pages> could be nested in other <pages>, but there are probably some other ramifications of that, so maybe it'd be better to introduce another element. Maybe <view-scope> or something.
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-1990) Reloading app causes IllegalStateException when passivating session objects
by Matt Drees (JIRA)
Reloading app causes IllegalStateException when passivating session objects
---------------------------------------------------------------------------
Key: JBSEAM-1990
URL: http://jira.jboss.com/jira/browse/JBSEAM-1990
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.0.CR1
Environment: Tomcat 5.5
Reporter: Matt Drees
Priority: Minor
I haven't tested in other appservers.
Reloading the Hibernate example causes the following stacktrace:
Sep 26, 2007 9:15:37 PM org.apache.catalina.session.StandardSession passivate
SEVERE: Session attribute event listener threw exception
java.lang.IllegalStateException: Attempted to invoke a Seam component outside the an initialized application
at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
at org.jboss.seam.contexts.Lifecycle.beginCall(Lifecycle.java:84)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:113)
at org.jboss.seam.intercept.RootInterceptor.invokeAndHandle(RootInterceptor.java:84)
at org.jboss.seam.intercept.JavaBeanInterceptor.callPrePassivate(JavaBeanInterceptor.java:135)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:77)
at org.jboss.seam.example.hibernate.HotelSearchingAction_$$_javassist_2.sessionWillPassivate(HotelSearchingAction_$$_javassist_2.java)
at org.apache.catalina.session.StandardSession.passivate(StandardSession.java:764)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:515)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:666)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4345)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2984)
at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:906)
at org.apache.catalina.manager.HTMLManagerServlet.reload(HTMLManagerServlet.java:473)
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2694) QuartzDispatcher and ClassNotFoundException
by Markus Heidt (JIRA)
QuartzDispatcher and ClassNotFoundException
---------------------------------------------
Key: JBSEAM-2694
URL: http://jira.jboss.com/jira/browse/JBSEAM-2694
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Environment: AS 4.2.1
Reporter: Markus Heidt
Error Message after startup of JBoss AS
***********************
21:16:01,118 ERROR [ErrorLogger] Job (DEFAULT.-6ad11a7d:1185c88089f:-7f8e threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception.
[See nested exception: org.jboss.seam.InstantiationException:
Could not instantiate Seam component: danteUsersRetriever]
at org.quartz.core.JobRunShell.run(JobRunShell.java:214)
...
Caused by: javax.naming.CommunicationException
[Root
exception is java.lang.ClassNotFoundException:
No ClassLoaders found for: org.domain.QuartzTest.session.DanteUsersRetriever
(no security manager: RMI class loader disabled)]
**********************
Reproducible:
* Create new seam project
* change components.xml:
***********************
<components
...
xmlns:async="http://jboss.com/products/seam/async"
...
xsi:schemaLocation=
"...http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.0.xsd...
>
<async:quartz-dispatcher/>
***********************
* Add two classes
DanteUsersTimer.java
***********************
package org.domain.QuartzTest.session;
import org.jboss.annotation.ejb.Local;
@Local
public interface DanteUsersTimer {
public void start() throws Exception;
public void cancel();
public void stop();
}
***********************
DanteUsersTimerBean.java
***********************
package org.domain.QuartzTest.session;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.async.CronSchedule;
import org.jboss.seam.async.QuartzDispatcher;
import org.jboss.seam.async.QuartzTriggerHandle;
import org.jboss.seam.log.Log;
@Name("danteUsersTimer")
@Scope(ScopeType.APPLICATION)
@Startup
public class DanteUsersTimerBean implements DanteUsersTimer {
private static final String defaultTrigger = "1 * * * * ?"; //every minute
@Logger private Log log;
private QuartzTriggerHandle handle;
private String trigger = defaultTrigger;
@Observer("org.jboss.seam.postInitialization")
public void start() throws Exception{
setTrigger(defaultTrigger);
}
public void restoreDefault(){
setTrigger(defaultTrigger);
}
public void setTrigger(String trigger){
try{
QuartzTriggerHandle handle = QuartzDispatcher.instance().scheduleTimedEvent("retrieveDanteUsers",
new CronSchedule((Long) null, trigger));
if (this.handle != null)
this.handle.cancel();
this.handle = handle;
this.trigger = trigger;
}
catch (Exception e){
log.error("setTrigger(): #0", e, trigger);
}
}
public String getTrigger(){
return trigger;
}
public void cancel(){
try{
if (handle != null)
handle.cancel();
handle = null;
trigger = null;
}
catch (Exception e){
log.error("cancel(): #0", e, trigger);
}
}
@Destroy
public void stop(){
cancel();
}
}
***********************
DanteUsersRetriever.java
***********************
package com.dai.dante_tscm.session.users;
import org.jboss.annotation.ejb.Local;
@Local
public interface DanteUsersRetriever {
public void retrieve();
}
***********************
DanteUsersRetrieverBean.java
***********************
package com.dai.dante_tscm.session.users;
import javax.ejb.Stateless;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.log.Log;
@Name("danteUsersRetriever")
@Stateless
public class DanteUsersRetrieverBean implements DanteUsersRetriever{
@Logger private Log log;
@Observer("retrieveDanteUsers")
public void retrieve() {
log.info("retrieve dante users");
}
}
***********************
--
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, 10 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2331) EntityHome throws "EntityManager is closed" when app marked <distributable/>
by Chris Fraser (JIRA)
EntityHome throws "EntityManager is closed" when app marked <distributable/>
----------------------------------------------------------------------------
Key: JBSEAM-2331
URL: http://jira.jboss.com/jira/browse/JBSEAM-2331
Project: JBoss Seam
Issue Type: Bug
Reporter: Chris Fraser
Attachments: WidgetHome.java
Please see my forum post for details on this matter: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=124779
Attached to this ticket is the source for my WidgetHome EntityHome class. I can upload additional files from the project if that will help, but this can be easily recreated by seam-genning a new project, and generating entities from a DB that's got a single table (Widget) with 2 columns (widgetId, widgetName). Once that's done, drop my WidgetHome in place of the seam-genned one, mark the app <distributable/> in web.xml, build/deploy/run the app and you'll see the problem when you create/update a widget.
If this is not a bug, then it would at least be nice to have some best practices documented for using EntityHomes (and, as it turns out, EntityQuerys) in an application that has been marked <distributable/>.
--
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, 10 months