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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?