hibernate空指针

  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)



孤独与死
浏览 1495回答 2
2回答

car

配置文件路径有错,getResources

大咪

代码贴全.....光着一个看不出来
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java