Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Exception in thread "main" java.lang.Error: Unresolved compilation problems:

  1. #1
    Junior Member
    Join Date
    Jun 2020
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Exception in thread "main" java.lang.Error: Unresolved compilation problems:

    Hello,

    I have run my java code and i recived the following error -
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    Unhandled exception type IOException
    Unhandled exception type ClassNotFoundException
    Unhandled exception type IOException
    Unhandled exception type ClassNotFoundException

    at Controller.Controller.<init>(Controller.java:15)
    at Drive.MVCdriver.main(MVCdriver.java:41)

    at the line 14,41 i can find constractor call that marked with red collor ->
    private UserRepositoryImple userRep = new UserRepositoryImple();

    please let me know what am i missing.

    thanks

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Exception in thread "main" java.lang.Error: Unresolved compilation problems:

    Unhandled exception type IOException
    A method that is called in that area of the code is declared to throw the exception. Your code must be prepared to handle that exception if it is thrown. One way to wrap that area of the code in a try{}catch block
    another way is to pass that exception to another level by declaring your method might throw the exception.

    Read about exceptions in the tutorial: https://docs.oracle.com/javase/tutor...ons/index.html

    --- Update ---

    Also posted here: https://coderanch.com/t/731573/Excep...a-lang#3403764

    Please read: http://www.javaprogrammingforums.com...s-posting.html
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. I get the error Exception in thread "main" java.lang.NullPointerException?
    By jeremy28 in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: October 3rd, 2013, 11:13 PM
  2. Replies: 1
    Last Post: April 7th, 2013, 03:40 PM
  3. Replies: 3
    Last Post: December 7th, 2011, 02:03 AM
  4. [SOLVED] Error Message: Exception in thread "main" java.lang.NullPointerException etc.
    By coffecupcake in forum What's Wrong With My Code?
    Replies: 5
    Last Post: November 15th, 2011, 09:34 AM
  5. Replies: 6
    Last Post: November 12th, 2010, 04:40 AM

Tags for this Thread