解决方案 »
- HTML 中插入Flash问题
- (在线等待)java如何生成唯一的20或40位密钥字符串
- 关于JAVA在同一文件中加入同一功能的问题。附源码?
- 为什么spring1.2与hibernate3的兼容性这么差呢
- NetBeans 怎么添加字体?
- 大大们 一个strusts2的小异常 有点困惑 无耻的来问了
- 新手问问deploy.wsdd和server-config.wsdd的关系。
- 如何设计复杂的entity及对应的数据库表
- rmic类找不到啊
- 初学者寻求帮助:过Servlet怎么调用EJB?
- 请大侠援手:针对下面的vc++ 的DES算法,java 代码无法加解密?
- 这个json数据如何用Gson解析,求源码。
第二步检查你的配置文件是否正确,
配置应该没问题,你继承了HibernateDaoSupport的话sessionFactory会自动注入到实现类的。
你先确定你那个id不为空吧。
还是 userTable.getWorkerTable().getWorkerId()这个 userTable 是不是null,
、userTable.getWorkerTable(). 是不是null
最后看看 userTable.getWorkerTable().getWorkerId()是不是null
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>cn/edu/fjut/entity/EquipTypeTable.hbm.xml</value>
<value>
cn/edu/fjut/entity/RepairApplyTable.hbm.xml
</value>
<value>cn/edu/fjut/entity/WorkerTable.hbm.xml</value>
<value>cn/edu/fjut/entity/UserTable.hbm.xml</value>
<value>cn/edu/fjut/entity/ApplyTable.hbm.xml</value>
<value>
cn/edu/fjut/entity/PurchaseApplyTable.hbm.xml
</value>
<value>cn/edu/fjut/entity/EquipTable.hbm.xml</value>
<value>cn/edu/fjut/entity/RoleTable.hbm.xml</value>
<value>
cn/edu/fjut/entity/StoresApplyTable.hbm.xml
</value>
<value>cn/edu/fjut/entity/AuthRoleTable.hbm.xml</value>
<value>cn/edu/fjut/entity/DepartTable.hbm.xml</value>
<value>cn/edu/fjut/entity/AuthTable.hbm.xml</value>
<value>
cn/edu/fjut/entity/PurchaseInApplyTable.hbm.xml
</value>
</list>
</property>
</bean>这是sessionFactory的配置