Erro Maven3 + Jboss as 7.1.1

87 views
Skip to first unread message

Carlos Barbosa Gomes Filho

unread,
Aug 28, 2013, 12:49:49 PM8/28/13
to ce...@googlegroups.com
Boa tarde pessoal,

Gostaria de uma ajudinha em um problema que estou passando com o maven3 e o Jboss 7.1.1 As.
É o seguinte, quero subir minha app com o comando mvn jboss-as:deploy -Dhost=localhost -Dport=9999

No entanto, o seguinte erro é lançado pra mim:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy
 (default-cli) on project sin-ear: Could not execute goal deploy on C:\workspace\sigcod\sigcod-e
ar\target\sigcod-ear.ear. Reason: Error could not execute operation '{
[ERROR] "address" => [],
[ERROR] "operation" => "read-attribute",
[ERROR] "name" => "launch-type"
[ERROR] }'. java.net.ConnectException: JBAS012144: NÒo foi possÝvel conectar-se ao remote:
//localhost:9999. A conexÒo entrou em intervalo
[ERROR] -> [Help 1]

Os comandos que executei e funcionaram pefeitamente.
    mvn clean
    mvn install
    mvn package

--
Att,

Carlos B. Gomes Filho
Desenvolvedor Java Senior.
Analista de Sistemas - Indra Politec
Secretaria do Estado da Receita - PB

Marcelo Rebouças

unread,
Aug 28, 2013, 7:52:47 PM8/28/13
to ce...@googlegroups.com
Carlos, o servidor encontra-se em sua máquina em está remoto?


--
Você está recebendo esta mensagem porque se inscreveu no grupo "CEJUG" dos Grupos do Google.
Para cancelar a inscrição neste grupo e parar de receber seus e-mails, envie um e-mail para cejug+un...@googlegroups.com.
Para postar neste grupo, envie um e-mail para ce...@googlegroups.com.
Visite este grupo em http://groups.google.com/group/cejug.
Para obter mais opções, acesse https://groups.google.com/groups/opt_out.



--
Atenciosamente,

Marcelo Rebouças
(85) 8805-8234
Systems Analyst / Software Developer


"Se está muito difícil de encontrar o caminho, faça-o"

Carlos Barbosa Gomes Filho

unread,
Aug 28, 2013, 7:57:11 PM8/28/13
to ce...@googlegroups.com
Boa noite, Marcel
Amigo está em minha maquina ...localhost.

Maciel Melo

unread,
Aug 30, 2013, 7:37:21 AM8/30/13
to ce...@googlegroups.com

Da uma olhada no pom para confirmar se o plugin esta configurado corretamente, aponta para o server local.

Marcelo Rebouças

unread,
Aug 30, 2013, 8:04:43 AM8/30/13
to ce...@googlegroups.com
Carlos, cara acredita que esqueci de te responder, rsrsr. Vamos lá, verifica se as configurações no pom, assim como citou o Maciel, estão corretas. Você pode estar se baseando nessa configuração do link abaixo:

Marcelo Rebouças

unread,
Aug 30, 2013, 8:05:05 AM8/30/13
to ce...@googlegroups.com

Carlos Barbosa Gomes Filho

unread,
Aug 30, 2013, 8:16:12 AM8/30/13
to ce...@googlegroups.com
Boa dia, amigo


Segue meu pom ... acho que ele está correto ! mas estou dando uma olhada no seu link.

<?xml version="1.0" encoding="UTF-8"?>
<!--
    JBoss, Home of Professional Open Source
    Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
    contributors by the @authors tag. See the copyright.txt in the
    distribution for a full listing of individual contributors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<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/maven-v4_0_0.xsd">
    <name>bancario</name>
    <modelVersion>4.0.0</modelVersion>
    <groupId>bancario</groupId>
    <artifactId>bancario</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <url>http://jboss.org/jbossas</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <distribution>repo</distribution>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>
    <modules>
        <module>ejb</module>
        <module>web</module>
        <module>ear</module>
    </modules>

    <properties>
        <!-- Explicitly declaring the source encoding eliminates the following
            message: -->
        <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
            resources, i.e. build is platform dependent! -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- JBoss dependency versions -->
       
        <version.jboss.maven.plugin>7.3.Final</version.jboss.maven.plugin>

        <!-- Define the version of the JBoss BOMs we want to import to specify tested stacks. -->
        <version.jboss.bom>1.0.7.CR8</version.jboss.bom>
        <!-- Alternatively, comment out the above line, and un-comment the line
            below to use version 1.0.4.Final-redhat-4 which is a release certified to
            work with JBoss EAP 6. It requires you have access to the JBoss EAP 6
            maven repository. -->
        <!-- <version.jboss.bom>1.0.4.Final-redhat-4</version.jboss.bom>> -->

        <version.jboss.as>7.1.1.Final</version.jboss.as>
        <!-- Alternatively, comment out the above line, and un-comment the
            line below to use version 7.2.0.Final-redhat-8 which is a release certified
            to work with JBoss EAP 6. It requires you have access to the JBoss EAP 6
            maven repository. -->
        <!-- <version.jboss.as>7.2.0.Final-redhat-8</version.jboss.as> -->

        <!-- other plugin versions -->
        <version.compiler.plugin>2.3.1</version.compiler.plugin>
        <version.ear.plugin>2.6</version.ear.plugin>
        <version.ejb.plugin>2.3</version.ejb.plugin>
        <version.surefire.plugin>2.10</version.surefire.plugin>
        <version.war.plugin>2.1.1</version.war.plugin>

        <!-- maven-compiler-plugin -->
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.compiler.source>1.6</maven.compiler.source>
    </properties>

    <dependencyManagement>
        <dependencies>

            <!-- Define the version of the EJB jar so that we don't need
                to repeat ourselves in every module -->
            <dependency>
                <groupId>bancario</groupId>
                <artifactId>bancario-ejb</artifactId>
                <version>${project.version}</version>
                <type>ejb</type>
            </dependency>
           
            <!-- Define the version of the WAR so that we don't need to repeat
                ourselves in every module -->
            <dependency>
                <groupId>bancario</groupId>
                <artifactId>bancario-web</artifactId>
                <version>${project.version}</version>
                <type>war</type>
                <scope>compile</scope>
            </dependency>

            <!-- JBoss distributes a complete set of Java EE 6 APIs including
                a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
                a collection) of artifacts. We use this here so that we always get the correct
                versions of artifacts. Here we use the jboss-javaee-6.0-with-tools stack
                (you can read this as the JBoss stack of the Java EE 6 APIs, with some extras
                tools for your project, such as Arquillian for testing) and the jboss-javaee-6.0-with-hibernate
                stack you can read this as the JBoss stack of the Java EE 6 APIs, with extras
                from the Hibernate family of projects) -->
            <dependency>
                <groupId>org.jboss.bom</groupId>
                <artifactId>jboss-javaee-6.0-with-tools</artifactId>
                <version>${version.jboss.bom}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.jboss.bom</groupId>
                <artifactId>jboss-javaee-6.0-with-hibernate</artifactId>
                <version>${version.jboss.bom}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>
   
   

    <build>
        <pluginManagement>
            <plugins>
                <!-- Compiler plugin enforces Java 1.6 compatibility and
                    activates annotation processors -->
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.compiler.plugin}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <target>${maven.compiler.target}</target>
                    </configuration>
                </plugin>
                <!-- The JBoss AS plugin deploys your ear to a local JBoss
                    AS container -->
                <!-- Due to Maven's lack of intelligence with EARs we need
                    to configure the jboss-as maven plugin to skip deployment for all modules.
                    We then enable it specifically in the ear module.
                   
                        <jbossHome>${jboss.home}</jbossHome>
                        <serverName>${jboss.server.name}</serverName>
                        <hostName>${jboss.host.name}</hostName>
                        <port>${jboss.port}</port>
                        <deployUrlPath>${jboss.deploy.url}</deployUrlPath>
                        <undeployUrlPath>${jboss.undeploy.url}</undeployUrlPath>
                        <fileName>${project.build.directory}/${project.build.finalName}.${project.packaging}</fileName>
                          
                          
                        <targetDir>${JBOSS_HOME}/standalone/deployments</targetDir>
                        <hostname>127.0.0.1</hostname>
                           <port>9999</port>
                        <username>carlos</username>
                        <password>@carlos@0001</password>
                        <skip>true</skip>
                                           
                    -->
                <plugin>
                    <groupId>org.jboss.as.plugins</groupId>
                    <artifactId>jboss-as-maven-plugin</artifactId>
                    <version>7.3.Final</version>
                    <inherited>true</inherited>
                    <configuration>
                        <targetDir>${JBOSS_HOME}/standalone/deployments</targetDir>
                        <hostname>127.0.0.1</hostname>
                           <port>9999</port>
                        <username>carlos</username>
                        <password>@carlos@0001</password>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>

Marcos Portela

unread,
Aug 30, 2013, 8:38:44 AM8/30/13
to cejug
Olá Carlos,

1) Verifique se essa porta (9999) está liberada, ou se está em uso por alguma outra aplicação. 
2) Verifique essas credenciais que você colocou:

<username>carlos</username>
<password>@carlos@0001</password>


Se você colocou essas credenciais no seu pom.xml, então você tem que adicionar no JBoss AS 7 um usuário com essas credencias acima.

Espero ter ajudado,
Atenciosamente,
Marcos.
"Porque Deus amou o mundo de tal maneira que deu o seu Filho unigênito, para que todo aquele que nele crê não pereça, mas tenha a vida eterna".(João 3:16).

"Porque Deus enviou o seu Filho ao mundo, não para que condenasse o mundo, mas para que o mundo fosse salvo por ele".(João 3:17).

Carlos Barbosa Gomes Filho

unread,
Aug 30, 2013, 8:42:58 AM8/30/13
to ce...@googlegroups.com
O meu Jboss está configurado com essas credenciais  e a porta não esta sendo ocupada por outro serviço, inclusive já testei outras portas e nada de funcionar ! º O

Marcos Portela

unread,
Aug 30, 2013, 9:01:21 AM8/30/13
to cejug
Olá Carlos, 

Veja a sua configuração no standalone.xml, procure essa seção:


<management-interfaces>
    <native-interface interface="management" port="9999" />
    <http-interface interface="management" port="9990"/>
</management-interfaces>

tente trocar a porta da configuração do plugin no pom.xml para 9990.

Marcelo Rebouças

unread,
Aug 30, 2013, 9:16:04 AM8/30/13
to ce...@googlegroups.com
Carlos, você já configurou suas credenciais dentro do arquivo settings.xml do mavem?

Carlos Barbosa Gomes Filho

unread,
Aug 30, 2013, 9:26:14 AM8/30/13
to ce...@googlegroups.com
Eu troquei a porta para 9990 e ainda persiste o erro ... quanto as credencias dentro do maven eu ainda não fiz mas vou confi. agora pra saber no que vai dá :-)

Marcelo Rebouças

unread,
Aug 30, 2013, 9:37:24 AM8/30/13
to ce...@googlegroups.com
Blz. Não sei exatamente o que pode está havendo ai, mas o maven precisa de credenciais para realizar o deploy da aplicação, é um desses locais é nesse aquivo que citei. Vá até ele: diretório_do_seu_usuario/.m2/settings.xml e tenta configurar as credenciais do servidor. da forma que vai abaixo:

<servers> 
    <server> 
      <id>jboss-snapshots-repository</id> 
      <username>JBoss.org username</username> 
      <password>JBoss.org password</password> 
    </server> 
  </servers> 


Maiores detalhes pode ser vistos nos links abaixo:
https://community.jboss.org/wiki/MavenDeployingASnapshot
http://docs.jboss.org/maven-buildmagic-thirdparty-plugin/examples/example-maven-deploy.html



 

Carlos Barbosa Gomes Filho

unread,
Aug 30, 2013, 9:45:15 AM8/30/13
to ce...@googlegroups.com
É Marcelo, credenciais inclusas e nada ! mesmo erro. (INCRÍVELLLL)
Reply all
Reply to author
Forward
0 new messages