( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.05424095728require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.05484124720include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.05484124720get_header( $name = ???, $args = ??? ).../single.php:10
60.05484124936locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.05484125032load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.05484125576require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.05504132984wp_head( ).../header.php:18
100.05504132984do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.05504133200WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.05504133200WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.05514136616wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.05514136616do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.05514136832WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.05514136832WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.05534138720twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.05544140240wp_style_add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.php:440
190.05544140240WP_Styles->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../functions.wp-styles.php:245
200.05544140240WP_Dependencies->add_data( $handle = 'twentyfifteen-ie', $key = 'conditional', $value = 'lt IE 9' ).../class-wp-styles.php:385
210.05544140240_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.05544140560wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.05554146944trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

( ! ) Deprecated: Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131
Call Stack
#TimeMemoryFunctionLocation
10.0000484048{main}( ).../index.php:0
20.0000484400require( '/var/www/html/wp-blog-header.php ).../index.php:17
30.05424095728require_once( '/var/www/html/wp-includes/template-loader.php ).../wp-blog-header.php:19
40.05484124720include( '/var/www/html/wp-content/themes/twentyfifteen/single.php ).../template-loader.php:125
50.05484124720get_header( $name = ???, $args = ??? ).../single.php:10
60.05484124936locate_template( $template_names = [0 => 'header.php'], $load = TRUE, $load_once = TRUE, $args = [] ).../general-template.php:48
70.05484125032load_template( $_template_file = '/var/www/html/wp-content/themes/twentyfifteen/header.php', $load_once = TRUE, $args = [] ).../template.php:749
80.05484125576require_once( '/var/www/html/wp-content/themes/twentyfifteen/header.php ).../template.php:814
90.05504132984wp_head( ).../header.php:18
100.05504132984do_action( $hook_name = 'wp_head' ).../general-template.php:3197
110.05504133200WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
120.05504133200WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
130.05514136616wp_enqueue_scripts( '' ).../class-wp-hook.php:341
140.05514136616do_action( $hook_name = 'wp_enqueue_scripts' ).../script-loader.php:2311
150.05514136832WP_Hook->do_action( $args = [0 => ''] ).../plugin.php:522
160.05514136832WP_Hook->apply_filters( $value = '', $args = [0 => ''] ).../class-wp-hook.php:365
170.05534138720twentyfifteen_scripts( '' ).../class-wp-hook.php:341
180.08304148048wp_style_add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.php:444
190.08304148048WP_Styles->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../functions.wp-styles.php:245
200.08304148048WP_Dependencies->add_data( $handle = 'twentyfifteen-ie7', $key = 'conditional', $value = 'lt IE 8' ).../class-wp-styles.php:385
210.08314148048_deprecated_argument( $function_name = 'WP_Dependencies->add_data()', $version = '6.9.0', $message = 'IE conditional comments are ignored by all supported browsers.' ).../class-wp-dependencies.php:317
220.08314148368wp_trigger_error( $function_name = '', $message = 'Function WP_Dependencies->add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:5925
230.08324148592trigger_error( $message = 'Function WP_Dependencies-&gt;add_data() was called with an argument that is <strong>deprecated</strong> since version 6.9.0! IE conditional comments are ignored by all supported browsers.', $error_level = 16384 ).../functions.php:6131

Writing Hibernate Configuration Files

In the previous section we completed the database setup and created required table and populated with the data. In this section we will write required hibernate configuration files.


For this tutorial we need following Hibernate configuration files:


Hibernate Configuration File


Hibernate configuration file (hibernate.cfg.xml) is used to provide the information which is necessary for making database connections. The mapping details for mapping the domain objects to the database tables are also a part of Hibernate configuration file. 


Here is the code of our Hibernate Configuration File:






<?xml version=’1.0′ encoding=’utf-8′?>
<!DOCTYPE hibernate-configuration PUBLIC
“-//Hibernate/Hibernate Configuration DTD//EN”
“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”>

<hibernate-configuration>
<session-factory>
<property name=”hibernate.connection.driver_class”>com.mysql.jdbc.Driver</property>
<property name=”hibernate.connection.url”>jdbc:mysql://localhost/struts-hibernate</property>
<property name=”hibernate.connection.username”>root</property>
<property name=”hibernate.connection.password”></property>
<property name=”hibernate.connection.pool_size”>10</property>
<property name=”show_sql”>true</property>
<property name=”dialect”>org.hibernate.dialect.MySQLDialect</property>
<property name=”hibernate.hbm2ddl.auto”>update</property>
<!– Mapping files –>
<mapping resource=”/roseindia/net/dao/hibernate/Tutorial.hbm.xml”/>
</session-factory>
</hibernate-configuration> 

 


Place hibernate.cfg.xml file in the source directory e.g. “C:\Struts-Hibernate-Integration\code\src\java”


The <mapping resource=”> tag is used to specify the mapping file:


<mapping resource=”/roseindia/net/dao/hibernate/Tutorial.hbm.xml”/>


Code of Tutorial.hbm.xml:






 <?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE hibernate-mapping PUBLIC “-//Hibernate/Hibernate Mapping DTD//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”>

<hibernate-mapping auto-import=”true” default-lazy=”false”>

<class 
name=”roseindia.net.dao.hibernate.Tutorial” 
table=”tutorials”
>

<id
name=”id”
type=”java.lang.Integer”
column=”id”
>
<generator class=”increment” />
</id>

<property
name=”shortdesc”
type=”java.lang.String”
column=”shortdesc”
not-null=”true”
length=”50″
/>
<property
name=”longdesc”
type=”java.lang.String”
column=”longdesc”
not-null=”true”
length=”250″
/>
<property
name=”pageurl”
type=”java.lang.String”
column=”pageurl”
not-null=”true”
length=”100″
/>


</class>
</hibernate-mapping>

Place Tutorial.hbm.xml file in the source directory e.g. “C:\Struts-Hibernate-Integration\code\src\java\roseindia\net\dao\hibernate\” 


POJO Object
Here is the code of Java Bean object (Tutorial.java) used to store and retrieve the data from database.






package roseindia.net.dao.hibernate;

import java.io.Serializable;


public class Tutorial implements Serializable {

    /** identifier field */
    private Integer id;

    /** persistent field */
    private String shortdesc;

    /** persistent field */
    private String longdesc;

    /** persistent field */
    private String pageurl;

    /** full constructor */
    public Tutorial(Integer id, String shortdesc, String longdesc, String pageurl) {
        this.id = id;
        this.shortdesc = shortdesc;
        this.longdesc = longdesc;
        this.pageurl = pageurl;
    }

    /** default constructor */
    public Tutorial() {
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getShortdesc() {
        return this.shortdesc;
    }

    public void setShortdesc(String shortdesc) {
        this.shortdesc = shortdesc;
    }

    public String getLongdesc() {
        return this.longdesc;
    }

    public void setLongdesc(String longdesc) {
        this.longdesc = longdesc;
    }

    public String getPageurl() {
        return this.pageurl;
    }

    public void setPageurl(String pageurl) {
        this.pageurl = pageurl;
    }

}

In this section we have created all the Hibernate related stuffs.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.