JSF JS2 und Richfaces4

G

Gast2

Gast
Hallo zusammen,

ich versuche gerade Richfaces4 einzubinden. Meine Anwendung läuft auf einem JBoss6.
Wenn ich eine normale jsf ohne richfaces einbinde bekomme ich keine Probleme.

sobald ich aber ein richface tag verwende bekomme ich folgende Fehlermeldung:
Diese 4 jars habe ich im Web-Inf/lib aufgenommen.
richfaces-components-api-4.0.0.Final.jar
richfaces-components-ui-4.0.0.Final.jar
richfaces-core-api-4.0.0.Final.jar
richfaces-core-impl-4.0.0.Final.jar

[XML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich>

<h:form>
<rich:panel>
<h:panelGrid columns="2">
Hallo
<h:eek:utputText value="Hi"/>
</rich:panel>
</h:form>

</html>
[/XML]

Java:
DEPLOYMENTS IN ERROR:
  Deployment "PostEjbJarMetadataDeployer" is in error due to the following reason(s): java.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;

	at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
	at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
	at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
	at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
	at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
	at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
	at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
	at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]

10:01:24,765 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
10:01:24,765 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
10:01:24,765 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 50s:812ms
10:01:46,811 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/xJBoss6].[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception: java.lang.IllegalArgumentException: null source
	at java.util.EventObject.<init>(EventObject.java:38) [:1.6.0_18]
	at javax.faces.event.SystemEvent.<init>(SystemEvent.java:67) [:2.0.3-]
	at javax.faces.event.ComponentSystemEvent.<init>(ComponentSystemEvent.java:69) [:2.0.3-]
	at javax.faces.event.PostRestoreStateEvent.<init>(PostRestoreStateEvent.java:69) [:2.0.3-]
	at com.sun.faces.lifecycle.RestoreViewPhase.deliverPostRestoreStateEvent(RestoreViewPhase.java:256) [:2.0.3-]
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:245) [:2.0.3-]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-]
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107) [:2.0.3-]
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
	at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]
 

JimPanse

Bekanntes Mitglied
Ich habe zwar noch nicht mit Richfaces4 gearbeitet aber eine ähnliche Fehlermeldung bei PrimeFaces + Jsf 2.0 erhalten. Es fehlt denke ich mal (das war bei mir die Lösung das h:head-tag -> weil die Libs versuchen ihre Resourcen in den header zu schreiben, fehlt das Tag ist es auch nicht im Komponentenbaum vorhanden)
Code:
       <h:head>

	</h:head>

	<!-- Define the body content  -->
	<h:body>
         <h:form></h:form>
       </h:body>
 
G

Gast2

Gast
Daran lag es nicht.

EDIT:
War ein Bug im Eclipse Plugin
"Error installing to Instantiated"... - JBoss Community

Jetzt hab ich zwar meine Richfaces eingebunden. Aber angezeigt wird nichts.

Hab mir mal den Slider vorgenommen
6.11.8.* < rich:inputNumberSlider > available since 3.0.0

Eigentluich nicht so schwer
[XML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">

<p>Here is an example of default inputNumberSlider:</p>

<rich:inputNumberSlider value="50" />

<p>Here is "minimalistic" example:</p>

<rich:inputNumberSlider value="50" minValue="1" maxValue="100" showInput="false"
enableManualInput="false" showBoundaryValues="false"
showTooltip="false" />

<p>Another variation of input:</p>

<rich:inputNumberSlider value="500" width="500" maxValue="1000"
step="50" showArrows="true" showTooltip="false" />

<p>The same variant but the control is disabled:</p>

<rich:inputNumberSlider value="500" width="500" maxValue="1000"
step="50" showArrows="true" showTooltip="false" disabled="true" />

</ui:composition>


[/XML]
 

Anhänge

  • slider.JPG
    slider.JPG
    13,6 KB · Aufrufe: 43
Zuletzt bearbeitet von einem Moderator:
S

Sym

Gast
Rufst Du die Seite direkt auf?

Ich habe eine index.jsp, welche ich in der web.xml als welcome-file eingebunden habe.

Java:
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head></head>
	<body>
		<jsp:forward page="/pages/login.jsf" />
	</body>
</html>

Somit wird jede Anfrage an das JSF-Servlet geleitet.
 
Zuletzt bearbeitet von einem Moderator:
G

Gast2

Gast
okay werde ich es mal so versuchen,

ich hab direkt immer die xhtml augerufen, aber halt mit jsf Endung deshalb sollte eigentlich die weiterleitung auch funktionieren, oder?
 
G

Gast2

Gast
Sagt jemand diese Fehlermeldung was??

Java:
12:01:20,465 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/xJSF].[FacesServlet]] Servlet.service() for servlet FacesServlet threw exception: javax.faces.application.ViewExpiredException: viewId:/index.jsf - Ansicht /index.jsf konnte nicht wiederhergestellt werden.
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:195) [:2.0.3-]
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97) [:2.0.3-]
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107) [:2.0.3-]
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114) [:2.0.3-]
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308) [:2.0.3-]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
	at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.0.0.Final]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
	at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

EDIT:
Also die index.xhtml wird jetzt in richfaces angezeigt, aber sobald ich eine seite weiter gehe ist alles wieder beim alten
index.xhtml
[XML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">

<h:head>
<title>Rich Faces 4</title>
</h:head>

<h:body>
<h:form>
<rich:panel>
<h:commandButton value="Welcome" action="pages/welcome.xhtml"/>
<h:commandLink action="pages/slider" value="Go to Slider"/>
</rich:panel>
</h:form>
</h:body>
</html>
[/XML]
 
Zuletzt bearbeitet von einem Moderator:

TheCritter

Aktives Mitglied
Wird das auch dann richtig in Eclipse angezeigt wenn du da aktuallisierst? Ich hatte mal den Fall das Eclipse da komisch gecachet hatte.
 
G

Gast2

Gast
Wird das auch dann richtig in Eclipse angezeigt wenn du da aktuallisierst? Ich hatte mal den Fall das Eclipse da komisch gecachet hatte.

Also die 1. Seite wird im Eclipse Web-Browser richtig angezeigt mit richfaces blueSky, aber sobal ich auf die nächste Seite gehe ist es wieder weg oder die slider.xhtml sieht genau so aus wie vorher okay wie oben genannt wenn ich den h:head tag habe dann funktionieren die richfaces...

komisch nur dass bei den beispielen das auch nicht dabei ist^^...
 
Zuletzt bearbeitet von einem Moderator:
G

Gast2

Gast
Die Fehlermeldung nervt schon wenn die nur ab und zu kommt. Naja irgendwie alles bissl komisch mit dem richfaces
 

Neue Themen


Oben