6 Followers · 157 Posts

Java Database Connectivity (JDBC) is an application programming interface (API) for the programming language Java, which defines how a client may access a database.

Currently could be downloaded from here.

Question Luis-Ángel Pérez-Ramos · Aug 1, 2019

Hi! I am creating a Jasper Report using IRIS like DB, I've created my Data Adapter to connect with my DB configuring the JDBC connector and it works perfectly:

But when I try to create a report connecting to my DB I am getting this error:

This is the error in detail: 

java.sql.SQLException: Communication link failure: Socket closed
    at com.intersystems.jdbc.OutStream.send(OutStream.java:48)
    at com.intersystems.jdbc.IRISDatabaseMetaData.executeCatalogQuery(IRISDatabaseMetaData.java:865)
    at com.intersystems.jdbc.IRISDatabaseMetaData.getTableTypes(IRISDatabaseMetaData.java:679)
    at

1
0 715
Question Luis-Ángel Pérez-Ramos · Jun 21, 2019

Hi!I am working in a java project (Spring Boot+ Maven + Hibernate) using jpa/hibernate to manage the persistance with the IRIS database from the Docker image (store/intersystems/iris:2019.2.0.107.0-community) and I've found an issue using the IRIS instance, when I define tables with relationships OneToMany, ManyToOne or ManyToMany and I try to fetch all the rows of the tables using the default method findAll (JpaRepository implements that method to get all the rows by default) the query automatically exceeds the limit of licenses availables.

11
1 715
Question Amir Samary · May 7, 2019

Hi!

I was trying to create a query that can be exposed as a stored procedure (function actually) that would return a resultset with a random number of columns. 

Unfortunately, it seems that unless I specify the ROWSPEC annotation on the Query method, I won't get any columns exposed. I was hoping to implement QueryNameGetInfo method and specify the names and number of columns I would be returning dynamically. But it seems that GetInfo information is simply ignored.

Here is my code:

Class Test.Test
{
	ClassMethod MyCustomQueryClose(ByRef qHandle As %Binary) As %Status
	{
	    Quit $$$OK
	}
5
0 763
Question Guillaume Rongier · Sep 20, 2018

Hi, We recover a large amount of data from an external database (SQLServer, about 1 million rows in JDBC).
However, we have treatment time issue.
This process takes more than 30 minutes whereas on a "classic" SQL Server Management Studio type request takes less than a minute.

While searching on the internet, I came across this article: http://makejavafaster.blogspot.com/2015/06/jdbc-fetch-size-performance.html
It explains how in Java, we can tweak the FetchSize parameter of the JDBC driver to optimize this kind of process.

Is there a way to access this JDBC parameter through the EnsLib.SQL.Outbound

7
1 1587
Question Guillaume Rongier · Jan 21, 2019

Hi, I'm looking for a way to implement the JDBC pattern "executeBatch" in ObjectScript: https://www.tutorialspoint.com/jdbc/jdbc-batch-processing.htm

Since Ensemble 2017.2.2 there is a new method called executeParametersBatch : https://docs.intersystems.com/ens20172/csp/docbook/relnotes/index.html#…

Even in the Ensemble 2018.1 change log, mention a patch on this method: https://docs.intersystems.com/ens20181/csp/docbook/relnotes/index.html#…

Do you have any examples or tracks to use the executeParametersBatch method of %Net.Remote.Java.JDBCGateway?
Otherwise have you

4
0 867
Question Daniel Martinez Contador · Sep 12, 2018

I'm new to Iris, trying to follow this guide ( https://community.intersystems.com/post/k-means-clustering-iris-dataset ) about using clustering. I've followed all instructions until showing the data. At that point, `dataFrame.show()` fails with `java.sql.SQLException: Access Denied`.

I'm using IRIS 2018.12.609.0 on Windows 10 Pro 64 bits. Python is 3.6.6, PySpark is 2.3.1, installed from Anaconda (Python 3.6.6 |Anaconda, Inc.| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)] on win32).

Along the road I had problems with Hadoop winutils, solved using information here (

2
0 1773
Question Scott Roth · Aug 8, 2018

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

In reading some of the material about using a Domain Service Account it mentions having kerberos

4
0 4436
Question Scott Roth · Jun 7, 2018

Without installing Kerberos has anyone Authenticated a SQL JDBC connection? Currently we are using local SQL Accounts to sign onto External SQL Databases, but we are being told that we need to switch to Service accounts that live on a Active Directory Domain. 

I wrote with a little help a ZAUTHENICATE to do the Authentication for Ensemble, can I use something like that to connect to an External SQL Database using a Service Account on a Active Directory Domain?

Thanks

Scott

3
0 608
Article Steven LeBlanc · Jan 28, 2016 1m read

This is a sample Ensemble/Health Connect production which demonstrates how to receive an HL7 order (ORM) inbound from a file, extract fields (in this case, basic demographic information), and insert those into a table in an external SQL database via ODBC.  

Included in the zip file:

  • Exported code
  • Sample ORM message
  • 'How to configure' doc 
3
0 1720
Question Max Dimukhametov · Mar 21, 2018

Hi all.

I have some problem with getting data from external source (PostgreSQL) via JDBC and load it in DeepSee and I resolved some problems while writing this question :)

So..Below I proved my steps of working:

  1. Created SQL Gateway Connection
  2. Created class for loading data via JDBC
    Connection=##class(%Library.SQLGatewayConnection).%New()
    sc=Connection.Connect("jdbcurl","user","pass",0)
    If $$$ISERR(scdo $System.Status.DisplayError(scquit
    S sc=Connection.AllocateStatement(.Statment)query="SELECT * FROM students"
    sc=Connection.Prepare(Statment,query)sc=Connection.Execute(Statme
7
0 581
Question minh nguyen · Dec 29, 2017

I'm referring to the document Using Cache with JDBC. Using this example, it sets the URL of the object ds of class CacheDataSource.

ds.setURL("jdbc:Cache://127.0.0.1:1972/SAMPLES");
My question is would you just copy and paste the URL from the login page to the string? I tried doing that and it returns an error saying "Invalid log file xyz"

Any help will be greatly appreciated! Thank you

4
0 1356
Question Scott Roth · Nov 3, 2017

I am trying to replace one of our SQL Integration Service jobs with Ensemble and I am running into an issue executing a query against a MS SQL database using JDBC drivers.

My SQL Outbound code looks like this.

Method SelectPaceartCharges(pRequest As osuwmc.Paceart.DataStructures.SelectPaceartBillingExtract, Output pResponse As EnsLib.SQL.Snapshot) As %Status [ ReturnResultsets ]{set query = "declare @currentYear int=datepart(year,getdate()) "set query =query_" declare @secondSundayOfMar datetime = CAST('3/8/' + CAST(@currentYear as varchar) as datetime)"set query =query_"
4
0 803
Question p rd · Oct 25, 2017

I defined the variables in Cache, as follows:

Property Content As% Stream.GlobalCharacter [Required, SqlColumnNumber = 3, SqlFieldName = B_Content];

And then use the SQL statement to add:

insert into table_name (B_Content) values ('very long string');

But the error:

 org.springframework.http.converter.HttpMessageNotWritableException: Could not write content: No serializer found for class com.intersys.jdbc.CacheInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: com

3
0 685
Article David E Nelson · Mar 9, 2017 9m read

Apache Spark has rapidly become one of the most exciting technologies for big data analytics and machine learning.Spark is a general data processing engine created for use in clustered computing environments.Its heart is the Resilient Distributed Dataset (RDD) which represents a distributed, fault tolerant, collection of data that can be operated on in parallel across the nodes of a cluster.Spark is implemented using a combination of Java and Scala and so comes as a library that can run on any JVM.

5
1 2845
Question Scott Roth · Jul 20, 2017

I am currently working on a issue with WRC on one of my Inbound SQL Adapters not returning all the records it should be. If I looked at the count of the records in Ensemble and compare it to that of a Microsoft SQL View, Ensemble seems to be off by a few records here and there. I am using a full dynamic select statement in my settings of the adapter.

SELECT Text, PhysicianLastName, PhysicianFirstName, PhysicianAddress1, PhysicianAddress2, PhysicianCity,

PhysicianState, PhysicianZip, PhysNum, InsertDate, FaxK, EnsIndex, MRN, AccountNum, FirstName, LastName

FROM vUHEpicMailEns
Order By FaxK

I have

5
0 878
Question P Patz · Jun 1, 2017

I need to guarantee that a parent AND child rows has been inserted successfully before any other process is able to read ANY of the data.

What is the proper way to prevent DIRTY reads?  Per the InterSystems's documentation I should be able to use 'START TRANSACTION ISOLATION LEVEL READ COMMITTED'.  I have attempted to use these commands in embedded and dynamic SQL calls to no avail.

I have to be able to insert the data via JDBC calls, but legacy Caché (.MAC) may be reading the data, and if the data is read to quickly, I could have processing errors, as all the child rows have not been inserted.

3
0 886
Question geoffroy saunier · May 30, 2017

Hi everyone,

i have a problem with the "ExecuteUpdateParmArray()" methode from the "EnsLib.SQL.OutboundAdapter" adaptater when i try to update a sql server 2008 table with JDBC connection.

..Adapter.ExecuteUpdateParmArray(.nRows,sqlUpdate,.param)

return to me the following error:

- "ERROR #5023: Remote Gateway Error: JDBC Gateway execUpdate(0) error -1: no value specified for parameter 1."

the sqlUpdate is like "update table SET column1 = ?,column2 = ?,column3 = ? where id = 1"

i built my param like this :

s param(1) = 'x'
s param(2) = 'y'
s param(3) = 'z'
s param = 3

i have no proleme for using

..A
3
0 665
Question Robert Hanna · Apr 24, 2017

I am trying to set up a sensor in PRTG to connect to Cache, specifically the ens_util.log, so that I can have a live feed of my error count. I am having trouble getting the sensor to log in to Cache. Has anyone had any luck getting PRTG to connect on the database level? Thanks!

2
0 607
Question Qualix Tecnologia · Feb 3, 2017

Hi

I created a jdbc connection in the Caché 2010.2.3  with SQLServer 2008R2.

The connection to this DB works correctly. (Conection Sucess)

I try to perform table binding but this connection, even though it is successful, does not load my tables and schemas.

I did the same test on Caché 2015 , with same jar drivers files and works perfectly!

Any idea?

Caché 2010.2.3

Red Hat Enterprise Linux Server release 6.2 (Santiago)

java version "1.7.0_09"

Caché 2015

Red Hat Enterprise Linux Server release 6.2 (Santiago)

java version "1.7.0_09"

2
0 641
Question Scott Beeson · Nov 18, 2016

I get this on some queries in some namespaces.  For instance, this query:

SELECT TOP 10 SessionId, datediff(s,min(TimeCreated),max(TimeCreated)) as ResponseTime
FROM ens.messageheader
GROUP BY SessionId
ORDER BY ResponseTime DESC

It works fine in HSBUS but in HSREG it throws the error.

Server closed communication device

Does anyone know what would cause this? Would it log something more useful somewhere?

7
0 1158