Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>&lt;beans&gt;</code> tag is closed and then more bean definitions are added. Move the closing <code>beans</code> tag so it nests the <code>bean</code> definitions. Another related thing that can burn you with XML config files is using the format tool within your IDE. Never format the <code>XML</code> config with a tool, it can add additional whitespace to your xml which gets interpreted breaking your configuration.</p> <p>In a nutshell your doing this:</p> <pre><code>&lt;beans&gt; &lt;bean id="1"/&gt; &lt;/beans&gt; &lt;bean id="2"/&gt; &lt;bean id="3"/&gt; </code></pre> <p>When it should be like:</p> <pre><code>&lt;beans&gt; &lt;bean id="1"/&gt; &lt;bean id="2"/&gt; &lt;bean id="3"/&gt; &lt;/beans&gt; </code></pre> <p><strong>Full Configuration With Changes</strong></p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt; &lt;context:component-scan base-package="com.springHibernate" /&gt; &lt;context:annotation-config /&gt; &lt;bean id="DataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&gt; &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt; &lt;property name="url" value="jdbc:mysql://localhost:3306/mydb" /&gt; &lt;property name="username" value="root" /&gt; &lt;property name="password" value="password" /&gt; &lt;/bean&gt; &lt;!-- Beans Declaration --&gt; &lt;bean id="User" class="com.mycompany.myapp.core.model.User"/&gt; &lt;bean id="Institute" class="com.mycompany.myapp.core.model.Institute"/&gt; &lt;!-- User Service Declaration --&gt; &lt;bean id="UserBoImpl" class="com.mycompany.myapp.core.bo.impl.UserBoImpl"&gt; &lt;property name="userDao" ref="UserDaoImpl" /&gt; &lt;/bean&gt; &lt;bean id="InstituteBoImpl" class="com.mycompany.myapp.core.bo.impl.InstituteBoImpl"&gt; &lt;property name="instituteDao" ref="InstituteDaoImpl" /&gt; &lt;/bean&gt; &lt;!-- User DAO Declaration --&gt; &lt;bean id="UserDaoImpl" class="com.mycompany.myapp.core.dao.impl.UserDaoImpl"&gt; &lt;property name="sessionFactory" ref="SessionFactory" /&gt; &lt;/bean&gt; &lt;bean id="InstituteDaoImpl" class="com.mycompany.myapp.core.dao.impl.InstituteDaoImpl"&gt; &lt;property name="sessionFactory" ref="SessionFactory" /&gt; &lt;/bean&gt; &lt;bean id="SessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt; &lt;property name="dataSource" ref="DataSource" /&gt; &lt;property name="annotatedClasses"&gt; &lt;list&gt; &lt;value&gt;com.mycompany.myapp.core.model.User&lt;/value&gt; &lt;value&gt;com.mycompany.myapp.core.model.Institute&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;property name="hibernateProperties"&gt; &lt;props&gt; &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt; &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; &lt;tx:annotation-driven transaction-manager="txManager" /&gt; &lt;bean id="txManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt; &lt;property name="sessionFactory" ref="SessionFactory" /&gt; &lt;/bean&gt; &lt;/beans&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload