program-你懂的 2014-09-14 03:00 采纳率: 0%
浏览 772

为什么我的配置文件链接的是A数据库可是程序内部却指向了其他的数据库呢?

贴一下配置文件
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">



org.hibernate.dialect.MySQLDialect


jdbc:mysql://localhost:3306/zoodb

root
root

com.mysql.jdbc.Driver

true
20
2
120
100
120
2

<property name="myeclipse.connection.profile">mysql</property>
<mapping resource="com/zoo/bean/system/Users.hbm.xml" />
<mapping resource="com/zoo/bean/system/Role.hbm.xml" />
<mapping resource="com/zoo/bean/system/Tright.hbm.xml" />
<mapping resource="com/zoo/bean/system/RoleTright.hbm.xml" />
<mapping resource="com/zoo/bean/system/UsersType.hbm.xml" />
<!-- 售票实体类 -->
<mapping resource="com/zoo/bean/ticket/Part.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/PlayInfo.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/Project.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/SaleTarget.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/Site.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/Ticket.hbm.xml" />
<mapping resource="com/zoo/bean/ticket/TicketType.hbm.xml" />


下面的是报错!
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select tickettype0_.id as col_0_0_, (select project1_.pname from baobi.project project1_ where project1_.id=tickettype0_.project_id) as col_1_0_, tickettype0_.id as id11_, tickettype0_.type_name as type2_11_, tickettype0_.code as code11_, tickettype0_.price as price11_, tickettype0_.ticket_valid as ticket5_11_, tickettype0_.project_id as project6_11_, tickettype0_.do_user as do7_11_, tickettype0_.do_time as do8_11_, tickettype0_.rate as rate11_, tickettype0_.is_team as is10_11_ from baobi.ticket_type tickettype0_]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query

自己捣鼓了将近一个星期还是没有解决,所以上来求助各位大神!
还要什么文件我将第一时间贴出来

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试