我的环境是jdk1.5  myeclipce 6.5  oracle9i  找遍了网络的办法 都没办法 将表映射过来   方言改了    包放在lib下了    驱动包class1.2  class1.4  jdbc 1.4  全换了个遍   就连myeclipce 也重装了几次
   都不可以  有高手在么?  求救

解决方案 »

  1.   

    使用myeclipse自带的映射功能,先要在database explorer里配置数据连接源.连接成功能后,开始建项目,把struts和hibernate架包都导入项目中,再到database explorer里连接上数据库,针对某个表右键选择映射,就可以了呀!
      

  2.   

    你的spring封装hibernate的那段代码贴一下,看看啊
      

  3.   

    <?xml version="1.0" encoding="UTF-8"?>
    <beans
    xmlns="http://www.springframework.org/schema/beans"
    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">
    <bean id="dataSource"
    class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName"
    value="oracle.jdbc.driver.OracleDriver">
    </property>
    <property name="url"
    value="jdbc:oracle:thin:@localhost:1521:oemrep">
    </property>
    <property name="username" value="manager"></property>
    <property name="password" value="manager"></property>
    </bean>
    <bean id="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="dataSource">
    <ref bean="dataSource" />
    </property>
    <property name="hibernateProperties">
    <props>
    <prop key="hibernate.dialect">
    org.hibernate.dialect.Oracle9iDialect
    </prop>
    </props>
    </property>
    </bean></beans>
      

  4.   

    就是 在database exploer 的时候 右键点表 要生成映射文件到hibernate中去的时候  出现unknow oracle major vesion错误
      

  5.   

    装个mysql或sqlserver也映射一下,看出不出问题啊。
      

  6.   

    oracle能连接成功,一般映射是不会出问题的啊。
      

  7.   

    我放弃myeclipse 6.5  改用6.0了  映射没问题了