标签:hibernate jdbc java web mysql
1、错误描述
WARN:HHH00027:Could not bind factory to JNDI
org.hibernate.engine.jndi.JndiException:Error parsing JNDI name[foo]
Caused by:javax.naming.NoInitialContextException:Need to specify class name in environment or system property,or as an applet parameter,or in an application resource file:java.naming.factory.inital
2、错误原因
在hibernate.cfg.xml中配置
<session-factory name="foo"></session-factory>
中添加了name属性
3、解决办法
去掉<session-factory name="foo"></session-factory>中的name属性
org.hibernate.engine.jndi.JndiException:Error parsing JNDI name[foo]
标签:hibernate jdbc java web mysql
原文地址:http://blog.csdn.net/you23hai45/article/details/44161461