I think your problem is related with the lack of a @Component annotation in your BoardDao class. The component should have a @Component annotation to instantiate the singleton to be injected in your Service Layer.

@Component
public class BoardDao extends SqlSessionDaoSupport{

    @Autowired
    SqlSessionTemplate session;

    public List<BoardDto> listboard(BoardDto dto) {
        System.out.println("dao.");
        List<BoardDto> result = session.selectList("boarddate.listboard", dto);
        return result;
    }

}

If the problem persist, you may try with the @Repository annotation. Sadly I haven't used the class SqlSessionDaoSupport, so I don't know exactly the best annotation for that.

Answer from Oscar Navarrete on Stack Overflow
🌐
GitHub
github.com › eclipse-pde › eclipse.pde › issues › 133
java.lang.NullPointerException: Cannot invoke "org.eclipse.pde.core.plugin.ModelEntry.getWorkspaceModels()" because "entry" is null · Issue #133 · eclipse-pde/eclipse.pde
May 31, 2022 - java.lang.NullPointerException: Cannot invoke "org.eclipse.pde.core.plugin.ModelEntry.getWorkspaceModels()" because "entry" is null at org.eclipse.pde.internal.launching.sourcelookup.PDESourceLookupDirector.getSourceContainers(PDESourceLookupDirector.java:99) at org.eclipse.pde.internal.launching.sourcelookup.PDESourceLookupQuery.getSourceContainers(PDESourceLookupQuery.java:321) at org.eclipse.pde.internal.launching.sourcelookup.PDESourceLookupQuery.getSourceElement(PDESourceLookupQuery.java:283) at org.eclipse.pde.internal.launching.sourcelookup.PDESourceLookupQuery.searchClasspathEntries(PD
Author: eclipse-pde
Author: redhat-developer
Discussions

java - Cannot invoke "" because "" is null - Stack Overflow
Communities for your favorite technologies. Explore all Collectives · Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
🌐 stackoverflow.com
java.lang.NullPointerException: Cannot invoke "java.sql.Connection.createStatement()" because is null
The error speaks for itself, the connection is null, look at the stack traces of the previous exceptions. More on reddit.com
🌐 r/eclipse
1
2
October 3, 2022
[BUG] Eclipse: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.CompilationResult.getCompilationUnit()" because "unitResult" is null
Describe the bug Eclipse fails with the error in the summary when building with -javaagent:lombok.jar. To Reproduce I don't have a SSCCE. I've added -javaagent:lombok.jar to my eclipse.ini, and whe... More on github.com
🌐 github.com
3
March 24, 2021
BUILD: ERROR: Cannot invoke &quot;java.util.Map.get(Object)&quot; because &quot;strings&quot; is null
I uninstalled and reinstalled ... and eclipse, and set up everything from scratch, and I'm still getting the same error. I can't find anything on this online. I found this post https://forums.garmin.com/developer/connect-iq/f/discussion/264486/error-cannot-invoke-java-lang-comparable-compareto-object-because-a-runhi-is-null and I thought ... More on forums.garmin.com
🌐 forums.garmin.com
0
0
September 23, 2021
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
581826 – java.lang.NullPointerException: Cannot invoke "String.isBlank()" because "webFacetVersionPropertyValue" is null
April 18, 2023 - Bugzilla – Bug 581826 java.lang.NullPointerException: Cannot invoke "String.isBlank()" because "webFacetVersionPropertyValue" is null Last modified: 2023-04-18 06:54:48 EDT
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
581595 – java.lang.NullPointerException: Cannot invoke "java.util.Collection.size()" because "this.cache" is null
February 27, 2023 - Bugzilla – Bug 581595 java.lang.NullPointerException: Cannot invoke "java.util.Collection.size()" because "this.cache" is null Last modified: 2023-02-27 09:36:26 EST
🌐
Code2care
code2care.org › home page › java › java exception with lambda cannot invoke becasue object is null
[Fix] Java Exception with Lambda - Cannot invoke because object is null | Code2care
September 4, 2022 - import java.util.ArrayList; import java.util.List; public class Example { public static void main(String[] args) { List<String> stringList = new ArrayList<>(); stringList.add("Java"); stringList.add("Example"); stringList.add("Text"); stringList.add(null); stringList.forEach(str -> { if(str == null) { System.out.println("NULL Value"); } else { System.out.println(str.substring(1)); } }); } } Java 8 Exception - cannot invoke because the object is null
🌐
Eclipse
bugs.eclipse.org › bugs › show_bug.cgi
572979 – java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.lookup.TypeBinding.needsUncheckedConversion(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)" because "argumentType" is null
Bugzilla – Bug 572979 java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.lookup.TypeBinding.needsUncheckedConversion(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)" because "argumentType" is null Last modified: 2024-03-20 00:29:49 EDT
Find elsewhere
🌐
Reddit
reddit.com › r/eclipse › java.lang.nullpointerexception: cannot invoke "java.sql.connection.createstatement()" because is null
r/eclipse on Reddit: java.lang.NullPointerException: Cannot invoke "java.sql.Connection.createStatement()" because is null
October 3, 2022 -

hello, im doing a list with SQL, and when i try to connect to the database, I always get this error, I already saw the ports, and everything is correct, but it says that it cannot connect, maybe a typing problem? can someone tell why what is wrong pls?

🌐
GitHub
github.com › projectlombok › lombok › issues › 2788
[BUG] Eclipse: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.CompilationResult.getCompilationUnit()" because "unitResult" is null · Issue #2788 · projectlombok/lombok
March 24, 2021 - [BUG] Eclipse: java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.CompilationResult.getCompilationUnit()" because "unitResult" is null#2788
Author: projectlombok
🌐
Garmin Forums
forums.garmin.com › developer › connect-iq › f › discussion › 274440 › build-error-cannot-invoke-java-util-map-get-object-because-strings-is-null
BUILD: ERROR: Cannot invoke "java.util.Map.get(Object)" because "strings" is null - Connect IQ App Development Discussion - Connect IQ - Garmin Forums
September 23, 2021 - Connect IQ Connect IQ App Development Discussion BUILD: ERROR: Cannot invoke "java.util.Map.get(Object)" because "strings" is null ... Hey everyone! I set up my environment the day before yesterday, everything was running smoothly (I'm developing my first watch face ever, ran into some obstacles but it was finally looking good), when suddenly, after deleting some fonts from I wasn't using from my project directly from eclipse (instead of deleting them in the folder and refreshing), eclipse stopped compiling with this error message:
🌐
OneUptime
oneuptime.com › home › blog › how to handle 'cannot invoke method on null' errors
How to Handle 'Cannot invoke method on null' Errors
December 22, 2025 - Use Optional for values that might not exist, validate inputs at boundaries, use constructor injection with required dependencies, and return empty collections instead of null. Modern Java's helpful NPE messages make debugging easier, but prevention is better than cure.
🌐
Coderanch
coderanch.com › t › 772079 › java › java-lang-NullPointerException-invoke-String
java.lang.NullPointerException: Cannot invoke String.trim() because in is null (Servlets forum at Coderanch)
April 23, 2023 - Bear Bibeault wrote:OK, you need to debug line 31. Most likely, the value of the parameter is null causing the parse to fail. Use Dev Tools in the browser to look at your request. Is the parameter as expected? Or use logging in the Java code to trace the execution.
🌐
Sonar Community
community.sonarsource.com › sonarqube for ide › eclipse
Cannot invoke "String.equals(Object)" because "caseSensitivePropertyValue" is null - Eclipse - Sonar Community
October 13, 2023 - Please provide Windows 11 SonarLint for Eclipse 8.1.0.80220 Is connected mode used: Connected to SonarQube: * Enterprise Edition Version 8.9.9 (build 56886) After I upgraded the plugin I started seeing these errors every couple of minutes: Wait for server issues task failed java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "caseSensitivePropertyValue" is null at java.base/java.util.concurrent.FutureTask.report(Future...
🌐
Coderanch
coderanch.com › t › 750685 › engineering › Null-Pointer-exception-Unit-Test
Null Pointer exception in Unit Test (Testing forum at Coderanch)
java.lang.NullPointerException: Cannot invoke "com.example.onlinehotelbookingsystem.service.RoomService.findByHotelId(java.lang.Long)" because "this.roomService" is null at com.example.onlinehotelbookingsystem.service.impl.AccommodationServiceImpl.lambda$findById$0(AccommodationServiceImpl.java:56) at java.base/java.util.Optional.map(Optional.java:260) at com.example.onlinehotelbookingsystem.service.impl.AccommodationServiceImpl.findById(AccommodationServiceImpl.java:52) at com.example.onlinehotelbookingsystem.service.impl.AccommodationServiceImplTest.whenFindById_verifyThatIsNotNull(Accommoda
🌐
Sonar Community
community.sonarsource.com › sonarqube server / community build
Error during SS executionjava.lang.NullPointerException: Cannot invoke org.eclipse.jgit.li - SonarQube Server / Community Build - Sonar Community
October 4, 2022 - SonarQube version 9.5, dotnet Scanner, Run a new scan on a C# project tried twice and searched a little bit google I had run so many times sonarscanner against a C# project where there is no java as follows dotnet s…
🌐
JetBrains
youtrack.jetbrains.com › issue › IDEA-297028
Jetbrains
October 20, 2022 - Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions.
🌐
Reddit
reddit.com › r/javahelp › exception in thread "main" java.lang.nullpointerexception: cannot invoke "java.net.url.toexternalform()" because "location" is null
r/javahelp on Reddit: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null
May 18, 2023 -

https://pastebin.com/vtcMwSRn

So I am currently going crazy trying to get images to load when you export it to a .jar file. Before I was just using, "new imageicon("picturepath")"

As you can see from lines 30-34.

Then I found out that doesn't carry over when you make the project into a .jar file, okay cool. So I found out that you want to use, "getResource" okay cool got it. Try that and now I get the error in the title. when that location isn't fucking null so that's horse shit. I've tried every variation of that path. I have tried moving my images folder all over the project; from inside the src folder, where it is now, to just in the main project folder, etc. I don't know why it isn't happy.

Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
"java.net.URL.toExternalForm()" because "location" is null
at java.desktop/javax.swing.ImageIcon.<init>(ImageIcon.java:234)
at LaunchPage.<init>(LaunchPage.java:25)
at Main.main(Main.java:5)
Top answer
1 of 2
3
When you use getResource() (on a class or a classloader) the file is assumed to be located on the classpath, paths may be relative or absolute, but on the classpath. For example, MyClass.getClass().getResource("myfile"), will look for myfile in the same packege as MyClass (the file are assumed to be located in the same folder as "MyClass.class" when the program runs). You may read more about it at: https://www.baeldung.com/java-class-vs-classloader-getresource https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html (it is old, but still relevant)
2 of 2
1
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
🌐
jMonkeyEngine Hub
hub.jmonkeyengine.org › troubleshooting › general help
[SOLVED] Cannot invoke because "contentMan" is null - General Help - jMonkeyEngine Hub
June 6, 2024 - I just started JME3 to learn after many many years. And I know only Unity Godot. I just love Java and JME3. I was running code and stuck in this error. Help and suggest me what to read to improve my JME3 code and skills. package mygame; import com.jme3.app.SimpleApplication; import ...
🌐
CodeSpeedy
codespeedy.com › home › reasons and solutions of null pointer exception in java
Reasons and Solutions of Null Pointer Exception in Java - CodeSpeedy
October 11, 2021 - Exception in thread "main" java.lang.NullPointerException: Cannot throw exception because "null" is null at example5.main(example5.java:4)