To resolve the issues with airlines.dat, do the following
Add to the JVM arguments of %Java Sever, "-Dfile.encoding=UTF-8" without the quotes
Edit airlines.dat and make the following changes
Replace "\N" which is a MySQL specific token with "" (i.e. the empty string). Due to specific interactions with InterSystem's JDBC clients with IRIS, "" is interpreted as NULL when inserted as a string.
Replace "\\'" (the escaped apostrophe) with "'" (just the single apostrophe) as InterSystem's JDBC clients do not require the escape character (which would otherwise be required in SQL).
You can just do "SELECT TOP X FROM ...." where X is the number of rows you're looking for. As mentioned in the above link
The TOP clause limits the number of rows returned to the number specified in int. If no ORDER BY clause is specified in the query, which records are returned as the “top” rows is unpredictable.
Are you running $system.OBJ.Load("name of file") without specifying any qualifiers? If so, I believe the default qualifiers are "CUK" (compile, update only, keep source). You might want to try $system.OBJ.Load("name of file", "CK") and see if that helps.
You can run a query like SELECT * FROM someTable ORDER BY %ID and it will order by the row ID without including it as part of the result set. Ultimately we would need more information (like the query you're running) to provide additional answers, but ORDER BY %ID sounds like what you want to use.
$system.OBJ.IsUpToDate()might fit the bill for your first question.
set sc = $system.OBJ.GetClassList(.classes)
set cls="", outdated=""
for {
set cls = $order(classes(cls))
quit:(cls="")
if '$system.OBJ.IsUpToDate(cls) set outdated = outdated _ $lb(cls)
}
for i=1:1:$listlength(outdated) {
write $listget(outdated, i)
}
set status = $system.Status.Error(5001, "This is an error")
and if you do
zwrite status
status="0 "_$lb($lb(5001,"This is an error",, ....."
I cut out a significant chunk (...) because it's not relevant.
You can see that the first character in status is "0", that is because if you try a unary operator
+status, -status, 'status
It will evaluate to the integer 0 and effectively work as a boolean flag. The part that matters is after the "0" inside the $listbuild.
The first element of $listbuild is the error code, followed by the message.
Because you set Test to 0 and nothing else, Objectscript recognizes that as a failure condition but has absolutely no information to provide beyond that. The recommendation is that you properly assign Test as a fully qualified %Status or change it to a %String where its value is equal to
$system.Status.GetErrorText(/* some %Status instance*/)
If you're using IRIS 2020.2.0 or above (both target and source instances must be ^2020.2.0), you can try to leverage %Net.DB.Iris. It's an implementation of IRIS Native for Java/.NET/Python/Node except for Objectscript. If there is enough interest for features like %Net.DB.Iris, @Bob Kuszewski would love to hear about it and communicate that interest over to the development teams!
The logfile will be in the working directory of wherever the JDBC process was launched, not necessarily your local working directory. If you're working from a Unix system, you can specify a full filepath. If you're working from Windows, then unfortunately, that will be an issue. A bug was recently fixed that allows the full filepath to be specified via the URL but that was only fixed recently in IRIS.
go to post
Yeah, the JVM encoding problem has been discovered internally and we're actively trying to correct it.
go to post
The %qparsets issue that you're seeing has been resolved internally and should be shipped as part of IRIS 2022.1.0
go to post
To resolve the issues with airlines.dat, do the following
Add to the JVM arguments of %Java Sever, "-Dfile.encoding=UTF-8" without the quotes
Edit airlines.dat and make the following changes
This will allow all 6162 rows be inserted.
go to post
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
You can just do "SELECT TOP X FROM ...." where X is the number of rows you're looking for. As mentioned in the above link
go to post
Are you running $system.OBJ.Load("name of file") without specifying any qualifiers? If so, I believe the default qualifiers are "CUK" (compile, update only, keep source). You might want to try $system.OBJ.Load("name of file", "CK") and see if that helps.
go to post
You can run a query like SELECT * FROM someTable ORDER BY %ID and it will order by the row ID without including it as part of the result set. Ultimately we would need more information (like the query you're running) to provide additional answers, but ORDER BY %ID sounds like what you want to use.
go to post
$system.OBJ.IsUpToDate()might fit the bill for your first question.
should work for your 2nd question (documentation here: https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....)
go to post
https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=RO...
SqlFieldName
go to post
Create a simple %Status like
set status = $system.Status.Error(5001, "This is an error")
and if you do
I cut out a significant chunk (...) because it's not relevant.
You can see that the first character in status is "0", that is because if you try a unary operator
+status, -status, 'status
It will evaluate to the integer 0 and effectively work as a boolean flag. The part that matters is after the "0" inside the $listbuild.
The first element of $listbuild is the error code, followed by the message.
Because you set Test to 0 and nothing else, Objectscript recognizes that as a failure condition but has absolutely no information to provide beyond that. The recommendation is that you properly assign Test as a fully qualified %Status or change it to a %String where its value is equal to
go to post
If you're using IRIS 2020.2.0 or above (both target and source instances must be ^2020.2.0), you can try to leverage %Net.DB.Iris. It's an implementation of IRIS Native for Java/.NET/Python/Node except for Objectscript. If there is enough interest for features like %Net.DB.Iris, @Bob Kuszewski would love to hear about it and communicate that interest over to the development teams!
go to post
https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?K...
Documents exactly what you're asking. According to official documentation, this is expected behavior.
go to post
I just did some research; Jars nested within Jars is actually a use-case that is not supported by Java.
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4735639
https://stackoverflow.com/questions/12357136/reference-jars-inside-a-jar/12357544
Supposedly there are Maven plugins you can use to help resolve your problem; but this is a well-known Java issue.
go to post
I want to make sure, AppSeguimientoAnadidaReferenciaJARSexternos.jar is included on the "Additional Paths".
I searched the Operation's XML definition and I didn't see it there.
go to post
What Java version are you using?
Can you provide the output of `jar -tf <name of your jar file>`?
NoClassDefFoundError is usually an indication that the classpath (as defined by the classloading operations performed) is not properly setup.
If your jar file isn't properly structured, that's the problem.
go to post
If you run "jar -tf" onto the jar file, does the directory structure of the jar file match example/KafkaBusinessOperation?
go to post
SELECT %ODBCOUT(TO_DATE('5/8/2020','MM/DD/YYYY'))
will also work.
go to post
The logfile will be in the working directory of wherever the JDBC process was launched, not necessarily your local working directory. If you're working from a Unix system, you can specify a full filepath. If you're working from Windows, then unfortunately, that will be an issue. A bug was recently fixed that allows the full filepath to be specified via the URL but that was only fixed recently in IRIS.
go to post
$system.SQL.Purge() is objectscript code. Sorry for assuming you were using IRIS Terminal.
If you're using JDBC, please edit your JDBC url to look like the following:
jdbc:IRIS://host:port/namespace/logfile
logfile will be written to the current directory of wherever the JDBC process in launched (i.e. the working directory of the JVM process).
go to post
%0AmBs1+1^%sqlcq.SMTKTUAT.cls498.1 is the label and offset of where in the cached query the error was thrown, but not the actual error itself.
How are you running the SQL query? ODBC? JDBC? Embedded? Dynamic? If ODBC or JDBC, do you have any logs?
Alternatively, try purging your cached queries ($ysstem.SQL.Purge()) and reattempt. There could be an issue with the cached query itself.
go to post
You might have success looking at this stackoverflow post: https://stackoverflow.com/questions/53237741/logstash-com-mysql-jdbc-driver-not-loaded
Your issue is with Logstash it seems.