[JBoss-dev] Classloader violation richfaces3.3 and JBoss 5.1.0
by Kenneth Rene Sanchez
Hi
I have a big problem using richfaces-3.3.0 with JBoss 5.1.0.GA.
I had a EAR (prueba.ear) that run perfect in JBoss-4.2.0.GA but when I run
the same ear in jboss-5.1.0.GA the error is:
java.lang.LinkageError: Class org/richfaces/component/html/HtmlPanelMenu
violates loader constraints
- prueba.ear was generated using seam-2.1.2
- I copy the three jar of richfaces (api,impl,ui) to server/default/lib
The objective of application is to generate a dynamic menu. The classes are:
Menu.class
…
[View More]----------
package com.mydomain.prueba.action;
import javax.ejb.Local;
import org.richfaces.component.UIPanelMenu;
@Local
public interface Menu {
public UIPanelMenu getMenuSistemas();
}
MenuEJB.class
-------------
package com.mydomain.prueba.action;
import javax.ejb.Stateless;
import org.jboss.seam.annotations.Name;
import org.richfaces.component.UIPanelMenu;
import org.richfaces.component.UIPanelMenuGroup;
import org.richfaces.component.UIPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenu;
import org.richfaces.component.html.HtmlPanelMenuGroup;
import org.richfaces.component.html.HtmlPanelMenuItem;
@Stateless
@Name("Menu")
public class MenuEJB implements Menu {
private UIPanelMenu menuSistemas;
private UIPanelMenuGroup grupo;
private UIPanelMenuItem opcion;
public UIPanelMenu getMenuSistemas() {
try {
this.menuSistemas = new HtmlPanelMenu();
this.grupo = new HtmlPanelMenuGroup();
this.grupo.setId("Sistema");
this.grupo.setLabel("Grupo");
this.opcion = new HtmlPanelMenuItem();
this.opcion.setId("rol");
this.opcion.setLabel("Opcion");
this.grupo.getChildren().add(this.opcion);
this.menuSistemas.getChildren().add(this.grupo);
} catch (Exception e) {
System.out.println("Error creando el menu: " + e.toString());
}
return this.menuSistemas;
}
}
And in the page I write this:
<rich:panelMenu
binding="#{Menu.menuSistemas}"
style="width:100%"
mode="ajax" iconExpandedGroup="disc" iconCollapsedGroup="disc"
iconExpandedTopGroup="chevronUp" iconGroupTopPosition="right"
iconCollapsedTopGroup="chevronDown" iconCollapsedTopPosition="right">
</rich:panelMenu>
The configurations file are the same that seam create.
The error is:
-------------
javax.el.ELException: /menuSistemas.xhtml @29,73
binding="#{CrearMenu.menuSistemas}": Error reading 'menuSistemas' on type
org.javassist.tmp.java.lang.Object_$$_javassist_seam_3
The stack trace is:
-------------------
javax.faces.FacesException: javax.el.ELException: /menuSistemas.xhtml @29,73
binding="#{CrearMenu.menuSistemas}": Error reading 'menuSistemas' on type
org.javassist.tmp.java.lang.Object_$$_javassist_seam_3
at
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:257)
at
org.jboss.seam.jsf.SeamApplication.createComponent(SeamApplication.java:394)
at
com.sun.facelets.tag.jsf.ComponentHandler.createComponent(ComponentHandler.java:224)
at
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:139)
at
com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
at
com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:314)
at
com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)
at
com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
at
com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
at
com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:524)
at
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
at
org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
at
org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.ELException: /menuSistemas.xhtml @29,73
binding="#{CrearMenu.menuSistemas}": Error reading 'menuSistemas' on type
org.javassist.tmp.java.lang.Object_$$_javassist_seam_3
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:246)
... 61 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
at
org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:43)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
at
org.javassist.tmp.java.lang.Object_$$_javassist_seam_3.getMenuSistemas(Object_$$_javassist_seam_3.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:62)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
at
com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at
org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
... 62 more
Caused by: java.lang.LinkageError: Class
org/richfaces/component/html/HtmlPanelMenu violates loader constraints
at $Proxy409.getMenuSistemas(Unknown Source)
... 88 more
Please help me!
Thanks
--
View this message in context: http://www.nabble.com/Classloader-violation-richfaces3.3-and-JBoss-5.1.0-...
Sent from the JBoss - Dev mailing list archive at Nabble.com.
[View Less]
15 years, 7 months
[JBoss-dev] exception handling richfaces
by hrbaer
Hi everybody,
I already startet a thread in the general J2EE part of this forum, but I
think this would be the better place to discuss my problem.
So just a short description what I'm handling with:
I don't know how to handle Exceptions thrown during the buisiness layer (or
maybe because of a wrong hibernate mapping). So right know I'm throwing a
NullPointerException from a method in a service class.
On possibility (but no elegant one) is to surround every method in every
managed bean to …
[View More]catch those exceptions and handle it somehow.
But what I'm looking for is a possibility to declare only one
ExceptionHandler. I already searched for some extensions for my deployment
descriptor but found nothing.
Then I thougt I could extend my Servlet Mapping but this class is final.
Last but not least I added my own phase tracker and tryed to catch every
Exception during the afterPhase of the INVOKE_ALLICATION (Phase 5). In fact
I reach this method but the catch block don't get invoked :(
Does somebody has an idea to handle this issue?
Thanks in advance!
--
View this message in context: http://www.nabble.com/exception-handling-richfaces-tp24804003p24804003.html
Sent from the JBoss - Dev mailing list archive at Nabble.com.
[View Less]
15 years, 7 months
Trunk does not build?
by Alessio Soldano
Hi,
after cleaning up my local m2 repository, I currently see failure in
building AS trunk, something wrong on our m2 repo?
(See also: http://jbossws.jboss.org:8180/hudson/job/AS-6.0.0/43/console)
[INFO]
------------------------------------------------------------------------
[INFO] Building JBoss Application Server Client POM
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [buildnumber:create {execution: set-build-…
[View More]properties}]
[INFO] [build-helper:maven-version {execution: default}]
Downloading:
http://snapshots.jboss.org/maven2/org/jboss/jbossas/jboss-as-main/6.0.0-S...
Downloading:
http://repository.apache.org/snapshots/org/jboss/jbossas/jboss-as-main/6....
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.jboss.jbossas:jboss-as-main:jar:client:6.0.0-SNAPSHOT
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.jboss.jbossas
-DartifactId=jboss-as-main -Dversion=6.0.0-SNAPSHOT -Dclassifier=client
-Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file
there:
mvn deploy:deploy-file -DgroupId=org.jboss.jbossas
-DartifactId=jboss-as-main -Dversion=6.0.0-SNAPSHOT -Dclassifier=client
-Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.jboss.jbossas:jboss-as-client:pom:6.0.0-SNAPSHOT
2) org.jboss.jbossas:jboss-as-main:jar:client:6.0.0-SNAPSHOT
----------
1 required artifact is missing.
for artifact:
org.jboss.jbossas:jboss-as-client:pom:6.0.0-SNAPSHOT
--
Alessio Soldano
Web Service Lead, JBoss
[View Less]
15 years, 7 months
Changes to AS build in trunk
by Paul Gier
I have refactored the AS 6 build so that the thirdparty pom is no longer needed.
The thirdparty pom has now been replaced by two poms. The first one is in
the build directory and contains module dependencies and anything else included
in the AS distribution. The second pom is a new pom in the testsuite directory
and it contains dependencies that are only used in the testsuite.
The thirdparty pom should now be considered deprecated, and I will remove the
thirdparty directory in trunk …
[View More]after a little more testing. If you want to
add/update dependencies in the AS, here is how to do it.
Add a new dependency just to the distribution
---------------------------------------------
1. add/update the dependency in component-matrix/pom.xml
2. add/update the dependency in build/pom.xml
3. the Ant build can then reference the dependency with the format:
${groupId:artifactId:[classifier:]type}
Add/update a dependency used only in the testsuite
--------------------------------------------------
1. add/update the dependency in component-matrix/pom.xml
2. add/update the dependency in testsuite/pom.xml
3. the Ant testsuite build can then reference the dependency with the format:
${groupId:artifactId:[classifier:]type}
Add/update a module dependency
------------------------------
1. add/update the dependency in component-matrix
2. add/update the dependency in the module pom
I will also add this information to the wiki [1] when clearspace starts working
for me again.
[1]http://www.jboss.org/community/wiki/jbossasbuild
[View Less]
15 years, 7 months
SecurityManager
by Emmanuel Bernard
I'm making Hibernate Validator SecurityManager friendly. I have a few
question wrt Java security.
I have been told to wrap any reflection call into
AccessController.doPrivileged
so that if HV is granted reflection privilege, the SM won't complain.
Now I do not want to wrap all my reflection calls into
AccessController.doPrivileged
Here are my questions:
- how do I know that a SecurityManager as been activated?
It seems to me that System.getSecurityManager() != null does the
trick
…
[View More] - how "slow" is this AccessController.doPrivileged wrapping in
practice?
- does JBoss use a SM OOTB?
Thanks
Emmanuel
[View Less]
15 years, 7 months