日期:2014-05-17  浏览次数:20686 次

蛋疼 ssh框架的h4中方言读取不了
卡两天了 包里也有org.hibernate.dialect.PostgreSQLDialect这个类 但是就是找不到
异常:Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.PostgreSQLDialect;]
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:141)
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
... 57 more
Caused by: java.lang.ClassNotFoundException: org/hibernate/dialect/PostgreSQLDialect;
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:138)
... 58 more
2013-1-22 9:01:08 org.apache.catalina.core.StandardContext startInternal
严重: Error listenerStart
2013-1-22 9:01:08 org.apache.catalina.core.StandardContext startInternal
严重: Context [/s_test1] startup failed due to previous errors
2013-1-22 9:01:08 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2013-1-22 9:01:08 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/s_test1] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2013-1-22 9:01:08 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2013-1-22 9:01:08 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2013-1-22 9:01:08 org.apache.catalina.startup.Catalina start
信息: Server startup in 9653 ms
下面是applicationcontext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"

     xmlns:context="http://www.springframework.org/schema/context"

     xmlns:aop="http://www.springframework.org/schema/aop"

     xmlns:tx="http://www.springframework.org/schema/tx"

     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

     xsi:schemaLocation="

    http://www.springframework.org/schema/beans

    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

    http://www.springframework.org/schema/context

    http://www.springframework.org/schema/context/spring-context-2.5.xsd

    http://www.springframework.org/schema/aop

    http://www.springframework.org/schema/aop/spring-aop-2.5.xsd

    http://www.springframework.org/schema/tx

    http://www.springframework.org/schema/tx/spring-tx-2.5.xsd

">



 
<!-- struts配置文件中取得loginaction spring把业务层leeservice注入action中-->
     <bean