Net sourceforge jtds jdbc driver error

Today I am doing Connectivity of SqlServer using JTDS driver. But when I run program I found Below error Java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver Caused by: java.lang.

Today I am doing Connectivity of SqlServer using JTDS driver. But when I run program
I found Below error

Java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
Caused by: java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver in loader dalvik.system.PathClassLoader[/data/app/com.kmkm.lll-2.apk]

I already search on this topic and I found answer as

java -classpath .:jtds.jar MyApp 

but I am confuse how and where I run this command?
Why this error comes?

asked Sep 6, 2012 at 7:45

user1153176's user avatar

user1153176user1153176

1,0065 gold badges15 silver badges21 bronze badges

I had the same problem with my Android app in Eclipse. What worked for me was to export the external jars with my app.

If you have already added the jtds-1.2.5 driver, good. Otherwise:

Right click on the Project > Properties > Libraries Tab
Add the jtds-1.2.5.jar file by clicking on «Add External JARs»

Next, in the Order and Export tab (Right next to Libraries in the Java Build Path window) check the box for jtds-1.2.5.jar (and any other external jars you might have).

This will export the .jar containing the driver with the .apk file.

answered Sep 22, 2012 at 21:54

Roger Garza's user avatar

Roger GarzaRoger Garza

1,4631 gold badge12 silver badges11 bronze badges

1

If you are using eclipse, Try this steps

  • Right click on your project
  • Click Build Path > Configure Build Path…
  • Choose Libraries tag and click Add External JARs…
  • Point your jtds.jar and click OK.
  • Rebuild and run again.

answered Sep 6, 2012 at 8:04

Sai Ye Yan Naing Aye's user avatar

0

If you use a third party library, make sure you have all its required dependencies, if it requires any.

sebnukem's user avatar

sebnukem

7,9635 gold badges37 silver badges48 bronze badges

answered Sep 6, 2012 at 7:51

Andy Res's user avatar

Andy ResAndy Res

15.9k4 gold badges59 silver badges96 bronze badges

jTDS supports Windows Authentication, which is what I need.

1. I downloaded jTDS, put the jar file to my directory /opt/data/xxxx

2. I ran

sqoop list-tables -libjars «/opt/data/xxxxxx/jtds-1.3.1.jar»
—driver «net.sourceforge.jtds.jdbc.Driver»
—connect «jdbc:jtds:sqlserver://xxx.xxx.xxx.xxxyyyy;domain=ad»
—username xxxxxx
—password ‘xxxxxx’

3. Error:

……

16/05/25 19:11:15 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: net.sourceforge.jtds.jdbc.Driver
java.lang.RuntimeException: Could not load db driver class: net.sourceforge.jtds.jdbc.Driver
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:848)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.listTables(SqlManager.java:517)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
at org.apache.sqoop.Sqoop.main(Sqoop.java:244)

4. Java version

$ java -version
java version «1.7.0_85»
OpenJDK Runtime Environment (rhel-2.6.1.3.el6_7-x86_64 u85-b01)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)

5. jar file check

]$ jar tf jtds-1.3.1.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/services/
net/
net/sourceforge/
net/sourceforge/jtds/
net/sourceforge/jtds/jdbc/
net/sourceforge/jtds/jdbc/cache/
net/sourceforge/jtds/jdbcx/
net/sourceforge/jtds/jdbcx/proxy/
net/sourceforge/jtds/ssl/
net/sourceforge/jtds/util/
META-INF/services/java.sql.Driver
net/sourceforge/jtds/jdbc/BlobImpl.class
net/sourceforge/jtds/jdbc/CachedResultSet.class
net/sourceforge/jtds/jdbc/CharsetInfo$1.class
net/sourceforge/jtds/jdbc/CharsetInfo.class
net/sourceforge/jtds/jdbc/Charsets.properties
net/sourceforge/jtds/jdbc/ClobImpl.class
net/sourceforge/jtds/jdbc/ColInfo.class
net/sourceforge/jtds/jdbc/DateTime.class
net/sourceforge/jtds/jdbc/DefaultProperties.class
net/sourceforge/jtds/jdbc/Driver.class
……

Any idea of the failure?

Thanks a lot!

Troubleshooting

Problem

Attempts to report IBM Rational ClearQuest data through IBM Rational Team Concert BIRT reports results in JDBC connection errors.

Symptom

After running the report, the following error will be shown on the Rational Team Concert report:


Table (id = your_table):

+ An exception occurred during processing. Please see the following message for details:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
Cannot load JDBC Driver class: net.sourceforge.jtds.jdbc.Driver.

Cause

This error is caused by having misplaced or removed the ClearQuest JDBC driver .JAR file.

Resolving The Problem

To resolve the JDBC connection error, you need to place your ClearQuest database .JAR file within the drivers directory of the IBM Rational Jazz Team Server, IBM Rational Change and Configuration Management, and IBM Rational Quality Manager applications by following the procedure below:

  1. Shut down Rational Team Concert
  2. Navigate to the
    org.eclipse.birt.report.data.oda.jdbc_2.5.2.v20100205.jar

    by following the path:

    %server_install_drive%serverconfjtssitesupdate-sitepluginsorg.eclipse.birt.report.data.oda.jdbc_2.5.2.v20100205.jar

  3. Open the org.eclipse.birt.report.data.oda.jdbc_2.5.2.v20100205.jar
  4. Within the .JAR file, there is a folder called Drivers
  5. Place the ClearQuest JDBC .JAR file within the Drivers folder
  6. Repeat these steps for the Change and Configuration Management and Quality Management applications
  7. Delete the Catalina folder located in the following directory to clear the cached plug ins:

%server_install_drive%servertomcatwork

Note: If you are using IBM WebSphere Application Server you can use the following URL to reload your plug ins (this requires a server restart to come into effect):
https://your_server_name:port/jts/admin/cmd/requestReset

8. Start Rational Team Concert and run the report.

[{«Product»:{«code»:»SSUVV6″,»label»:»IBM Engineering Test Management»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:» «,»Platform»:[{«code»:»PF016″,»label»:»Linux»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»3.0.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB59″,»label»:»Sustainability Software»}},{«Product»:{«code»:»SSUC3U»,»label»:»IBM Engineering Workflow Management»},»Business Unit»:{«code»:»BU055″,»label»:»Cognitive Applications»},»Component»:»Integrations: IBM»,»Platform»:[{«code»:»PF016″,»label»:»Linux»},{«code»:»PF033″,»label»:»Windows»}],»Version»:»3.0.1″,»Edition»:»»,»Line of Business»:{«code»:»LOB59″,»label»:»Sustainability Software»}}]

Product Synonym

Rational Team Concert;Rational Quality Manager

Понравилась статья? Поделить с друзьями:
  • Net runtime error 1026
  • Net runtime error 1000
  • Net runtime 1026 ошибка windows 10
  • Net list error
  • Net host ошибка