Erro deploying application

UI Components for JSF
Post Reply
underscore.ex
Posts: 3
Joined: 17 May 2016, 04:54

15 Jun 2016, 07:41

I am trying to deploy a PrimeFaces5, Spring-Data, MongoDB application remote Wildfly9.0.2 server and I am running into following exception

Code: Select all

    2016-06-15 01:14:44,841 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit.fitbit-client.INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit.fitbit-client.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "fitbit-client"
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
    	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0008: Failed to load annotated class: beans.FitbitAuth
    	at org.jboss.as.jsf.deployment.JSFAnnotationProcessor.deploy(JSFAnnotationProcessor.java:115)
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
    	... 5 more
    
    2016-06-15 01:14:44,842 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-2) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "fitbit-client")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.fitbit-client.INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.fitbit-client.INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment \"fitbit-client\"
        Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJSF0008: Failed to load annotated class: beans.FitbitAuth"}}
the same project when deployed at local WildFly9.0.2 is working fine.

Here is how my FitbitAuth.java

Code: Select all

@Component
@ManagedBean
@SessionScoped
public class FitbitAuth implements Serializable {
    Logger logger = Logger.getLogger(FitbitAuth.class.getName());

    @Autowired
    private FitbitConfiguration fitbitConfiguration;

    @Autowired
    private UserTokenService userTokenService;

    private String code;
    private String clientJson;

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return this.code;
    }

    public void onLoad() throws IOException {
        apacheMethod();
    }

    public String getClientJson(){
        return clientJson;
    }
    ...
}

Here is my application-context.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mongo="http://www.springframework.org/schema/data/mongo"
       xmlns:task="http://www.springframework.org/schema/task"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
	http://www.springframework.org/schema/data/mongo
	http://www.springframework.org/schema/data/mongo/spring-mongo-1.4.xsd
	http://www.springframework.org/schema/data/repository
	http://www.springframework.org/schema/data/repository/spring-repository-1.7.xsd
	http://www.springframework.org/schema/context
	http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd">

    <context:property-placeholder location="classpath:mongo.properties" order="1" ignore-unresolvable="true"/>
    <context:property-placeholder location="classpath:fitbit.properties" order="2" ignore-unresolvable="true"/>

    <context:annotation-config/>
    <context:component-scan base-package="beans, repository.Impl, service.Impl, scheduler"/>

    <mongo:repositories base-package="repository.Impl"/>

    <mongo:db-factory host="${mongo.host}" port="${mongo.port}"
                      dbname="${mongo.dbname}" />

    <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
        <constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/>
    </bean>

    <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>

    <task:annotation-driven/>
    <bean id="retrieveDataScheduler" class="scheduler.RetrieveDataScheduler"/>
</beans>
and here is my faces-config.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<faces-config 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-facesconfig_2_2.xsd"
              version="2.2">

    <application>
        <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
    </application>

</faces-config>

Here is my POM

Code: Select all

<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">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.upwork.underscoreex</groupId>
    <artifactId>fitbit-client</artifactId>
    <packaging>war</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>fitbit-client</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <springframework.version>4.0.2.RELEASE</springframework.version>
        <spring-data-mongodb.version>1.4.2.RELEASE</spring-data-mongodb.version>
    </properties>

    <repositories>
        <repository>
            <id>primefaces-repository</id>
            <name>Primefaces repository</name>
            <url>http://repository.primefaces.org</url>
        </repository>

    </repositories>

    <dependencies>

        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>5.3</version>
        </dependency>

        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.2.12</version>
        </dependency>

        <dependency>
            <artifactId>spring-core</artifactId>
            <groupId>org.springframework</groupId>
            <version>${springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-mongodb</artifactId>
            <version>${spring-data-mongodb.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>spring-aop</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-context</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-core</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-beans</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-orm</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-tx</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${springframework.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.4</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.12</version>
        </dependency>


        <!-- Should be deleted once we move to JBoss -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.2.9</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.1</version>
        </dependency>

    </dependencies>

    <build>
        <finalName>fitbit-client</finalName>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
Last edited by underscore.ex on 17 Jun 2016, 00:26, edited 1 time in total.

underscore.ex
Posts: 3
Joined: 17 May 2016, 04:54

16 Jun 2016, 01:18

bump ...

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

16 Jun 2016, 10:02

http://forum.primefaces.org/viewtopic.php?f=3&t=1194

Can't see any which is related to PF.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

16 Jun 2016, 11:23

Off Topic: I see @Component AND @ManagedBean.... WRONG...

underscore.ex
Posts: 3
Joined: 17 May 2016, 04:54

17 Jun 2016, 00:25

kukeltje wrote:Off Topic: I see @Component AND @ManagedBean.... WRONG...
what do you mean being wrong ? I am trying to learn while working on this project, so would appreciate if you could point out what is wrong.

I personally believe that it should be either @Component or @ManagedBean not both ... but right now i am trying to solve other issue

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

17 Jun 2016, 11:25

underscore.ex wrote:
kukeltje wrote:Off Topic: I see @Component AND @ManagedBean.... WRONG...
what do you mean being wrong ? I am trying to learn while working on this project, so would appreciate if you could point out what is wrong.

I personally believe that it should be either @Component or @ManagedBean not both ... but right now i am trying to solve other issue
This is not related to PrimeFaces so we are unlikely to be able to help you.
Don't bump posts, ever. If people can answer and help they generally will. Bumping is against the forum rules.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests