我的应用程序出错,但我不确定它的含义.我发布了一些示例代码.这是我得到的错误:
> SEVERE: Exception sending context initialized event to listener
> instance of class
> org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'transactionManager' defined in ServletContext
> resource [/WEB-INF/spring/root-context.xml]: Invocation of init method
> failed; nested exception is
> org.hibernate.service.UnknownUnwrapTypeException: Cannot unwrap to
> requested type [javax.sql.DataSource] at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
> at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
> at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
> at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) …Run Code Online (Sandbox Code Playgroud) 真的很难解决这个问题,任何人都可以帮助我吗?
我显然做了一些根本错误的事情,我试图验证每个Mock对象,但它似乎不起作用.
org.mockito.exceptions.misusing.UnfinishedVerificationException:
Missing method call for verify(mock) here:
-> at com.muuves.reservosity.service.TestProductServiceImpl.search_OneHourSlot_TwoBookingAvailable(TestProductServiceImpl.java:86)
Example of correct verification:
verify(mock).doSomething()
Also, this error might show up because you verify either of: final/private/equals() /hashCode() methods.
Those methods *cannot* be stubbed/verified.
at com.muuves.reservosity.service.TestProductServiceImpl.setUp(TestProductServiceImpl.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
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) …Run Code Online (Sandbox Code Playgroud) 有一个真正的问题试图为亚马逊s3实现proguard它继续崩溃加载应用程序在第29行,这是
s3Client = new AmazonS3Client(new BasicAWSCredentials(
Constants.ACCESS_KEY_ID, Constants.SECRET_KEY));
Run Code Online (Sandbox Code Playgroud)
这是错误的堆栈跟踪,并且不确定在任何方式获得更好的堆栈跟踪或任何有关如何修复它的建议都是什么意思?
Process: com.closr.closr, PID: 24517
java.lang.NoSuchFieldError: PUBLIC_ONLY
at java.lang.Class.getDeclaredAnnotation(Native Method)
at java.lang.Class.getAnnotation(Class.java:290)
at com.b.a.c.f.u$a.<clinit>(VisibilityChecker.java:172)
at com.b.a.c.r.<clinit>(ObjectMapper.java:195)
at com.a.l.a.a.<clinit>(Unknown Source)
at com.a.e.a.c.loadfrom(Unknown Source)
at com.a.e.a.c.load(Unknown Source)
at com.a.e.a.c$a.<clinit>(Unknown Source)
at com.a.o.getServiceName(Unknown Source)
at com.a.c.computeServiceName(Unknown Source)
at com.a.c.getServiceNameIntern(Unknown Source)
at com.a.c.configSigner(Unknown Source)
at com.a.c.setEndpoint(Unknown Source)
at com.a.j.a.a.init(Unknown Source)
at com.a.j.a.a.<init>(Unknown Source)
at com.a.j.a.a.<init>(Unknown Source)
at com.closr.closr.MainApplication.onCreate(MainApplication.java:29)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at …Run Code Online (Sandbox Code Playgroud)