0

I am using Eclipse for JAVA.

I have install java 8 with update 301.

It used to work fine but all of a sudden I am getting this error:

Trying to connect

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2874)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2361)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:44)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2347)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:6276)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1794)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1405)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1069)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:905)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:452)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1014)
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
    at pap.costMargin.dbconnect(costMargin.java:65)

would appreciate if someone please help.

thanks.

Stultuske
  • 9,296
  • 1
  • 25
  • 37
  • 3
    what do you think "NoClassDefFound" means? in Java 8, certain libraries have been removed from the jdk, for which you'll need to add a dependency yourself – Stultuske Sep 22 '21 at 06:24
  • Does this help? [java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter](https://stackoverflow.com/questions/42966880/java-lang-noclassdeffounderror-javax-xml-bind-datatypeconverter) – Abra Feb 27 '22 at 06:17
  • Can you share more logs.. there should be a "caused by" somewhere in the stack... – z atef Feb 27 '22 at 06:19

0 Answers0