Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSF-Questions problem with executing JSF file(Build failed)
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


B.sucharitha
problem with executing JSF file(Build failed)
2 Answer(s)      3 years and 4 months ago
Posted in : Java Server Faces Questions


*while executing below code i am getting problem as
**init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Created dir: /root/NetBeansProjects/JSFProject3/build/generated/src
Created dir: /root/NetBeansProjects/JSFProject3/build/generated/classes
Compiling 1 source file to /root/NetBeansProjects/JSFProject3/build/generated/classes
In-place deployment at /root/NetBeansProjects/JSFProject3/build/web
deploy?config=file%3A%2Ftmp%2Fcontext443.xml&path=/JSFProject3
FAIL - Deployed application at context path /JSFProject3 but context failed to start
/root/NetBeansProjects/JSFProject3/nbproject/build-impl.xml:594: The module has not been deployed.
BUILD FAILED (total time: 9 seconds)***

Please any one give me solution for this?

**strong text**resources of application are:

    login.jsp:

    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <html>
        <body>
            <f:view>
                <h:form id="loginfrm">
                    <h:outputLabel value="username : "/>
                    <h:inputText id="uname" value="#{login_bean.uname}"></h:inputText>
                    <h:outputLabel value="password : "/>
                    <h:inputText id="pwd" value="#{login_bean.pwd}" required="true"></h:inputText>
                    <h:commandButton value="Login" action="#{login_bean.validate}" type="submit"/>
                    <h:message for="uname" />
                    <h:message for="pwd" />
                </h:form>
            </f:view>

        </body>
    </html>


 // LoginBean.java

    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package beans;

    /**
     *
     * @author root
     */
    import java.sql.*;
    import java.io.*;

    public class LoginBean {

        private String uname;
        private String pwd;
        Connection con = null;
        ResultSet rs = null;

        Statement st = null;

        public void setPwd(String pwd) {
            this.pwd = pwd;
        }

        public void setUname(String uname) {
            this.uname = uname;
        }

        public String getPwd() {
            return pwd;
        }

        public String getUname() {
            return uname;
        }

        public String validate() {
            boolean b = false;
            try {
                System.out.println("uname::" + uname);
                Class.forName("com.mysql.jdbc.Driver");
                con = DriverManager.getConnection("jdbc:mysql://localhost:3306/livepbx", "root", "worksmart");
                st = con.createStatement();
                String qry = "select agentid from agent where agentid = 'abcd@pbxtesting'";
                rs = st.executeQuery(qry);
                while (rs.next()) {
                    b = true;
                }

            } catch (Exception e) {
               // System.out.println("ERRor in Logbeanpage@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@s");
            } finally {
                try {
                    rs.close();
                    st.close();
                    con.close();
                } catch (Exception e) {
                    //e.printStackTrace();
                }



            }
            if (b) {
                return "valid";
            } else {
                return "invalid";
            }



        }
    }

    success.jsp 

    <%-- 
        Document   : success
        Created on : Jun 25, 2011, 11:17:08 AM
        Author     : root
    --%>

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <%
    String val=request.getParameter("val");
    out.println("value in success pageis ::"+val);
    %>

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1>valid successfully</h1>
        </body>
    </html>

   // failure.jsp 


    <%-- 
        Document   : failure
        Created on : Jun 25, 2011, 11:17:37 AM
        Author     : root
    --%>

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd">
    <%
    String val=request.getParameter("val");
    out.println("value in failurepage is ::"+val);
    %>

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>JSP Page</title>
        </head>
        <body>
            <h1>in valid credentials</h1>
        </body>
    </html>


  // faces-config.xml

    <?xml version="1.0"?>
    <faces-config>

    <managed-bean>
       <description>TreeDemo</description>
       <managed-bean-name>treeDemo</managed-bean-name>
      <managed-bean-class>
      beans.TreeDemo
      </managed-bean-class>
      <managed-bean-scope>
      request
      </managed-bean-scope>
    </managed-bean>
    <managed-bean>
       <description>CCBean</description>
       <managed-bean-name>newfile</managed-bean-name>
      <managed-bean-class>
     beans.CCBean
      </managed-bean-class>
      <managed-bean-scope>
      request
      </managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>login_bean</managed-bean-name>
        <managed-bean-class>beans.LoginBean</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
     <navigation-rule>
                <description>Loging Page</description>
                <from-view-id>/login.jsp</from-view-id>
                <navigation-case>
                        <from-action>#{login_bean.validate}</from-action>
                    <from-outcome>valid</from-outcome>
                    <to-view-id>/success.jsp?val=yes</to-view-id>
                </navigation-case>
                <navigation-case>
                    <from-action>#{login_bean.validate}</from-action>
                    <from-outcome>invalid</from-outcome>
                    <to-view-id>/failure.jsp?val=no</to-view-id>
                </navigation-case>

            </navigation-rule>

    </faces-config>

   // web.xml 

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 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-app_2_5.xsd">
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/faces-config.xml</param-value>
        </context-param>
        <listener>
            <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
        </listener>
        <servlet>
            <servlet-name>Rcfaces Framework Contents</servlet-name>
            <servlet-class>org.rcfaces.renderkit.html.internal.resource.ResourcesServlet</servlet-class>
            <init-param>
                <param-name>org.rcfaces.renderkit.html.javascript.sets.CORE</param-name>
                <param-value>
                    basicComponent,message,extraButton,tree,dataGrid
                </param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>
                Rcfaces Application Contents
            </servlet-name>
            <servlet-class>
                org.rcfaces.core.internal.contentStorage.ContentStorageServlet
            </servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet>
            <servlet-name>Serv</servlet-name>
            <servlet-class>beans.Serv</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>
                Rcfaces Framework Contents
            </servlet-name>
            <url-pattern>/rcfaces/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>
                Rcfaces Application Contents
            </servlet-name>
            <url-pattern>/rc-content/*</url-pattern>
        </servlet-mapping>
        <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>
        <servlet-mapping>
            <servlet-name>Serv</servlet-name>
            <url-pattern>/Serv</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>faces/SampleTree.jsp</welcome-file>
        </welcome-file-list>

    </web-app>


  // context.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Context antiJARLocking="true" path="/JSFProject3"/>

Advertisement
View Answers

June 28, 2011 at 12:43 PM


Check your xml files.Anyways, go through the following link:

JSF Tutorials



June 28, 2011 at 3:18 PM


The below is complete stack trace while running above JSF application:

----------

**strong text**JSFProject3(run)
______________
Incrementally deploying http://localhost:8083/JSFProject3
Completed incremental distribution of http://localhost:8083/JSFProject3
Incrementally redeploying http://localhost:8083/JSFProject3
Deploy is in progress...
deploy?config=file%3A%2Ftmp%2Fcontext448.xml&path=/JSFProject3
FAIL - Deployed application at context path /JSFProject3 but context failed to start
/root/NetBeansProjects/JSFProject3/nbproject/build-impl.xml:594: The module has not been deployed.
BUILD FAILED (total time: 5 seconds)


----------


**Tomcat 6.0JSf**
_____________
Listening for transport dt_socket at address: 11550
Jun 28, 2011 12:55:34 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.5.0_08/jre/lib/i386/server:/usr/java/jdk1.5.0_08/jre/lib/i386:/usr/java/jdk1.5.0_08/jre/../lib/i386:/usr/java/jdk1.5.0_08/jre/lib/i386/client:/usr/java/jdk1.5.0_08/jre/lib/i386:/usr/java/jdk1.5.0_08/jre/../lib/i386
Jun 28, 2011 12:55:34 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8083
Jun 28, 2011 12:55:34 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1154 ms
Jun 28, 2011 12:55:35 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 28, 2011 12:55:35 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Jun 28, 2011 12:55:37 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8083
Jun 28, 2011 12:55:38 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 28, 2011 12:55:38 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/261  config=null
Jun 28, 2011 12:55:38 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3683 ms
Jun 28, 2011 12:55:42 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
Jun 28, 2011 12:55:43 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/JSFProject3'
Jun 28, 2011 12:55:44 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 28, 2011 12:55:44 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/JSFProject3] startup failed due to previous errors
Jun 28, 2011 3:26:47 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/JSFProject3] has not been started
Jun 28, 2011 3:26:47 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/JSFProject3]
Jun 28, 2011 3:26:48 PM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
Jun 28, 2011 3:26:49 PM com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/JSFProject3'
Jun 28, 2011 3:26:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 28, 2011 3:26:51 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/JSFProject3] startup failed due to previous errors


Related Tutorials/Questions & Answers:
problem with executing JSF file(Build failed)
problem with executing JSF file(Build failed)  *while executing below... deployed. BUILD FAILED (total time: 9 seconds)*** Please any one give me solution... deployed. BUILD FAILED (total time: 5 seconds) Tomcat 6.0JSf Listening
Problem in executing query....
Problem in executing query....  Suppose there is a textbox or a text... it is showing error because of the '.I understand where the problem is.If the user does not enter ' then there is no problem while executing.But suppose the user
Advertisements
Executing JAR file - Swing AWT
Manifest.txt secl/*.class and my jar file is created. But there is a problem, when...Executing JAR file  Hello Friends! I have successfully created the JAR file of my project with the Manifest File including my Main
Problem in executing macro enabled excel sheet using java
Problem in executing macro enabled excel sheet using java  Hi, I have written a java code which will read a excel sheet with macro enabled... to execute VB script it is unable to execute macro and cannot generate the script file
maven build failed
maven build failed  Hi, I have downloaded the maven 3.0.4 and extracted it.and I have seted the path correctly. I am following steps from this url. http://www.roseindia.net/maven2/installingandgettinghandson
maven build failed
maven 3.0.4 build failed  Hi, I have downloaded the maven 3.0.4 and extracted it.and I have seted the path correctly. I am following steps from this url. http://www.roseindia.net/maven2/installingandgettinghandson
executing a batch file which depends on jar files from a system tray but console should not display.
executing a batch file which depends on jar files from a system tray... to run a batch file which is depending on some jar files and it displays a frame... in a system tray. Please help me in resolving this problem. Am not receiving
jsf image problem - Java Server Faces Questions
jsf image problem  Dear Sir My doubt is about displAying a java.awt.image in the jsf page. Here i had a object of java.awt.image in manage bean i want to display that image contained in that object to the jsf page.This
MySQL server PID file could not be found! [FAILED]
MySQL server PID file could not be found! [FAILED]  MySQL server PID file could not be found! [FAILED
Problem reading word file
Problem reading word file  Deepak you provide me code for extarcting equation from a word file and also to write in a word file.But when I again want to read preveously created word file(created by your code) it gives an error
File Uploading Problem
File Uploading Problem  I have a file uploading code but it create problem $(document).ready(function(){ $('#upload').click(function(){ var... it gives the problem org.apache.commons.fileupload.FileUploadException
File Uploading Problem
File Uploading Problem  I have a file uploading code but it create problem $(document).ready(function(){ $('#upload').click(function(){ var... it gives the problem org.apache.commons.fileupload.FileUploadException
Build File in java - Development process
Build File in java   Hi Friends, Can u explain me what is necessary for build file in java application. I mean it contains war file or anything
I got build failed when deploying enterprise application - EJB
I got build failed when deploying enterprise application  I created...(Deployment.java:160) ... 16 more BUILD FAILED (total time: 2 seconds)   ...: library-inclusion-in-archive: library-inclusion-in-manifest: Copying 1 file to E
JSF with Facelets - Problem setting attribute maxlength - Java Server Faces Questions
JSF with Facelets - Problem setting attribute maxlength  Hi, I have just started working on JSF along with facelets. I have created a xhtml file that contains a widget. I want to set the maxlength attribute of the text field
application context file problem
application context file problem  how to configure junit application context file with struts........? it is not finding sessionfactory method
JSF security design problem - Java Server Faces Questions
jsf at all? Please, provide your ideas of solving this problem. Thanks...JSF security design problem  Hi! I have to manage security (the quantity of roles and groups is rather huge) in java ee 5 + jsf (1.x) project
JSF Tomahawk date problem - Java Server Faces Questions
JSF Tomahawk date problem  hi i am working with jsf. I have... full details with source code to solve the problem and visit to : http://www.roseindia.net/jsf/apache-myfaces-tomahawk/tomahawk_inputDate_tag.shtml http
struts jar file problem
struts jar file problem  hi.. I'm using struts-core-1.3.9.jar. it works well if am using ma application with internet but it shows me an error while initializing ActionServlet when i disconnected to Internet The error stack trace
jsf graphicImage onclick problem - Java Server Faces Questions
jsf graphicImage onclick problem  hello I have a problem on netbeans-jsf-graphicImage component. I want to get image coordinate and write it to staticText component, when I clicked on the map. But I couldn't achieve
Problem in getting file path in js
Problem in getting file path in js  hi, I am using ofbiz framework , How i can get the file path in javascript for input type = "file" and i am using only firefox not other browser. so please help me it is very important for me
executing Hibernate application
executing Hibernate application  when i am executing the hibernate application the following error occured. log4j:WARN No appenders could be found...) Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds) can you tell me
JSF Command button problem - Java Server Faces Questions
JSF Command button problem  Hi Frnds... I have retrieved the records from the mdb file in backing bean..if i click the submit button those records will be displayed in the form of table... Records are displaying
problem while reading .csv file
problem while reading .csv file  I have a problem here..... i am reading a .csv extention file which has some value....but the problem is der is an amount column which contains , in between (eg) 3,899.00 which inturns creates
JSF
JSF  What is JSF
JBoss deployment problem for jsf - Java Server Faces Questions
JBoss deployment problem for jsf  HI all, I am unable to deploy the .war file with richfacess implemnation of jst. Get foolowing eror... org.jboss.web.jsf.integration.config.JBossJSFConfigureListener com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED
Problem with appending data to the end of file
Problem with appending data to the end of file  MY JSP CODE... successfully</h1>"); %> </body> </html> JAVA CLASS FILE CODE... { public static void add(String name,String mail,String path) throws IOException { File
Backbase AJAX for JSF
Backbase AJAX for JSF       Backbase AJAX for JSF is a complete AJAX - JSF programming framework build on top of Apache MyFaces and Eclipse it's Pre-build AJAX-JSF components andEclipse
How to build .XML file, please provide an example.
How to build .XML file, please provide an example.  Hello, I want to know how to build .XML file. If you can provide an example, that would be great... Thanks
FTP file copy problem? - Java Beginners
FTP file copy problem?  Hi, Can any one tell me how to set file...) { throw new Exception ("Storing of remote file failed. ftp.storeFile...-net-1.4.1.jar to copy files from local system to server. Eg: local file name ?test.doc
while executing a java program
while executing a java program  while iam executing a simple java program after i type "java simple.java" there was a an error occuring.the error is "exception in thread "main" java.lang.noclassdeffounderror:simple" what thus
 

 

 

DMCA.com