部署一个ssh架构的web application,发生如下错误!找高手指教。
信息: Loading XML bean definitions from class path resource [applicationContext.xml]
2011-6-16 14:08:54 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
信息: Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1e26e52]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5113f0
2011-6-16 14:08:55 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5113f0: defining beans [SessionFactory,EmployeeDao,EmployeeService,/employee]; root of factory hierarchy
2011-6-16 14:08:55 org.hibernate.cfg.Environment <clinit>
信息: Hibernate 3.0.5
2011-6-16 14:08:55 org.hibernate.cfg.Environment <clinit>
信息: hibernate.properties not found
信息: configuring from url: file:/D:/apache-tomcat-6.0.26/webapps/test/WEB-INF/classes/hibernate.cfg.xml
2011-6-16 14:08:58 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: Using Hibernate built-in connection pool (not for production use!)
2011-6-16 14:08:58 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: Hibernate connection pool size: 20
2011-6-16 14:08:58 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: autocommit mode: true
2011-6-16 14:08:58 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@172.16.89.76:1521:orcl
2011-6-16 14:08:58 org.hibernate.connection.DriverManagerConnectionProvider configure
信息: connection properties: {user=scott, password=****, autocommit=true, release_mode=on_close}
2011-6-16 14:08:59 org.hibernate.cfg.SettingsFactory buildSettings
警告: Could not obtain connection metadata
java.sql.SQLException: ORA-28000: the account is locked at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:785)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(Unknown Source)applicationContext.xml的配置文件如下:
。。
<bean name="openSessionInViewInterceptor"  
        class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">   
        <property name="sessionFactory">   
            <ref bean="sessionFactory" />   
        </property>   
        <property name="flushMode" value="1"/>   
        <property name="singleSession" value="false" />   
    </bean>
-->

<!-- sessionFactory配置 -->
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation"
value="classpath:hibernate.cfg.xml">
</property>
</bean>
。。
hibernate配置文件如下!
<property name="connection.username">longdpt</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:longdpt</property>
<property name="dialect">org.hibernate.dialect.Oracle10Dialect</property>

<property name="connection.password">115922</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="show_sql">true</property>迷惑,在线等待!!!!!

解决方案 »

  1.   

    java.sql.SQLException: ORA-28000: the account is locked
    哈哈,账户被锁死了啊。
      

  2.   

    connection properties: {user=scott, password=****, autocommit=true, release_mode=on_close}
    换个用户
      

  3.   

    为什么会出现
    user=scott, password=****, autocommit=true, release_mode=on_close,我在hibernate中配置的用户和密码是
    <property name="connection.username">longdpt</property>
    <property name="connection.url">jdbc:oracle:thin:@localhost:1521:longdpt</property>
    <property name="dialect">org.hibernate.dialect.Oracle10Dialect</property><property name="connection.password">115922</property>
      

  4.   

    java.sql.SQLException: ORA-28000: the account is locked换用户吧
      

  5.   

    hibernate.properties not found
    首先是这个资源文件没找到,导致你在hibernate.cfg.xml下面property的属性没有附上值而报错
      

  6.   

    .myhibernatedata   .springBeans  这两个文件没错吧,要不就是applicationContext.xml这里面的BEAN有问题,或者映射文件有问题,好好看看吧
      

  7.   

    java.sql.SQLException: ORA-28000: the account is locked账户被锁定了用没有锁定的管理员账户登录后执行如下sql语句
    alter user longdpt account unlock;至于账户为什么被锁定了,一个很常见的原因就是连续用该用户名登录并密码错误后就会被锁定
    登录失败的次数取决于oracle的配置你的配置文件中没有数据源的配置,hibernate默认启用它自己的数据源,也就是说你一启动服务器
    就会有好多个连接同时被启动了,如果你的密码写错了,可能启动一次就会造成oracle账户被锁定
      

  8.   

    java.sql.SQLException: ORA-28000: the account is locked
    这个很明显拉,哈哈。到数据库里解锁即可