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

java.lang.reflect.UndeclaredThrowableException 我用的是MyEclipse10

之前看到别人说删除hibernate或者struts2当中低版本的重复jar包就可以,但是我这样操作后还是没有解决问题,请大家来帮忙解决下吧,困了很久。。。

正在回答

2 回答

我也遇到了,您解决了吗


0 回复 有任何疑惑可以回复我~

2016-6-8 10:17:44 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

2016-6-8 10:17:44 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.2.Final}

2016-6-8 10:17:44 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

2016-6-8 10:17:44 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

2016-6-8 10:17:44 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

2016-6-8 10:17:44 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

2016-6-8 10:17:44 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2016-6-8 10:17:44 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: entity/Students.hbm.xml

2016-6-8 10:17:44 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2016-6-8 10:17:44 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: entity/Users.hbm.xml

2016-6-8 10:17:44 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2016-6-8 10:17:44 org.hibernate.cfg.Configuration doConfigure

INFO: HHH000041: Configured SessionFactory: null

2016-6-8 10:17:44 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)

2016-6-8 10:17:44 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000115: Hibernate connection pool size: 20

2016-6-8 10:17:44 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000006: Autocommit mode: false

2016-6-8 10:17:44 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/demo]

2016-6-8 10:17:44 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000046: Connection properties: {user=root, password=****}

2016-6-8 10:17:45 org.hibernate.dialect.Dialect <init>

INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect

2016-6-8 10:17:45 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService

INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)

2016-6-8 10:17:45 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>

INFO: HHH000397: Using ASTQueryTranslatorFactory

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.SchemaUpdate execute

INFO: HHH000228: Running hbm2ddl schema update

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.SchemaUpdate execute

INFO: HHH000102: Fetching database metadata

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.SchemaUpdate execute

INFO: HHH000396: Updating schema

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000261: Table found: demo.students

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000037: Columns: [birthday, sid, address, gender, sname]

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000108: Foreign keys: []

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000126: Indexes: [primary]

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000261: Table found: demo.users

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000037: Columns: [uid, username, password]

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000108: Foreign keys: []

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.TableMetadata <init>

INFO: HHH000126: Indexes: [primary]

2016-6-8 10:17:45 org.hibernate.tool.hbm2ddl.SchemaUpdate execute

INFO: HHH000232: Schema update complete

java.lang.reflect.UndeclaredThrowableException

at $Proxy5.createQuery(Unknown Source)

at serviceimpl.UserDaoImpl.usersLogin(UserDaoImpl.java:25)

at serviceimpl.TestUsersDAOImpl.testUsersLogin(TestUsersDAOImpl.java:16)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:352)

... 26 more

Caused by: java.lang.NoClassDefFoundError: antlr/RecognitionException

at org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory.createQueryTranslator(ASTQueryTranslatorFactory.java:59)

at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:103)

at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)

at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:168)

at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:221)

at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:199)

at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1778)

... 31 more

Caused by: java.lang.ClassNotFoundException: antlr.RecognitionException

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:252)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)

... 38 more


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

java.lang.reflect.UndeclaredThrowableException 我用的是MyEclipse10

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信