#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Colin Parker · May 26, 2020

I am using the Java Binding to connect a Java Middleware Application to Cache.  Originally I was using a CacheListOfDataTypes (JAVATYPE = "java.lang.List") object to bring data back.  I was tasked with encrypting the data using AES and I was using the AESCBCEncrypt function on the List elements (up to 20k characters for each element) to bring it back before concatenating it on the middleware.  This almost worked.  Like 95% of the characters were being decrypted correctly but some text was coming back garbled.  I couldn't understand how this was happening. I tried to adjust things like the

3
1 564
Article Timothy Leavitt · Jan 15, 2020 9m read

Introduction and Motivation

A unit of ObjectScript code (a ClassMethod, say) may produce a variety of unexpected side effects by interacting with parts of the system outside of its own scope and not properly cleaning up. As a non-exhaustive list, these include:

  • Transactions
  • Locks
  • I/O devices
  • SQL cursors
  • System flags and settings
  • $Namespace
  • Temporary files
7
6 1527
Question István Nagy · May 27, 2020

   Hi,

 I've started to use Task Schedule function in Caché. But I have two questions about it:

  1. I want to run the task as an indepedent, technical user. What is the minimum resources for this user to successfully run the defined task.
  2. I disabled the built in user _SYSTEM, as the Tightening Security for an Instance article suggest. But I see that built in task run in the name of _SYSTEM user. For example Switch Journal. How can this work, if the user disabled? Should I use another user for this tasks?

Thanks!

4
0 325
Question Daniel McGowan · Mar 13, 2020

Hi All, 

So after finally getting cache to install (by enabling root user and disabling the gatekeeper) it tells me that it has started with one alert... that is "Private web server has not started after 5 seconds." - urgh!

Obviously i need access to the management portal to continue setup, I've done lots of googling but i cant find anything on this, does anyone have any ideas?

Many thanks, 

Dan

10
0 640
Question Daniel Lee · May 26, 2020

I have a class method that accepts a global parameter but when I attempt to order this global, the global name is listed as undefined. I can execute $DATA(pGlobalName) successfully.

ClassMethod ExamineGlobal(pGlobalName As %Global)
 {
   set gStatus=$DATA(pGlobalName) ; returns 1 
    write "This is the global name: "_pGlobalName
   set gmin=$ORDER(pGlobalName("")) ; here pGlobalName is undefined
 }

In debug mode, data returns 1 for a valid global with no descendants. This is expected.

3
0 366
Article Evgeny Shvarov · May 25, 2020 2m read

Hi ObjectScript developers!

InterSystems ObjectScript is perhaps the best language on the planet to deal with globals - and it is an interpretable language.

Yes, it has a compiler. But even the compiler can compile some lines in ObjectScript which will then fire as bugs during the runtime.

There are some technics on how to avoid that such as unit testing, coding guidelines and your coding experience, of course ;)

0
0 489
Question David Cui · May 24, 2020

I can run the following commands from the AIX command line prompt without any problem

-bash-2.05b$ echo t
t
-bash-2.05b$ echo œ
œ

When I call from insider cache, I have problem.

USER>D $ZF(-1,"echo t")
t

USER>D $ZF(-1,"echo œ")

D $ZF(-1,"echo œ")
^
<TRANSLATE>

I am using cache 2017.2.  Can someone shed some light?

Thank you.

5
0 275
Question Paul Hula · May 22, 2020

Hi All,

   It must be the groundhog days but I can't solve something that I know I've done before.  I have a legacy CSP page on a version of Cache without JSON and just pure Cache.

  I need a CSP page that takes a .xlsx file, manipulates the file (in COS) and then returns a new manipulated file.

  My CSP Page gets the file fine, the problem is then returning the response with the new file as an attachment.  I don't want to pipe to a new csp page with a different content-type so was sure I can set %response.Headers etc to get the reply stream I want.

6
0 892
Discussion Evgeny Shvarov · Mar 24, 2017

Hi, Community!

Would you please share your best practices for utilising 3rd party modules (say community solutions, frameworks, development tools/utils).

There are two approaches which I like:

1. New namespace for every new module

So, if you install something you install it in special separate namespace/database. MDX2JSON/DeepSeeWeb case.

If the package is intended to be used in other namespaces, map the packages to %All and have it available in all the namespaces in this Caché/Ensemble.

And there is one more benefit: it is easy to uninstall the module, just delete the namespace/database.

5
0 528
Question Ronnie Fish · Apr 28, 2020

Has anyone recently deployed the cache-git-studio plugin from Github repo?

In particular, I see that this plugin is installed at the namespace level, so it appears for each user have their commits in their own name, they must all be running a locally installed cache server when doing their dev work. I suspect that is the preferred way.

In my organization they are currently just accessing a remote cache server from Studio. In that scenario, it looks like it would be one installation of git for the whole team. and thus only one shared git user.

3
0 679
Question Henry Pereira · May 20, 2020

Hi community,

I need to write an SQL query  to fetch a random record from a table, that table has millions of data.

In postgresql, for example, there is a RANDOM() function to do something like that:

SELECT column FROM table
ORDER BY RANDOM()
LIMIT 1

Is it possible to do something like that in Caché?

Thanks in advance

8
0 910
Article Marc Mundt · Jun 30, 2016 3m read

The Caché System Management Portal includes a robust web-based SQL query tool, but for some applications it’s more convenient to use a dedicated SQL client installed on a user’s PC.

SQuirreL SQL is a well known open source SQL client built in Java, which uses JDBC to connect to a DBMS. As such, we can configure SQuirreL to connect to Caché using the Caché JDBC driver.

Finding Caché’s JDBC driver JAR

10
1 10982
InterSystems Official Pete Greskoff · May 20, 2020

InterSystems has corrected two defects that affect online backup of very large databases. Backups taken via external methods, such as snapshots or direct file copies, are not affected. These defects exist in all released versions of all InterSystems products.

The first defect only affects databases with more than 231 blocks. It results in a degraded database after restoring from an online backup. For example, databases that have a block size of 8 KB (the default) are only affected if they are larger than 16 TB. The correction for this defect is identified as RJF437.

0
0 265
Article Murray Oldfield · Feb 20, 2017 3m read

Note (October 2022): yape has been deprecated and replaced by YASPE, there is no more development on yape.

Note (June 2019): A lot has changed, for the latest details go here

Note (Sept 2018): There have been big changes since this post first appeared, I suggest using the Docker Container version, the project and details for running as a container are still in the same place  published on GitHub so you can download, run - and modify if you need to.

5
2 1991
Question Yone Moreno · May 19, 2020

Hello,

We are trying to connect to a database through a JavaGateway.

We observe that the JavaGateway reports:

Failed to start the Java Gateway server: ERROR #5002: Error de cache: <UNDEFINED>zGetJavaVersion+22^%Net.Remote.Service.1 *versionWithPrefix

We have checked that we do have the Java Home set:

/usr/java/jdk1.8.0_65

And we have seen the java files in the server:

We have read the code where the exceptions being raised:

2
0 703
Question Laura Cavanaugh · May 11, 2020

Hello all, I have a question about constucting thousands of clones, and scope.

In my code, I'm looping through a database, say 200k+ objects, and creating a clone of each object (we need to evaluate a modified clone of the object, but not account for what's on disk).  

I see this a lot in the documentation:

7
0 812
Article Murray Oldfield · Apr 1, 2016 2m read

Previously I showed you how to run pButtons to start collecting performance metrics that we are looking at in this series of posts.

##Update: May 2020.

Since this post was written several years ago, we have moved from Caché to IRIS. See the comments for an updated link to the documentation for pButtons (Caché) and SystemPerformance (IRIS). Also, a note on how to update your systems to the latest versions of the performance tools.

2
0 1693
Discussion Murillo Braga · May 13, 2020

Hello guys, 

I have used the Studio SOAP wizard to generate some webservice client classes and amongst those classes:

Class RMH.SOAP.s0.Output Extends (%Persistent, %XML.Adaptor) [ ProcedureBlock, SqlTableName = _Output ] {
...
Property Value As %GlobalCharacterStream(XMLNAME = "Value");

And the caller looks like

Class RMH.SOAP.SoapTreeSoap Extends %SOAP.WebClient [ ProcedureBlock ] {
...
Method Run...(Tree As %String, Inputs As %String, Debug As %Integer) As RMH.SOAP.s0.Output 
3
1 593
Question Michael Gosselin · May 14, 2020

So, I was doing a debug test on a routine, and tried to open a file (yes, it does exist) as so:

file=##class(%File).%Open($$$airfile,"R")

And, I got the above-mentioned error. It begins with "cn_iptcp://localhost:56775/%Stream.Object.1.INT" in case the port means anything.

This is a single-license version of Cache 2017.2, which I installed about three years ago. You would think I'd have the .INT files, but I don't. Oh, one other oddity: I can't seem to compile the routine, despite having admin privs for the machine. It's Windows 7 64-bit.

Any help is appreciated.

2
0 450
Announcement Rob Tweed · May 15, 2020

I've created a new repository that I will use for providing examples of various scenarios and use cases for QEWD

https://github.com/robtweed/qewd-microservices-examples

Initially it contains a example of a scenario I'm often asked about: a set of REST APIs, with JWT support, implemented as a set of QEWD MicroServices, each of which uses Cache or IRIS running on a Windows system.

What I've provided is a detailed, step-by-step guide (with detailed explanations) of how to set up such a system.

The example shows a use case of REST APIs to:

- authenticate / login

0
1 477
Question Jo Ellen Laansma · May 13, 2020

I have a class that writes to an external SQL Server database.  When the field is empty, it does not write the column and the column has the value NULL.  In some cases, I want the column to be the value of the empty stringinstead of NULL.

Class myRequestClass Extends Ens.Request
{

    Property MessageType As %String

}

The message that is passed to this class shows:

    <MessageType></MessageType>

Which writes the field as NULL with:

    tSQL = "insert into myTable (MessageType) values (?)"

    set tSC = ..Adapter.ExecuteUpdate(.tNumberOfRowsUpdated,tSQL,myRequestClass.MessageType)

5
0 16670
Question Arto Alatalo · Apr 15, 2020

If two globals have same structure, how to reuse one CacheSQLStorage-based class to read both locations?

Thanks!

Update:

Let's say we have two globals:

^a(1)="dataa1"
^a(2)="dataa2"

and

^b(1)="datab1"
^b(2)="datab2"

i.e. the structure difference is global name only.

I would like to have two classes TableA and TableB both are inherited from TableAB, and TableAB taking global name as a parameter.

14
0 732
Question Curtis Walter · May 9, 2020

Howdy everyone,
I am not a Cache Pro... Just an old hack with an idea to try to help my client.

We are running a medium sized salvage yard with Car-Part's Checkmate vehicle inventory software running Cache. Our part lookups sometimes run 10 seconds or more.

2
0 483
Question Christopher Kennedy · May 8, 2020

I am importing scriptlink wsdl in the form designer.  I get the following error: 

Error Importing WSDL.  Please validate WSDL address.  ERROR #6301: SAX XML Parser Error attribute value expected while processing Annonymous Stream at line 28 offset 73.

Please advise. 

Thank you, 

Chris Kennedy

5
0 465
Question Yone Moreno · May 11, 2020

Hello,

We would like to know if Ensemble could generate a CADES sign from a string and a certificate.

We have read:

https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GXM…

So we have seen that we could create a class, to sign a document, and store the sign inside that new class. We have also seen that there are some different algorithms to choose from, like sha1.

In addition we have also consulted the CADES sign definition:

https://tools.ietf.org/html/rfc5126

The use case is to avoid being dependant of an external web service, and be able to generate it.

1
0 213