Announcement Announcement Module
Collapse
No announcement yet.
Where are the files? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where are the files?

    Hi!

    What about this?

    Code:
    Error creating bean with name 'sessionFactory' defined in class path resource [META-INF/applicationContext-hibernate.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource ["hibernate.properties"] cannot be resolved to URL because it does not exist

    Hibernate configurarion


    Code:
    <!-- Hibernate SessionFactory -->
    	<bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean">
    		<property name="dataSource"><ref local="dataSource"/></property>
    		<property name="mappingDirectoryLocations">
    		    <list>
    			    <value>/src/META-INF/mappings</value>
    		    </list>
    		</property>
    
    		<property name="configLocation">
    			<value>"hibernate.properties"</value>
    		</property>
    	</bean>
    Why spring can not find my hibernate.properties?

    My directory structure is:

    Code:
    project\
        src\
            br.mycompany....
            META-INF\
                     applicationContext.xml
                     mappings\
                             *.hbm.xml
            hibernate.properties

  • #2
    Try without the quotes.

    Comment


    • #3
      Problem Solved

      It works!!!
      Thanks for help!

      Comment


      • #4
        You're welcome.

        Comment

        Working...
        X