java.lang.AssertionError: Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check your pattern declaration or check your assert declaration.

Solutions on the web

via Spring JIRA by Michael Ottati, 1 year ago
Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>
via Spring JIRA by Michael Ottati, 1 year ago
Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>
via GitHub by xingfengshen
, 2 years ago
expected:<0> but was:<1>
via GitHub by wildfly-ci
, 1 year ago
expected:<2> but was:<1>
via GitHub by acslk
, 1 year ago
expected:<1> but was:<0>
via GitHub by gianm
, 1 year ago
expected:<1> but was:<0>
java.lang.AssertionError: Expected :Entity of type org.springframework.data.jpa.example.auditing.AuditableUser with id: 1 Actual :null <Click to see difference>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:144)
at org.springframework.data.jpa.example.repository.AuditableUserSample.testname(AuditableUserSample.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 years ago
3 times, 9 months ago
Once, 3 weeks ago
3 times, 9 months ago
4 times, 6 months ago
123 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.