我正在使用eclipse helio启动一个项目,它包含多个自定义jsf组件;该项目内置于一个jar中,并在Web项目中实现。 我正在试验faces-config元素的一些问题;现在我有两个组成部分:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<component>
<component-type>com.mycompany.firstComponent.type</component-type>
<component-class>com.mycompany.FirstComponent</component-class>
</component>
<component>
<component-type>com.mycompany.secondComponent.type</component-type>
<component-class>com.mycompany.SeconsComponent</component-class>
</component>
<render-kit>
<renderer>
<component-family>com.mycompany.firstComponent.family</component-family>
<renderer-class>com.mycompany.firstComponentRenderer</renderer-class>
<renderer-type>com.mycompany.firstComponent.type</renderer-type>
</renderer>
<renderer>
<component-family>com.mycompany.secondComponent.family</component-family>
<renderer-class>com.mycompany.secondComponentRenderer</renderer-class>
<renderer-type>com.mycompany.secondComponent.type</renderer-type>
</renderer>
</render-kit>
</faces-config>
这是正确的语法? 我把jar放在调用者应用程序的WEB-INF / lib中,但是当我在render-kit部分中有多个“renderer”元素时,当我启动jboss(4.2.3)时,我有错误:
23:43:19,415 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.appender.FileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
23:43:19,415 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
23:43:19,415 ERROR [STDERR] log4j:ERROR [WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
java.net.FactoryURLClassLoader@54d05e46
] whereas object of type
23:43:19,415 ERROR [STDERR] log4j:ERROR "org.jboss.logging.appender.FileAppender" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@4139eeda].
23:43:19,416 ERROR [STDERR] log4j:ERROR Could not instantiate appender named "FILE".
23:43:19,766 ERROR [STDERR] java.lang.IllegalStateException: No application context active
23:43:19,767 ERROR [STDERR] at org.jboss.seam.Component.forName(Component.java:1799)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1849)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1844)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1821)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1816)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.core.ResourceLoader.instance(ResourceLoader.java:97)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.core.SeamResourceBundle.loadBundlesForCurrentLocale(SeamResourceBundle.java:58)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.core.SeamResourceBundle.getBundlesForCurrentLocale(SeamResourceBundle.java:48)
23:43:19,767 ERROR [STDERR] at org.jboss.seam.core.SeamResourceBundle.handleGetObject(SeamResourceBundle.java:107)
23:43:19,767 ERROR [STDERR] at java.util.ResourceBundle.getObject(Unknown Source)
23:43:19,767 ERROR [STDERR] at java.util.ResourceBundle.getString(Unknown Source)
23:43:19,767 ERROR [STDERR] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:151)
23:43:19,767 ERROR [STDERR] at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
23:43:19,767 ERROR [STDERR] at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
23:43:19,767 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1013)
23:43:19,767 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1073)
23:43:19,767 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:493)
23:43:19,767 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
23:43:19,767 ERROR [STDERR] at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
23:43:19,767 ERROR [STDERR] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
23:43:19,767 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
23:43:19,767 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
23:43:19,767 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
23:43:19,767 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
23:43:19,767 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:43:19,767 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
23:43:19,767 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,767 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,767 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,768 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
23:43:19,768 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:43:19,768 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,768 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
23:43:19,768 ERROR [STDERR] at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
23:43:19,768 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
23:43:19,768 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
23:43:19,768 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
23:43:19,768 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
23:43:19,768 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
23:43:19,768 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,768 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,768 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
23:43:19,768 ERROR [STDERR] at $Proxy0.start(Unknown Source)
23:43:19,768 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
23:43:19,768 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
23:43:19,768 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,769 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
23:43:19,769 ERROR [STDERR] at $Proxy44.start(Unknown Source)
23:43:19,769 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
23:43:19,769 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:43:19,769 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
23:43:19,769 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,769 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
23:43:19,769 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
23:43:19,769 ERROR [STDERR] at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,769 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
23:43:19,769 ERROR [STDERR] at $Proxy45.start(Unknown Source)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
23:43:19,769 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
23:43:19,770 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
23:43:19,770 ERROR [STDERR] at $Proxy9.deploy(Unknown Source)
23:43:19,770 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
23:43:19,770 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
23:43:19,770 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
23:43:19,770 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
23:43:19,770 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
23:43:19,770 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
23:43:19,770 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,770 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
23:43:19,770 ERROR [STDERR] at $Proxy0.start(Unknown Source)
23:43:19,770 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
23:43:19,770 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,770 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
23:43:19,771 ERROR [STDERR] at $Proxy4.start(Unknown Source)
23:43:19,771 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
23:43:19,771 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
23:43:19,771 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
23:43:19,771 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
23:43:19,771 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
23:43:19,771 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23:43:19,771 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
23:43:19,771 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
23:43:19,771 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
23:43:19,771 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
23:43:19,771 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
23:43:19,771 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
23:43:19,771 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
23:43:19,771 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
23:43:19,771 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:508)
23:43:19,771 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
任何人都可以帮助我吗?
答案 0 :(得分:0)
您是否在faces-config中看到了第二个组件的输入错误? 塞康* 取值 *元件。