icefaces 4.0 + wildfly 8.2 final + прицел Maven не работает

Я пытаюсь использовать icefaces 4.0 и последнюю версию wildfly. Но не работает вот мой код:

и я работаю с jdk 8

пом.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-       instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.mycompany</groupId>
<artifactId>mavenproject1</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>mavenproject1</name>

<properties>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces</artifactId>
        <version>4.0.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-ace</artifactId>
        <version>4.0.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <compilerArguments>
                    <endorseddirs>${endorsed.dir}</endorseddirs>
                </compilerArguments>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
                <archive>
                    <manifestEntries>
                        <Dependencies>org.icefaces, org.icefaces.ace</Dependencies>
                    </manifestEntries>
                </archive>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.6</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>copy</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${endorsed.dir}</outputDirectory>
                        <silent>true</silent>
                        <artifactItems>
                            <artifactItem>
                                <groupId>javax</groupId>
                                <artifactId>javaee-endorsed-api</artifactId>
                                <version>7.0</version>
                                <type>jar</type>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

welcomIceFaces

<?xml version='1.0' encoding='UTF-8' ?>
<!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:ace="http://www.icefaces.org/icefaces/components">
<h:head>
    <title>ICEfaces Welcome Page</title>
    <!-- This line is only for ICE component, remove it if no ice component is used in this page.-->
    <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
</h:head>
<h:body>
    <h:form>

        <ace:panel header="Welcome to ICEfaces">
            <h:panelGrid columns="1">
                <!-- NOTICE -To run this page you must have also ICEfaces ACE components library on your classpath (project dependencies). -->
                <ace:linkButton id="linkButton1" value="ICEfaces Overview" href="http://wiki.icesoft.org/display/ICE/ICEfaces+Overview"></ace:linkButton>
                <ace:linkButton id="linkButton2" value="General Documentation" href="http://wiki.icesoft.org/display/ICE/ICEfaces+Documentation"></ace:linkButton>
                <ace:linkButton id="linkButton3" value="ICEfaces Demos" href="http://www.icesoft.org/demos/icefaces-demos.jsf"></ace:linkButton>
                <ace:linkButton id="linkButton4" value="Tutorials" href="http://www.icesoft.org/community/tutorials-samples.jsf"></ace:linkButton>
                <ace:linkButton id="linkButton5" value="ACE components" href="http://wiki.icesoft.org/display/ICE/ACE+Components"></ace:linkButton>
                <ace:linkButton id="linkButton6" value="ICE components" href="http://wiki.icesoft.org/display/ICE/ICE+Components"></ace:linkButton>
                <!-- You can also use ICE components. Adds ICE namespace in that case: xmlns:ice="http://www.icesoft.com/icefaces/component" -->
                <!-- <ice:outputLink id="aceLink" value="http://wiki.icesoft.org/display/ICE/ACE+Components" target="_blank">ACE components</ice:outputLink> -->
                <!-- <ice:outputLink id="iceLink" value="http://wiki.icesoft.org/display/ICE/ICE+Components" target="_blank">ICE components</ice:outputLink> -->
            </h:panelGrid>
        </ace:panel>

    </h:form>
</h:body>

im getting this error in the browser x 6times in the same page

Предупреждение. Эта страница требует пространства имен XML http://www.icefaces.org/icefaces/components. объявлен с префиксом ace, но для этого пространства имен не существует библиотеки тегов.

хорошо, это предупреждение, но оно не отображает компоненты ace.

Я уже добавил модули на сервер и все файлы module.xml

<module xmlns="urn:jboss:module:1.3" name="org.icefaces">
<resources>
    <resource-root path="icefaces-4.0.0.jar"/>
</resources>

<dependencies>
    <module name="javax.faces.api"/>        
<module name="org.w3c.dom"/>
</dependencies>

and this

<module xmlns="urn:jboss:module:1.3" name="org.icefaces.ace">
<resources>
    <resource-root path="icefaces-ace-4.0.0.jar"/>
</resources>

<dependencies>
    <module name="javax.faces.api"/>        
<module name="org.icefaces"/>
</dependencies>

the server show this:

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed   in 8.0
20:40:32,339 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
20:40:32,471 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
20:40:32,514 INFO  [org.jboss.as] (MSC service thread 1-5) JBAS015899: WildFly 8.2.0.Final "Tweek" starting
20:40:33,112 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
20:40:33,126 INFO  [org.xnio] (MSC service thread 1-14) XNIO version 3.3.0.Final
20:40:33,133 INFO  [org.xnio.nio] (MSC service thread 1-14) XNIO NIO Implementation Version 3.3.0.Final
20:40:33,147 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.
20:40:33,152 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]
20:40:33,155 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
20:40:33,155 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem
20:40:33,156 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem
20:40:33,157 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
20:40:33,167 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
20:40:33,174 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013170: Current PicketBox version=4.0.21.Final
20:40:33,182 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-7) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)
20:40:33,193 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.1.0.Final starting
20:40:33,194 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-13) JBAS017502: Undertow 1.1.0.Final starting
20:40:33,200 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-9) JBAS015400: Bound mail session [java:jboss/mail/Default]
20:40:33,201 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: Starting Naming Service
 20:40:33,206 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
20:40:33,209 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-15) JBAS010417: Started Driver service with driver-name = h2
20:40:33,218 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.3)
20:40:33,219 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010417: Started Driver service with driver-name = postgresql
20:40:33,273 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path C:\software\wildfly-8.2.0.Final/welcome-content
20:40:33,358 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-10) JBAS017525: Started server default-server.
20:40:33,370 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-10) JBAS017531: Host default-host starting
20:40:33,372 INFO  [org.jboss.remoting] (MSC service thread 1-14) JBoss Remoting version 4.0.6.Final
20:40:33,386 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 3.0)
20:40:33,388 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-16) JBAS010417: Started Driver service with driver-name = sqlserver2008
20:40:33,395 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
20:40:33,396 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010417: Started Driver service with driver-name = mySQL
20:40:33,404 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-15) JBAS017519: Undertow HTTP listener default listening on /127.0.0.1:8080
20:40:33,480 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012:    Started FileSystemDeploymentService for directory C:\software\wildfly-   8.2.0.Final\standalone\deployments
20:40:33,483 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
20:40:33,484 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/co.com.stratigeek.stork.datosDS]
20:40:33,485 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/co.com.dideweb.hyla.ventas.datos.datosDS]
20:40:33,486 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "mavenproject1-1.0-SNAPSHOT.war" (runtime-name: "mavenproject1-1.0-SNAPSHOT.war")
20:40:33,601 INFO  [org.jboss.ws.common.management] (MSC service thread 1-15) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final
20:40:33,812 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-8) Inicializando Mojarra 2.2.8-jbossorg-1 20140822-1131 para el contexto '/mavenproject1-1.0-SNAPSHOT'
20:40:34,103 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017534: Registered web context: /mavenproject1-1.0-SNAPSHOT
20:40:34,126 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS018559: Deployed "mavenproject1-1.0-SNAPSHOT.war" (runtime-name : "mavenproject1-1.0-SNAPSHOT.war")
20:40:34,399 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
20:40:34,400 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
20:40:34,400 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.0.Final "Tweek" started in 2245ms - Started 266 of 321 services (92 services are lazy, passive or on-demand)    

муравей это файл конфигурации лиц

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
    <param-value>true</param-value>
</context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>

any idea?? Please help. the app is just to make work the ace components with maven and wilfly. Has some body an example working, please share.


person nsanchezb    schedule 01.01.2015    source источник
comment
Эти журналы сервера нигде не создают уровень журнала SEVERE. Предупреждение. Эта страница вызывает пространство имен XML http://www.icefaces.org/icefaces/components, объявленное с префиксом ace, но для этого пространства имен не существует библиотеки тегов. Хотя в pom.xml есть зависимость от Maven, вы случайно не забыли добавить библиотеку IceFaces в путь к классу? Это не следует воспринимать легкомысленно, как вы сказали, хорошо, это предупреждение, но оно не отображает компоненты ace.   -  person Tiny    schedule 01.01.2015


Ответы (2)


В JBoss/Wildfly библиотеки тегов сканируются, только если они появляются в банке внутри WEB-INF/lib или определены в tld под WEB-INF.

Это поведение было изменено в версии 8.2, см. механизм загрузки библиотек тегов из модуля

Возможное решение - добавить в jboss-deployment-structure.xml в приложении что-то вроде этого:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
  <deployment>
    <module name="my.module.that.has.tlds" export="true" meta-inf="export"/>
  </deployment>
</jboss-deployment-structure>

См. также: Загрузка классов в WildFly


Обновление:

Чтобы использовать ICEfaces в качестве модуля JBoss, вам необходимо:

Сначала создайте модуль (в моем тесте я создал только один модуль):

<module xmlns="urn:jboss:module:1.3" name="org.icefaces">
    <resources>
        <resource-root path="icefaces.jar"/>
        <resource-root path="icefaces-ace.jar"/>
    </resources>

    <dependencies>
        <module name="javax.faces.api"/>        
        <module name="javax.api"/>
    </dependencies>
</module>

Во-вторых, добавьте в свой веб-проект в каталог WEB-INF файл jboss-deployment-structure.xml со следующим содержимым:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <dependencies>
            <module name="org.icefaces" export="true" meta-inf="export"/>
        </dependencies>
    </deployment>
</jboss-deployment-structure>
person Federico Sierra    schedule 02.01.2015
comment
хорошо, правильно, но какую библиотеку вы собираетесь добавить? Я думаю, что уже делаю это‹plugin› ‹groupId›org.apache.maven.plugins‹/groupId› ‹artifactId›maven-war-plugin‹/artifactId› ‹version›2.3‹/version› ‹configuration› ‹failOnMissingWebXml›false ‹/failOnMissingWebXml› ‹archive› ‹manifestEntries› ‹Dependencies›org.icefaces, org.icefaces.ace‹/Dependencies› ‹/manifestEntries› ‹/archive› ‹/configuration› ‹/plugin› - person nsanchezb; 03.01.2015
comment
@nsanchezb проверьте мое обновление, я добавляю конкретный пример для вашей проблемы. - person Federico Sierra; 04.01.2015
comment
Так что мне не нужно добавлять ледяные лица в мой pom.xml? - person Johnny2012; 01.09.2015
comment
@ Johnny2012 Да, вы можете добавить, но с заданной областью - person Federico Sierra; 01.09.2015

Попробуйте добавить параметр meta-inf в заголовки Dependencies:manifest, см. Загрузка классов в WildFly для получения подробной информации.

Между прочим, я бы сказал, что пытаться установить ICEfaces как модуль означает делать это трудным путем. Что плохого в том, чтобы просто включить необходимые библиотеки в ваш WAR как обычную зависимость области действия compile или runtime?

person Harald Wellmann    schedule 01.01.2015
comment
При компиляции в pom я получаю еще одну ошибку, stackoverflow.com/questions/22726308/ кажется, что WildFly уже поставляется с реализацией JSF, и если я разверну ее с приложением в icefaces я получаю эту ошибку. Тег с именем inputFile из пространства имен EEROR: xmlns.jcp.org/jsf/html имеет значение null класс-обработчик определен - person nsanchezb; 03.01.2015