java.lang.IllegalArgumentException: DataSource must not be null

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

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

Solutions on the web

via co.uk by Unknown author, 1 year ago
via Stack Overflow by Unknown author, 2 years ago
DataSource must not be null
via co.uk by Unknown author, 1 year ago
via co.uk by Unknown author, 1 year ago
via Stack Overflow by NeoP5
, 2 years ago
Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
via GitHub by ilx
, 2 years ago
Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
java.lang.IllegalArgumentException: DataSource must not be null
at com.myc.cc.repository.PersistenceJPAConfig.entityManagerFactory(PersistenceJPAConfig.java:43)
at com.myc.cc.repository.PersistenceJPAConfig.entityManager(PersistenceJPAConfig.java:37)
at com.myc.cc.repository.SearchPersonPredicates.findIdByEM(SearchPersonPredicates.java:121)
at com.myc.cc.service.impl.SearchPersonServiceImpl.findPnumberbyEM(SearchPersonServiceImpl.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at com.sun.proxy.$Proxy114.findPnumberbyEM(Unknown Source)
at com.myc.cc.web.SearchPersonController.searchPerson(SearchPersonController.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

Users with the same issue

26 times, 2 days ago
Once, 1 week ago
Once, 3 weeks ago
2 times, 1 month ago
Once, 2 months ago

Write tip

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