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 6 of 6

Thread: app exe get error can't connect db server

  1. #1
    Junior Member
    Join Date
    Aug 2018
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default app exe get error can't connect db server

    hi!
    i am new in java and i create simple application login form and from launch4j i make exe file it works fine but when i i install diffrent computer i get error can't connect db server
    thanks
    Last edited by lavesh; August 18th, 2018 at 09:42 AM.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: app exe get error can't connect db server

    Is this a problem with a java program? Normally java programs do not execute from a exe file.

    Can you copy the full text of any error messages and paste it here?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Aug 2018
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: app exe get error can't connect db server

    thanks for your reply
    jar execu file in dist folder work fine
    i used launch4j to create exe file from jar file it works fine but i install diffrant machine i get error " can't connect db server"

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: app exe get error can't connect db server

    What is the full text of the error message when the code is executed?

    Does the program print out a full stack trace when there is an exception? It needs to do that so that error can be tracked down.
    Make sure all catch blocks have code that calls the printStackTrace method to give a full trace of the error.

    Have you tried to use the jar file that contains the program instead of using launch4j's output exe file?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Junior Member
    Join Date
    Aug 2018
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: app exe get error can't connect db server

    java.sql.SqlnonTransientConnectionException:Could not crete conection to database server.Attempted reconnect 3 times.Giving up

    java.lang.nullpointerException

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: app exe get error can't connect db server

    java.lang.nullpointerException
    That looks important. Can you add a call to printStackTrace to all the catch blocks so that the full stack is printed showing where the exception happened?


    You should copy and paste the exact text of any error messages. Don't type them in from memory.


    java.sql.SqlnonTransientConnectionException
    The API doc for that error says:
    Please consult your driver vendor documentation for the vendor-specified conditions for which this Exception may be thrown.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Connect to linux server
    By ggupta in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 17th, 2013, 06:19 AM
  2. Replies: 7
    Last Post: December 28th, 2012, 10:48 AM
  3. Connect to the server using java servlet
    By chandrababu in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 28th, 2012, 09:28 AM
  4. Connect to SQL server 2008
    By vahidbakhtiary in forum JDBC & Databases
    Replies: 1
    Last Post: July 2nd, 2012, 10:07 AM
  5. Cannot Connect to Server
    By Brt93yoda in forum Java Networking
    Replies: 0
    Last Post: December 9th, 2010, 05:54 PM