[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3856) seam-gen projects on windows "ant validate" fails
by Jay Balunas (JIRA)
seam-gen projects on windows "ant validate" fails
-------------------------------------------------
Key: JBSEAM-3856
URL: https://jira.jboss.org/jira/browse/JBSEAM-3856
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Environment: Windows XP
JDK 5
Reporter: Jay Balunas
Assignee: Dan Allen
Fix For: 2.1.2.CR1
Create a seam-gen EAR project on a windows machine. Within the projects directory execute "ant validate" and on a windows machine you will see the exception below. I did not see this on OS X. Note that this is seen with a space in the path, and without. Also the output is ugly, but this is how it was displayed.
validate:
[mkdir] Created dir: C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\exploded-archives\schemas
[unjar] Expanding: C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\lib\jboss-seam.jar into C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\exploded-archives\schemas
validateConfiguration:
[validateConfiguration] C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\exploded-archives\seamGenEar.ear\META-INF\application.xml:1:1: http://www.w3.org/TR/xml-schema-1#SchemaLocation? http://jboss.com/products/seam/async C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/async-2.1.xsd http://jboss.com/products/seam/bpm C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/bpm-2.1.xsd http://jboss.com/products/se
am/components C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/components-2.1.xsd http://jboss.com/products/seam/core C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/core-2.1.xsd http://jboss.com/products/seam/drools C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/drools-2.1.xsd http://jboss.com/products/seam/framework C:\dev\projects\seam\2.1.1.GA\seam gen\seamGe
nEar/exploded-archives/schemas/org/jboss/seam/framework-2.1.xsd http://jboss.com/products/seam/international C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/international-2.1.xsd http://jboss.com/products/seam/jms C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/jms-2.1.xsd http://jboss.com/products/seam/mail C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/mail-2.
1.xsd http://jboss.com/products/seam/navigation C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/navigation-2.1.xsd http://jboss.com/products/seam/pageflow C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/pageflow-2.1.xsd http://jboss.com/products/seam/pages C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/pages-2.1.xsd http://jboss.com/products/seam/pdf C:\dev\pr
ojects\seam\2.1.1.GA\seam gen\seamGenEar/src/pdf/org/jboss/seam/pdf/pdf-2.1.xsd http://jboss.com/products/seam/persistence C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/persistence-2.1.xsd http://jboss.com/products/seam/remoting C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/remoting-2.1.xsd http://jboss.com/products/seam/security C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/sche
mas/org/jboss/seam/security-2.1.xsd http://jboss.com/products/seam/theme C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/theme-2.1.xsd http://jboss.com/products/seam/transaction C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/transaction-2.1.xsd http://jboss.com/products/seam/web C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar/exploded-archives/schemas/org/jboss/seam/web-2.1.xsd
[validateConfiguration] http://java.sun.com/xml/ns/javaee/javaee_5.xsd:83:57: schema_reference.4: Failed to read schema document 'http://www.w3.org/2001/xml.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
[validateConfiguration] http://java.sun.com/xml/ns/javaee/javaee_5.xsd:141:33: src-resolve: Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component.
[validateConfiguration] http://java.sun.com/xml/ns/javaee/javaee_5.xsd:141:33: s4s-elt-invalid-content.1: The content of 'descriptionType' is invalid. Element 'attribute' is invalid, misplaced, or occurs too often.
[validateConfiguration] http://java.sun.com/xml/ns/javaee/javaee_5.xsd:188:33: s4s-elt-invalid-content.1: The content of 'display-nameType' is invalid. Element 'attribute' is invalid, misplaced, or occurs too often.
[validateConfiguration] http://java.sun.com/xml/ns/javaee/javaee_5.xsd:689:36: s4s-elt-invalid-content.1: The content of 'iconType' is invalid. Element 'attribute' is invalid, misplaced, or occurs too often.
BUILD FAILED
C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\build.xml:444: The following error occurred while executing this line:
C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\validate.xml:51: C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar\exploded-archives\seamGenEar.ear\META-INF\application.xml is not a valid XML document.
Total time: 24 seconds
C:\dev\projects\seam\2.1.1.GA\seam gen\seamGenEar>
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2519) SeamTest class does not support dependent testing
by Olivier Thierry (JIRA)
SeamTest class does not support dependent testing
-------------------------------------------------
Key: JBSEAM-2519
URL: http://jira.jboss.com/jira/browse/JBSEAM-2519
Project: JBoss Seam
Issue Type: Bug
Components: Test Harness
Affects Versions: 2.0.1.CR1, 2.0.0.GA
Environment: Seam 2.0.0.GA + TestNG 5.1 + Maven Surefire plugin
Reporter: Olivier Thierry
When you use dependent testing in a test class extending SeamTest, either with dependsOnGroups or dependsOnMethods, the test crash on begin phase with the following stack trace :
begin(fr.myCompany.test.ServiceOrganisationTest) Time elapsed: 0.126 sec <<< FAILURE!
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.beginSession(Lifecycle.java:169)
at org.jboss.seam.contexts.ServletLifecycle.beginSession(ServletLifecycle.java:124)
at org.jboss.seam.mock.BaseSeamTest.begin(BaseSeamTest.java:920)
at org.jboss.seam.mock.SeamTest.begin(SeamTest.java:28)
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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:322)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:156)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:365)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:114)
at org.testng.TestRunner.privateRun(TestRunner.java:693)
at org.testng.TestRunner.run(TestRunner.java:574)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:241)
at org.testng.SuiteRunner.run(SuiteRunner.java:145)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:901)
at org.testng.TestNG.runSuitesLocally(TestNG.java:863)
at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:69)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:78)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
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.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:308)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
--
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
14 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2346) s:selectItems - noSelectionLabel is not hidden after first selection of a value
by Wolfgang Schwendt (JIRA)
s:selectItems - noSelectionLabel is not hidden after first selection of a value
-------------------------------------------------------------------------------
Key: JBSEAM-2346
URL: http://jira.jboss.com/jira/browse/JBSEAM-2346
Project: JBoss Seam
Issue Type: Bug
Environment: CVS-based Seam 2.0.1
Reporter: Wolfgang Schwendt
Priority: Minor
<s:selectItems> offers that the user can specify an (optional) "noSelectionLabel" to be placed at the top of the selection list. It further provides a hideNoSelectionLabel option -- if this property is true, the noSelectionLabel will be hidden when a value is selected.
And exactly the latter functionality has a bug, but only as far as the user's FIRST selection is concerned. When the users makes his _first_ selection and submits the form, then the noSelectionLabel is still displayed when the page is redisplayed by the server, no matter whether or not hideNoSelection was set to "true". However, when the users makes additional requests, the hideNoSelectionLabel functionality works correctly.
Reason for the bug: caching behavior of org.jboss.seam.ui.component.UISelectItems.getValue()
Too understand why there is a bug, consider the following scenario:
A page with <h:selectOneMenu> and <s:selectItems var="myVar" label="#{myVar.name}" value="#{resultList}" noSelectionLabel="* Your choice please *" hideNoSelectionLabel="true"/> as its child component.
When the user makes a selection and submits the form, the UISelectOne components checks during the "Process validations" JSF phase whether the submitted input value matches one of the available options (SelectItems). Consequently, the UISelectOne component calls the getValue() method of its org.jboss.seam.ui.component.UISelectItems child component in order to retrieve a list of SelectItem s. Then, if if validation was successful because a matching value was found, the user's selection is either written to the model (during JSF Update model phase) or if we don't make it to the Update model phase, because some other component had a validation error, the user's selection is stored in the value property of the UISelectOne component.
When we finally reach the "Render response" phase and the same page should be redisplayed, the UISelectOne component gets rendered again. In order to render the selection list items, org.jboss.seam.ui.component.UISelectItems.getValue() gets called another time.
But now it doesn't re-calculate its list of SelectItems. Take a look at the code:
org.jboss.seam.ui.component.UISelectItems.getValue()
@Override
public Object getValue()
{
if (value == null || originalValue == null || !originalValue.equals(super.getValue()))
{ ...
}
return value;
}
Note that "value" is not null, because during "Process validations" org.jboss.seam.ui.component.UISelectItems.getValue() was already called which lead to value being set. Therefore, getValue() returns the OLD cached list of SelectItem s, which was calculated during Process Validations and therefore still includes the noSelectionLabel! And therefore getValue() doesn't take into account that the user made a selection and that the noSelectionLabel should now be hidden.
--
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
14 years, 11 months