This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSF and the fly likes Classloader violation richfaces3.3 and JBoss 5.1.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Classloader violation richfaces3.3 and JBoss 5.1.0" Watch "Classloader violation richfaces3.3 and JBoss 5.1.0" New topic
Author

Classloader violation richfaces3.3 and JBoss 5.1.0

Kenneth Rene Sanchez Sanchez
Greenhorn

Joined: Jul 10, 2008
Posts: 3
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
----------
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
 
Consider Paul's rocket mass heater.
 
subject: Classloader violation richfaces3.3 and JBoss 5.1.0
 
Similar Threads
hibernate exception thrown from @Factory method
Could not instantiate Seam component: motorcycleCategService Problem
Hibernate: org.hibernate.AssertionFailure: null id don't flush the Session after an exception occurs
Could not instantiate Seam component
SerializationException: could not deserialize