为了账号安全,请及时绑定邮箱和手机立即绑定

hibernate空指针

hibernate空指针

孤独与死 2016-09-05 17:08:39
  Configuration configuration = new Configuration().configure();//运行结果是这行代码报错。Exception in thread "main" java.lang.NullPointerException at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.getResources(ClassLoaderServiceImpl.java:173) at java.util.ServiceLoader$LazyIterator.hasNextService(Unknown Source) at java.util.ServiceLoader$LazyIterator.hasNext(Unknown Source) at java.util.ServiceLoader$1.hasNext(Unknown Source) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:340) at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:40) at org.hibernate.boot.registry.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:213) at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:58) at com.action.Action.main(Action.java:31)
查看完整描述

2 回答

?
car

TA贡献184条经验 获得超33个赞

配置文件路径有错,getResources

查看完整回答
反对 回复 2016-09-06
?
大咪

TA贡献785条经验 获得超332个赞

代码贴全.....光着一个看不出来

查看完整回答
反对 回复 2016-09-05
  • 2 回答
  • 0 关注
  • 1489 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信