User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,620 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,278 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 584 | Replies: 4
Reply
Join Date: Aug 2007
Posts: 172
Reputation: ceyesuma is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ceyesuma ceyesuma is offline Offline
Junior Poster

init()

  #1  
May 23rd, 2008
I recently deployed a program
http://www.netbeans.org/kb/61/web/hibernate-vwp.html#01 in a pakage containing *.hbm.xml's and backing beans a HibernateUTIL.java class was

created.

in the IDE the table describes proper primatives that populate colm and rows. yet
(deployed) a table displays column headers in browser with no data.

an exception states HibernateUTIL
System Messages

    * java.lang.NoClassDefFoundError: Could not initialize class travel.HibernateUtil

The web.xml states
<init-param>
            <param-name>hibernatetravelapp.HibernateUtil</param-name>
            <param-value>hibernatetravelapp.HibernateUtil</param-value>
        </init-param>

as far as i know th HibernateUTIL.class uses the
hibernate.cfg.xml which is found in sister package containing all the beans (in

Source packages forlder0

Is there a clue contained here to resolve the initiation of the hibernateUTIL.java?
Thanks
-Steve



This is just the web.xml in its entirety.
<?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>client</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>
    <filter>
        <filter-name>UploadFilter</filter-name>
        <filter-class>com.sun.webui.jsf.util.UploadFilter</filter-class>
        <init-param>
            <description>The maximum allowed upload size in bytes.  If this is set to a 

negative value, there is no maximum.  The default value is 1000000.</description>
            <param-name>maxSize</param-name>
            <param-value>1000000</param-value>
        </init-param>
        <init-param>
            <description>The size (in bytes) of an uploaded file which, if it is exceeded, 

will cause the file to be written directly to disk instead of stored in memory.  Files 

smaller than or equal to this size will be stored in memory.  The default value is 

4096.</description>
            <param-name>sizeThreshold</param-name>
            <param-value>4096</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>UploadFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <init-param>
            <param-name>javax.faces.LIFECYCLE_ID</param-name>
            <param-value>com.sun.faces.lifecycle.PARTIAL</param-value>
        </init-param>
        <init-param>
            <param-name>hibernatetravelapp.HibernateUtil</param-name>
            <param-value>hibernatetravelapp.HibernateUtil</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <servlet-class>com.sun.errorhandler.ExceptionHandler</servlet-class>
        <init-param>
            <param-name>errorHost</param-name>
            <param-value>localhost</param-value>
        </init-param>
        <init-param>
            <param-name>errorPort</param-name>
            <param-value>24444</param-value>
        </init-param>
    </servlet>
    <servlet>
        <servlet-name>ThemeServlet</servlet-name>
        <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ExceptionHandlerServlet</servlet-name>
        <url-pattern>/error/ExceptionHandler</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ThemeServlet</servlet-name>
        <url-pattern>/theme/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/Page1.jsp</welcome-file>
        </welcome-file-list>
    <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>java.io.IOException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>javax.faces.FacesException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <error-page>
        <exception-type>com.sun.rave.web.ui.appbase.ApplicationException</exception-type>
        <location>/error/ExceptionHandler</location>
    </error-page>
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jspf</url-pattern>
            <is-xml>true</is-xml>
        </jsp-property-group>
        </jsp-config>
    <resource-ref>
        <description>Visual Web generated DataSource Reference</description>
        <res-ref-name>jdbc/TRAVEL_ApacheDerby</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Posts: 172
Reputation: ceyesuma is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ceyesuma ceyesuma is offline Offline
Junior Poster

Re: init()

  #2  
May 23rd, 2008
I have reaized that there is no relationship between a drop down list and a table .
I think I need to establish a query to populate the table with records related to the choice of a persons name (selected item) in a drop down list.
Reply With Quote  
Join Date: Aug 2007
Posts: 172
Reputation: ceyesuma is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ceyesuma ceyesuma is offline Offline
Junior Poster

Re: init()

  #3  
May 23rd, 2008
I have also realized I have no clue on prerendering the dataProvider for the table dropdown list and will redo this project and pay more attention to this.
Thanks anyway.
-Steve
Reply With Quote  
Join Date: Aug 2007
Posts: 172
Reputation: ceyesuma is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ceyesuma ceyesuma is offline Offline
Junior Poster

Re: init()

  #4  
May 23rd, 2008
I fixed some var and it looks like it is in working order.
I really need more JSF examples if possible
(dealing with database binding)
Thanks
-Steve
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,698
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: init()

  #5  
May 24th, 2008
this has nothing to do with JSF, but with basic web application architecture and deployment.
You're missing classes in your deployment.
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 1:08 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC