[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2938) org.jboss.seam.util.XML doesn't validate
by Christian Bauer (JIRA)
org.jboss.seam.util.XML doesn't validate
----------------------------------------
Key: JBSEAM-2938
URL: http://jira.jboss.com/jira/browse/JBSEAM-2938
Project: Seam
Issue Type: Bug
Components: Core
Reporter: Christian Bauer
Assigned To: Norman Richards
Priority: Minor
The getRootElement() method is probably supposed to validate the XML file. However, it only sets a DTD EntityResolver:
SAXReader saxReader = new SAXReader();
saxReader.setEntityResolver(new DTDEntityResolver());
saxReader.setMergeAdjacentText(true);
return saxReader.read(stream).getRootElement();
This might trigger some magic flag that says "validate against this DTD", but the dom4j documentation says otherwise: http://www.dom4j.org/faq.html#how-validate
I've implemented my own routine which validates against my schema properly:
try {
SAXReader saxReader = new SAXReader();
if (isSchemaValidating()) {
saxReader.setEntityResolver(new DTDEntityResolver());
saxReader.setValidation(true);
saxReader.setFeature("http://apache.org/xml/features/validation/schema",true);
}
saxReader.setMergeAdjacentText(true);
elements.put(fileInputStream.getKey(), saxReader.read(fileInputStream.getValue()).getRootElement());
} catch (DocumentException dex) {
Throwable nested = dex.getNestedException();
if (nested != null) {
if (nested instanceof FileNotFoundException) {
throw new RuntimeException(
"Can't find schema/DTD reference for file: "
+ fileInputStream.getKey() + "': "
+ nested.getMessage(), dex
);
} else if (nested instanceof UnknownHostException) {
throw new RuntimeException(
"Cannot connect to host from schema/DTD reference: "
+ nested.getMessage()
+ " - check that your schema/DTD reference is current", dex
);
}
}
throw new RuntimeException("Could not parse XML file: " + fileInputStream.getKey() ,dex);
} catch (Exception ex) {
throw new RuntimeException("Could not parse XML file: " + fileInputStream.getKey() ,ex);
}
I can use that with the classpath:// feature of the DTDEntityResolver (which is the same as in Hibernate):
<?xml version="1.0" encoding="UTF-8"?>
<plugin key="hw" label="Hello World"
xmlns="http://jboss.com/products/seam/wiki/plugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://jboss.com/products/seam/wiki/plugin classpath://org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd">
...
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2301) JBoss EL bug handling overloaded methods with varargs mixed in
by Matthew Lieder (JIRA)
JBoss EL bug handling overloaded methods with varargs mixed in
--------------------------------------------------------------
Key: JBSEAM-2301
URL: http://jira.jboss.com/jira/browse/JBSEAM-2301
Project: JBoss Seam
Issue Type: Bug
Components: EL
Affects Versions: 2.0.0.GA
Reporter: Matthew Lieder
Doing facesMessages.add("Message") from an EL expression doesn't work, complaining about the String class not being compatible with the FacesMessage class. The problem is caused by a combination of two things:
1. There are two FacesMessages.add(...) that can accept one parameter: add(FacesMessage facesMessage) and add(String messageTemplate, Object... params)
2. The FacesMessages.add(...) that accepts a String as the first parameter can optionally accept additional parameters through a vararg
If only one of those was the case, it'd work fine. However, having both at the same time triggers the error.
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2514) EntityQuery can't be used in PAGE Scope
by Martin Hoffmann (JIRA)
EntityQuery can't be used in PAGE Scope
---------------------------------------
Key: JBSEAM-2514
URL: http://jira.jboss.com/jira/browse/JBSEAM-2514
Project: JBoss Seam
Issue Type: Feature Request
Components: Framework
Affects Versions: 2.0.0.GA
Environment: Seam 2.0.0.GA, JBoss AS 4.2.2.GA
Reporter: Martin Hoffmann
Priority: Optional
The EntityHome is not able to operate in PAGE scope and the documentation says nothing about compatible scopes and framework classes.
It throws an exeption:
aused by: javax.el.ELException: /client/claim_list.xhtml @16,52 value="#{testList.dataModel}": Error reading 'dataModel' on type de.iseki.garantieext.card.Test
List_$$_javassist_0
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.ja
va:76)
at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
... 69 more
Caused by: java.lang.IllegalStateException: EntityManager is closed
at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java
:42)
--
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, 8 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2231) Setup wizard for wiki
by Christian Bauer (JIRA)
Setup wizard for wiki
---------------------
Key: JBSEAM-2231
URL: http://jira.jboss.com/jira/browse/JBSEAM-2231
Project: JBoss Seam
Issue Type: Feature Request
Components: Wiki
Reporter: Christian Bauer
Assigned To: Christian Bauer
Write a setup wizard that replaces the manual wiki-data.sql editing and import. We should have the following setup procedure:
- Get the recommended environment ready (JBoss AS, MySQL)
- Deploy the wiki-ddl.sql on a new database
- Deploy the wiki.war on the appserver
- Open http://server/wiki/ and go through the setup wizard
The wizard will first import the minimum dataset (guest/admin users, roles, start page) and then ask the usual setup questions (site base URL, etc.). Depending on the future of the plugin API, it could also optionally allow you to configure some plugin defaults so you don't have to go into the Admin screen to change them after the install. Also, we can offer prepackaged datasets for certain use cases that can be imported with the wizard, e.g. "Help Documents", "Blog Website", "Forum Website".
--
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, 8 months