首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Mysql >

springmvc+hibernate+mysql有关问题

2012-10-28 
springmvc+hibernate+mysql问题!我写的一个模块里定义了4个表,每次都是编译到映射表的地方就慢下来打住了,

springmvc+hibernate+mysql问题!
我写的一个模块里定义了4个表,每次都是编译到映射表的地方就慢下来打住了,编译总是通过不了,很着急,以下是编译时候的信息:
2006-12-6 13:10:32 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
??: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\program files\Java\jdk1.5.0_08\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\program files\Java\jdk1.5.0_08\bin;D:\program files\Java\jdk1.5.0_08\bin;D:\apache-tomcat-5.5.17\bin;D:\apache-ant-1.6.5\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;D:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;D:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;D:\Program Files\Microsoft Visual Studio\Common\Tools;D:\Program Files\Microsoft Visual Studio\VC98\bin
2006-12-6 13:10:33 org.apache.coyote.http11.Http11BaseProtocol init
??: Initializing Coyote HTTP/1.1 on http-8080
2006-12-6 13:10:33 org.apache.catalina.startup.Catalina load
??: Initialization processed in 72125 ms
2006-12-6 13:10:34 org.apache.catalina.core.StandardService start
??: Starting service Catalina
2006-12-6 13:10:34 org.apache.catalina.core.StandardEngine start
??: Starting Servlet Engine: Apache Tomcat/5.5.17
2006-12-6 13:10:34 org.apache.catalina.core.StandardHost start
??: XML validation disabled
2006-12-6 13:10:56 org.springframework.web.context.ContextLoader initWebApplicationContext
??: Root WebApplicationContext: initialization started
2006-12-6 13:10:56 org.apache.catalina.core.ApplicationContext log
??: Loading Spring root WebApplicationContext
2006-12-6 13:10:57 org.springframework.core.CollectionFactory <clinit>
??: JDK 1.4+ collections available
2006-12-6 13:10:57 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
??: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
2006-12-6 13:10:58 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
??: Loading XML bean definitions from ServletContext resource [/WEB-INF/myspring-servlet.xml]
2006-12-6 13:10:58 org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory
??: Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,dataSource,sessionFactory,roomDao,urlMapping,user,logonform,roombook,roombookform,bookContro]; root of BeanFactory hierarchy
2006-12-6 13:10:58 org.springframework.context.support.AbstractApplicationContext refresh
??: 10 beans defined in application context [Root WebApplicationContext]
2006-12-6 13:10:59 org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
??: Loading properties file from class path resource [hibernate.properties]
2006-12-6 13:10:59 org.springframework.context.support.AbstractApplicationContext initMessageSource
??: Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@109da93]
2006-12-6 13:10:59 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster
??: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1dcc4cd]
2006-12-6 13:10:59 org.springframework.ui.context.support.UiApplicationContextUtils initThemeSource
??: Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@18600d6]
2006-12-6 13:10:59 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
??: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,dataSource,sessionFactory,roomDao,urlMapping,user,logonform,roombook,roombookform,bookContro]; root of BeanFactory hierarchy]
2006-12-6 13:10:59 org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName
??: Loaded JDBC driver: com.mysql.jdbc.Driver
2006-12-6 13:11:00 org.hibernate.cfg.Environment <clinit>
??: Hibernate 3.0.5
2006-12-6 13:11:00 org.hibernate.cfg.Environment <clinit>
??: loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password=****, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.show_sql=true, hibernate.connection.url=jdbc:mysql://localhost:3306/test, hibernate.connection.driver_class=com.mysql.jdbc.Driver}
2006-12-6 13:11:00 org.hibernate.cfg.Environment <clinit>
??: using CGLIB reflection optimizer
2006-12-6 13:11:00 org.hibernate.cfg.Environment <clinit>
??: using JDK 1.4 java.sql.Timestamp handling
2006-12-6 13:11:33 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
??: Mapping class: com.lingirl.domain.Room -> ROOMS

经常就是映射了表ROOMS后很久很久才会继续下一个表的映射,或者根本就停住不动了,很想知道这是怎么回事呢?我的配置如下:

<beans default-lazy-init="false">

    <!--
      - 指定配置文件
      -->
    <bean id="propertyConfigurer" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost/test"/>
<property name="username" value="root"/>
<property name="password" value="1234"/>
</bean>

<bean id="sessionFactory" class="com.lingirl.RoomDaoImpl">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>


</beans>

很多天了都解决不了,请大家请教!

热点排行