ssh集成访问action时候报这个错误,数据库是oracle11g,数据库连接池用的c3p0,按照搜到的配置自动重连也没用。使用PLSQL可以连接到oracle
spring配置文件关于数据库连接池和sessionFactory的内容如下:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.autoReconnect">true</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingLocations">
<list>
<value>classpath:com/softstructure/medic/vo/user/UserModel.hbm.xml</value>
<value>classpath:medic/SampleModel.hbm.xml</value>
</list>
</property>
</bean>
代码贴出来看看---------
应该是连接的问题,,你用jdbc连接试试,,看能否连上
spring2.x+hibernate3+struts2 在首次登陆系统时抛出的异常,再登陆就正常。
异常:
javax.servlet.ServletException: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for......
答案就在这里:Could not open Hibernate Session for transaction
----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。