How can I fix missing derby ClientDriver issue? - javadb

I am pretty new to java DB and I'm trying to set up Java DB in NetBeans IDE using this tutorial: https://netbeans.org/kb/docs/ide/java-db.html
During the step, where it tells to create database, I get such an error:
An error occurred while creating the database: java.lang.ClassNotFoundException: org.apache.derby.jdbc.Clientdriver
How do I fix this issue?

Which version of Derby / JavaDB are you using?
If it is 10.15.1.3, see this response: Where is org.apache.derby.jdbc.ClientDriver for version 10.15.1.3?
Within Netbeans there seems to be the same issue with ClientDriver. As a workaround, download and use Derby 10.14.2.0 instead. A Netbeans bug report Apache JIRA Netbeans-3424 (https://issues.apache.org/jira/browse/NETBEANS-3424) has been submitted.

I found it in lib\derbytools.jar\org\apache\derby\jdbc
copied the entire jdbc folder and pasted in lib\derbyclient.jar\org\apache\derby
then it works.
Goodbye.

Related

Error builtin:list-members on trying auto complete in mysql workbench

Till yesterday auto complete was working in mysql workbench. Today getting below error on trying auto complete(Ctrl+space).
Kindly help to resolve it if you have an idea.
I restarted MySQL Workbench and now its working fine.
It appears this is a known bug in MySQL workbench since 2018: bugs.mysql.com...
Others have had success from rolling back to version 6.3.10. The bug is still present in the current version 8.0.23.
Another potential solution is delete the .column_widths file in:
[username]\AppData\Roaming\MySQL\Workbench\cache
Ironically Mysql Workbench's .column_widths appear to be a sqlite version 3 file
I believe you corrupted your Workbench installation somehow, so the easiest way to fix that is to re-install the application.

Why is Talend giving ClassNotFoundException for SQLServerDriver

I've installed Talend ESB 6.5.1 and am trying to connect to a SQL Server database.
I tried using the JTDS driver, but that didn't work, and it appeared that I needed a DLL that wasn't included in the , and do I installed the pure java MS driver instead.
Talend has put the MS driver into Studio\workspace\xxx\temp\dbWizard having renamed it, but when I try to use it I get
Database connection is failed.
java.lang.RuntimeException: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.talend.core.model.metadata.builder.database.JDBCDriverLoader.getConnection(JDBCDriverLoader.java:195)
...
It looks like Talend has put the jdbc driver somewhere, but it not referencing it correctly.
Any ideas what I need to do to get Talend to find it? (I've looked inside the .jar file and the class is definitely there.)
(Taking the generated JDBC URL and using this directly in a tJDBCInput with the driver jar selected works fine... bizarre)
The location where your jar was put does not look familiar. Try deleting all the jtds jar versions in the following locations :
<Talend root folder>\configuration\.m2\repository\org\talend\libraries
<Talend root folder>\lib\java
And restart your studio. When you go back to your component, you'll see an install button. You should be able to download and install the jar.

java.lang.NoClassDefFoundError: java/util/concurrent/CompletableFuture while running bin/gremlin.sh

im trying to setup Titan db on MAC OS X. unziped titan-1.0.0-hadoop1.zip...in bin folder tried to execute gremlin.sh and saw the error.
Can someone help?
The class java/util/concurrent/CompletableFuture was introduced in Java 8. So it Looks like you have an older jre running. Change to Java8 and the exception should go away
See the documentation of this class

Crystaldecisions ReportSDKIllegalArgumentException

I am currently working on a migration of BO 4.1 related tool.
The tool is used to deploy the crystal reports from drop location to BO Server. The tool was developed using BO XI 3.1 Java SDK code and will be migrated to BI 4.1.
In the code it is getting IInfoObjects instance by querying infoStore.
Query used
"SELECT TOP 1 * FROM CI_INFOOBJECTS WHERE SI_KIND='CrystalReport' AND SI_NAME ='XXXX' AND SI_INSTANCE = 0"
There is no infoObjects available currently and the code hence create a new infoObjects collection by using
infoStore.newInfoObjectCollection();
Further the code will create IReport using the following code
IReport report = (IReport) infoObjects.add(pluginInfo);
During this execution I am getting following exception
Exception in thread "main" java.lang.NoClassDefFoundError:
com/crystaldecisions/sdk/occa/report/lib/ReportSDKIllegalArgumentException
at
com.crystaldecisions.sdk.plugin.desktop.report.internal.ReportFactory.makePlugin(ReportFactory.java:83)
at
com.crystaldecisions.sdk.occa.pluginmgr.internal.PluginMgr.getPluginInterface(PluginMgr.java:349)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add_aroundBody0(InfoObjects.java:775)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add_aroundBody1$advice(InfoObjects.java:512)
at
com.crystaldecisions.sdk.occa.infostore.internal.InfoObjects.add(InfoObjects.java:1)
I searched around for the exception and it appears some jar mismatch issue, but could not understand which jar and where can I find those jars.
Any suggestion will be helpful.
Include CrystalReportsSDK.jar in your project.
There are a number of utilities to help with finding jar files for missing classes. I prefer the cheap approach -- just do unzip -l *.jar > jars.txt from a jar directory, then search jars.txt for the missing class.
Thanks! Adding the jar helped me to resolve the problem.
To answer the second question that I asked, about the location of the jars
{Installation loc}/opt/businessobjects/bo41/sap_bobj/enterprise_xi40/java/lib

Getting derby database connection from Java (in eclipse)

I was following the following instructions:
http://www.eclipse.org/articles/article.php?file=Article-EclipseDbWebapps/index.html
in order to set-up a derby database server and everything works fine. I created the DB and could easily access it. however, these instructions use JSP to access my DB and I wand to change it so that I can access the DB through my custom Java classes but I cant create any connections to the DB. I simply tried:
Connection con = DriverManager.getConnection
("jdbc:derby://localhost:1527/features", "root", "root");
Note: here my DB is names features
I get the error:
java.sql.SQLException:
No suitable driver found for jdbc:derby://localhost:1527/features
I tried loading the class for the driver:
Class.forName("org.apache.derby.jdbc.ClientDriver");
I get the error:
java.lang.ClassNotFoundException:
org.apache.derby.jdbc.ClientDriver
I dont know where to find and put org.apache.derby.jdbc.ClientDriver. How come in the instructions they only add a context.xml under META_INF and everything work? What am I missing?
Did you:
Copy the file derbyclient.jar from that folder to your TOMCAT_ROOT/lib
folder (if you're using Tomcat 5.x, install into
TOMCAT_ROOT/common/lib). This installs the Derby JDBC driver into
Tomcat for use in a DataSource.
You need the derbyclient.jar in the classpath.