[
https://issues.jboss.org/browse/JBSEAM-4893?page=com.atlassian.jira.plugi...
]
John Gilbert updated JBSEAM-4893:
---------------------------------
Description:
The attached maven project has a test case. The jsf12 profile works, but the jsf2 profile
does not work.
The first problem is simple. The FaceletsRenderer in seam-ui-jsf2 still has a dependency
on "com.sun.facelets.Facelet" instead of
"com.sun.faces.facelets.Facelet". So you have to include the old
com.sun.facelets:jsf-facelets jar or the FaceletsRenderer will not be initialized and you
get a NPE:
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.mock.AbstractSeamTest$Request.getRenderedMailMessage(AbstractSeamTest.java:810)
{code}
Once past the first issue, the next issue is that the
ApplicationAssociate.getCurrentInstance() is not initialized in the AbstractSeamTest
container, so another NPE is thrown.
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.ui.facelet.FaceletCompiler.initializeCompiler(FaceletCompiler.java:46)
at org.jboss.seam.ui.facelet.FaceletCompiler.create(FaceletCompiler.java:38)
{code}
I'm not sure how to resolve this issue. I tried the following code, but no luck.
{code}
protected void initializeCompiler(com.sun.faces.facelets.compiler.Compiler c)
{
if (ApplicationAssociate.getCurrentInstance() != null) {
this.compiler = ApplicationAssociate.getCurrentInstance().getCompiler();
} else {
// load decorators
// String decParam = webConfig
// .getOptionValue(FaceletsDecorators);
// if (decParam != null) {
// decParam = decParam.trim();
// String[] decs = Util.split(decParam, ";");
// TagDecorator decObj;
// for (String decorator : decs) {
// try {
// decObj = (TagDecorator) ReflectionUtil.forName(decorator)
// .newInstance();
// c.addTagDecorator(decObj);
//
// } catch (Exception e) {
// }
// }
// }
c.addTagLibrary(new CoreLibrary());
c.addTagLibrary(new HtmlLibrary());
c.addTagLibrary(new UILibrary());
c.addTagLibrary(new JstlCoreLibrary());
c.addTagLibrary(new FunctionLibrary(JstlFunction.class,
"http://java.sun.com/jsp/jstl/functions"));
c.addTagLibrary(new CompositeLibrary());
}
}
{code}
More info is available in the pom.
was:
The attached maven project has a test case. The jsf12 profile works, but the jsf2 profile
does not work.
The first problem is simple. The FaceletsRenderer in seam-ui-jsf2 still has a dependency
on "com.sun.facelets.Facelet" instead of
"com.sun.faces.facelets.Facelet". So you have to include the old
com.sun.facelets:jsf-facelets jar or the render will not be initialized and you get a
NPE:
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.mock.AbstractSeamTest$Request.getRenderedMailMessage(AbstractSeamTest.java:810)
{code}
Once past the first issue, the next issue is that the
ApplicationAssociate.getCurrentInstance() is not initialized in the AbstractSeamTest
container, so another NPE is thrown.
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.ui.facelet.FaceletCompiler.initializeCompiler(FaceletCompiler.java:46)
at org.jboss.seam.ui.facelet.FaceletCompiler.create(FaceletCompiler.java:38)
{code}
I'm not sure how to resolve this issue. I tried the following code, but no luck.
{code}
protected void initializeCompiler(com.sun.faces.facelets.compiler.Compiler c)
{
if (ApplicationAssociate.getCurrentInstance() != null) {
this.compiler = ApplicationAssociate.getCurrentInstance().getCompiler();
} else {
// load decorators
// String decParam = webConfig
// .getOptionValue(FaceletsDecorators);
// if (decParam != null) {
// decParam = decParam.trim();
// String[] decs = Util.split(decParam, ";");
// TagDecorator decObj;
// for (String decorator : decs) {
// try {
// decObj = (TagDecorator) ReflectionUtil.forName(decorator)
// .newInstance();
// c.addTagDecorator(decObj);
//
// } catch (Exception e) {
// }
// }
// }
c.addTagLibrary(new CoreLibrary());
c.addTagLibrary(new HtmlLibrary());
c.addTagLibrary(new UILibrary());
c.addTagLibrary(new JstlCoreLibrary());
c.addTagLibrary(new FunctionLibrary(JstlFunction.class,
"http://java.sun.com/jsp/jstl/functions"));
c.addTagLibrary(new CompositeLibrary());
}
}
{code}
More info is available in the pom.
Seam Mail does not work in JSF 2.0
----------------------------------
Key: JBSEAM-4893
URL:
https://issues.jboss.org/browse/JBSEAM-4893
Project: Seam 2
Issue Type: Bug
Components: Mail
Affects Versions: 2.3.0.ALPHA
Reporter: John Gilbert
Assignee: Pete Muir
Attachments: seam-mail-test.zip
The attached maven project has a test case. The jsf12 profile works, but the jsf2 profile
does not work.
The first problem is simple. The FaceletsRenderer in seam-ui-jsf2 still has a dependency
on "com.sun.facelets.Facelet" instead of
"com.sun.faces.facelets.Facelet". So you have to include the old
com.sun.facelets:jsf-facelets jar or the FaceletsRenderer will not be initialized and you
get a NPE:
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.mock.AbstractSeamTest$Request.getRenderedMailMessage(AbstractSeamTest.java:810)
{code}
Once past the first issue, the next issue is that the
ApplicationAssociate.getCurrentInstance() is not initialized in the AbstractSeamTest
container, so another NPE is thrown.
{code}
Caused by: java.lang.NullPointerException
at
org.jboss.seam.ui.facelet.FaceletCompiler.initializeCompiler(FaceletCompiler.java:46)
at org.jboss.seam.ui.facelet.FaceletCompiler.create(FaceletCompiler.java:38)
{code}
I'm not sure how to resolve this issue. I tried the following code, but no luck.
{code}
protected void initializeCompiler(com.sun.faces.facelets.compiler.Compiler c)
{
if (ApplicationAssociate.getCurrentInstance() != null) {
this.compiler = ApplicationAssociate.getCurrentInstance().getCompiler();
} else {
// load decorators
// String decParam = webConfig
// .getOptionValue(FaceletsDecorators);
// if (decParam != null) {
// decParam = decParam.trim();
// String[] decs = Util.split(decParam, ";");
// TagDecorator decObj;
// for (String decorator : decs) {
// try {
// decObj = (TagDecorator) ReflectionUtil.forName(decorator)
// .newInstance();
// c.addTagDecorator(decObj);
//
// } catch (Exception e) {
// }
// }
// }
c.addTagLibrary(new CoreLibrary());
c.addTagLibrary(new HtmlLibrary());
c.addTagLibrary(new UILibrary());
c.addTagLibrary(new JstlCoreLibrary());
c.addTagLibrary(new FunctionLibrary(JstlFunction.class,
"http://java.sun.com/jsp/jstl/functions"));
c.addTagLibrary(new CompositeLibrary());
}
}
{code}
More info is available in the pom.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira