Monday, 12 November 2012

SEVERE: Servlet.service() for servlet [RooSample] in context with path [/RooSample] threw exception [Request processing failed; nested exception is org.apache.tiles.impl.CannotRenderException: ServletException including path '/WEB-INF/layouts/default.jspx'.] with root cause org.apache.jasper.JasperException: /WEB-INF/views/index.jspx (line: 41, column: 109) The prefix "page" for element "page:show" is not bound.

This error is due to the invoking of some Tag-Elements. If you are invoking a particular Tag_Elements in your page, you must mention corresponding "xmlns" or "prefix" at the top of page.

Here you have to mention the the prefix "page" before you are invoking element "page:show"

Code:
index.jspx
-------------

<div xmlns:field="urn:jsptagdir:/WEB-INF/tags/form/fields" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:page="urn:jsptagdir:/WEB-INF/tags/form" version="2.0">
   
    <page:show id="ps_com_assyst_Timer" object="${timer}" path="/timers"                     z="dcIHCOvJZSL/kCAw2V/VQSftNhk=">
        <field:display field="message" id="s_com_assyst_Timer_message" object="${timer}" z="230qJe8e+RzBrzzlHoulj/KSIH8="/>
    </page:show>
</div>

Friday, 2 November 2012

ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:

This issue is due to the relational mapping in DB Tables.
Some times it may be due to the existence of old value in a table before mapping this table with another table. In these cases you can replace the older values with the corresponding id from mapped table.


For example:
---------------
First I created a project for registering Users. The details needed to register an User is Name, address, email and designation.These values are stored in a Table called USERS.Later I want to pick the values for designation from another master table. So that I mapped the table USER with another table DESIGNATIONS. Then the values from this table will populate against the Designation table. If you are adding a new User, the value for designation will be the corresponding id of selected designation.

If you are trying to populate the details of Users, this error ["ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful:...... "] will show. For resolving this error, you have to replace the older value in Designation column in USERS Table by corresponding id from DESIGNATION table.