Apache Extras Cassandra-JDBC: Invalid method name: 'prepare_cql_query' - jdbc

I'm using the Apache Extras project cassandra-jdbc ( http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/ ) on version 1.1.1 along with the cassandra-thrift and cassandra-clientutil dependencies on version 1.1.1.
My Cassandra version is 1.0.10 though. I had to use the cassandra-jdbc on version 1.1.1 because the PreparedStatements were not available in earlier versions.
The problem I'm getting is:
org.apache.thrift.TApplicationException: Invalid method name: 'prepare_cql_query'
at org.apache.thrift.TApplicationException.read(TApplicationException.java:108)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:71)
at org.apache.cassandra.thrift.Cassandra$Client.recv_prepare_cql_query(Cassandra.java:1438)
I read somewhere else ( https://wso2.org/jira/browse/CARBON-13577 ) this might be solved by upgrading Cassandra to 1.1.0, but I'm using DataStax so I'm not sure I can upgrade it. Is there another way to get past this?

That is for the simple reason that prepared statements are not supported until Cassandra 1.1: https://issues.apache.org/jira/browse/CASSANDRA-2475

Related

Stanford CoreNLP version 4.2.0

Are there any migration hints about moving to v4.2.0? This page https://stanfordnlp.github.io/CoreNLP/migration.html is quite helpful but does not cover the current release.
FWIW, I revved my version from 4.0.0 to 4.2.0 and am now getting a lot of SUTime errors. This is running under Corretto java 11.
$ java --version
openjdk 11.0.9.1 2020-11-04 LTS
OpenJDK Runtime Environment Corretto-11.0.9.12.1 (build 11.0.9.1+12-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.9.12.1 (build 11.0.9.1+12-LTS, mixed mode)
java.lang.RuntimeException: Could not parse date string: [335-58-2020]
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.extractTimeExpressionCoreMaps(TimeExpressionExtractorImpl.java:101)
at edu.stanford.nlp.ie.regexp.NumberSequenceClassifier.runSUTime(NumberSequenceClassifier.java:345)
at edu.stanford.nlp.ie.regexp.NumberSequenceClassifier.classifyWithSUTime(NumberSequenceClassifier.java:143)
at edu.stanford.nlp.ie.regexp.NumberSequenceClassifier.classifyWithGlobalInformation(NumberSequenceClassifier.java:106)
at edu.stanford.nlp.ie.NERClassifierCombiner.recognizeNumberSequences(NERClassifierCombiner.java:326)
at edu.stanford.nlp.ie.NERClassifierCombiner.classifyWithGlobalInformation(NERClassifierCombiner.java:281)
at edu.stanford.nlp.ie.AbstractSequenceClassifier.classifySentenceWithGlobalInformation(AbstractSequenceClassifier.java:343)
at edu.stanford.nlp.pipeline.NERCombinerAnnotator.doOneSentence(NERCombinerAnnotator.java:554)
.....
Caused by: org.joda.time.IllegalFieldValueException: Value 58 for dayOfMonth must not be larger than 31
at org.joda.time.chrono.BaseChronology.validate(BaseChronology.java:195)
at org.joda.time.Partial.<init>(Partial.java:272)
at org.joda.time.Partial.with(Partial.java:495)
at edu.stanford.nlp.time.JodaTimeUtils.setField(JodaTimeUtils.java:284)
at edu.stanford.nlp.time.SUTime$IsoDate.initBase(SUTime.java:3371)
at edu.stanford.nlp.time.SUTime$IsoDate.<init>(SUTime.java:3347)
at edu.stanford.nlp.time.SUTime.parseDateTime(SUTime.java:3756)
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.extractTimeExpressionCoreMaps(TimeExpressionExtractorImpl.java:99)
Thanks
There isn't any migration required for 4.2.0 it only contains small changes. Could you please let me know what examples generate those errors.
As for the part-of-speech tagging changes, we change the models from time to time, so that will cause changes such as that.

OSGI resolution error - missing system.bundle

I'm suddenly getting the following weird resolution error:
[ERROR] Resolution failed. Capabilities satisfying the following requirements could not be found:
[<<INITIAL>>]
? osgi.identity: (osgi.identity=javafx-osgi)
? [javafx-osgi version=8.0.2]
? osgi.wiring.host: (osgi.wiring.host=system.bundle)
It appears that the system bundle (Apache Felix framework) is no longer being found... Oddly, this error just popped up today. I havent worked on this project for a week. But the last commit ran without a problem. If I revert to an earlier revision of the program, the problem remains...
We are using Java 1.8.0 161-b12; BND Tools 4.0.0 and Apache Felix Framework 1.8.
Our app.bndrun looks like this:
index: target/index.xml
-standalone: ${index}
-runrequires: osgi.identity;filter:='(osgi.identity=org.ops4j.pax.logging.pax-logging-service)', \
osgi.identity;filter:='(osgi.identity=javafx-osgi)', \
osgi.identity;filter:='(osgi.identity=com.foo.bar.command)',\
osgi.identity;filter:='(osgi.identity=com.foo.bar.testservice)', \
osgi.identity;filter:='(osgi.identity=com.foo.bar.main-screen)', \
osgi.identity;filter:='(osgi.identity=com.foo.bar.verify-screen)', \
osgi.identity;filter:='(osgi.identity=com.foo.bar.testclient)'
-runfw: org.apache.felix.framework;version='5.6.8'
-runee: JavaSE-1.8
-runbundles: \
com.foo.bar.testservice;version='[0.0.1,0.0.2)',\
org.apache.felix.scr;version='[2.1.0,2.1.1)',\
org.osgi.service.log;version='[1.4.0,1.4.1)',\
org.osgi.util.function;version='[1.1.0,1.1.1)',\
org.osgi.util.promise;version='[1.1.0,1.1.1)',\
org.osgi.util.pushstream;version='[1.0.0,1.0.1)',\
com.foo.bar.testclient;version='[0.0.1,0.0.2)',\
org.ops4j.pax.logging.pax-logging-api;version='[1.10.1,1.10.2)',\
org.ops4j.pax.logging.pax-logging-service;version='[1.10.1,1.10.2)',\
javafx-osgi;version='[8.0.2,8.0.3)',\
com.foo.bar.launcher;version='[0.0.1,0.0.2)',\
com.foo.bar.main-screen;version='[0.0.1,0.0.2)',\
com.foo.bar.ui-main;version='[0.0.1,0.0.2)',\
com.foo.bar.verify-screen;version='[0.0.1,0.0.2)',\
org.apache.felix.configadmin;version='[1.9.2,1.9.3)',\
com.foo.bar.launcher;version='[0.0.1,0.0.2)',\
com.foo.bar.command;version='[0.0.1,0.0.2)'
-runproperties: felix.cm.dir="${user.home}\\Documents\\Prog731\\config"
This is a small demo program with very few dependencies. As far as I can determine, neither our code nor any the external dependencies have changed. But the problem is reproducible on different development machines...
What could cause a resolution error such as this?
UPDATE:
We are using the latest development snapshots of the bndtools 4.x from the https://bndtools.ci.cloudbees.com repository. Might this be it?
UPDATE #2:
As Requested, the MANIFEST of javafx-osgi-8.0.2.jar:
Manifest-Version: 1.0
Export-Package: com.sun.javafx, com.sun.glass.ui, com.sun.javafx.anima
tion, com.sun.javafx.applet, com.sun.javafx.application, com.sun.java
fx.beans, com.sun.javafx.beans.event, com.sun.javafx.binding, com.sun
.javafx.charts, com.sun.javafx.collections, com.sun.javafx.css, com.s
un.javafx.css.converters, com.sun.javafx.css.parser, com.sun.javafx.c
ursor, com.sun.javafx.effect, com.sun.javafx.embed, com.sun.javafx.ev
ent, com.sun.javafx.font, com.sun.javafx.font.coretext, com.sun.javaf
x.font.directwrite, com.sun.javafx.font.freetype, com.sun.javafx.font
.t2k, com.sun.javafx.fxml, com.sun.javafx.fxml.builder, com.sun.javaf
x.fxml.expression, com.sun.javafx.geom, com.sun.javafx.geom.transform
, com.sun.javafx.geometry, com.sun.javafx.iio, com.sun.javafx.iio.bmp
, com.sun.javafx.iio.common, com.sun.javafx.iio.gif, com.sun.javafx.i
io.ios, com.sun.javafx.iio.jpeg, com.sun.javafx.iio.png, com.sun.java
fx.image, com.sun.javafx.image.impl, com.sun.javafx.jmx, com.sun.java
fx.logging, com.sun.javafx.media, com.sun.javafx.menu, com.sun.javafx
.perf, com.sun.javafx.print, com.sun.javafx.property, com.sun.javafx.
property.adapter, com.sun.javafx.robot, com.sun.javafx.robot.impl, co
m.sun.javafx.runtime, com.sun.javafx.runtime.async, com.sun.javafx.ru
ntime.eula, com.sun.javafx.scene, com.sun.javafx.scene.control, com.s
un.javafx.scene.control.behavior, com.sun.javafx.scene.control.skin,
com.sun.javafx.scene.control.skin.caspian, com.sun.javafx.scene.contr
ol.skin.caspian.images, com.sun.javafx.scene.control.skin.modena, com
.sun.javafx.scene.control.skin.resources, com.sun.javafx.scene.input,
com.sun.javafx.scene.layout, com.sun.javafx.scene.layout.region, com
.sun.javafx.scene.paint, com.sun.javafx.scene.shape, com.sun.javafx.s
cene.text, com.sun.javafx.scene.transform, com.sun.javafx.scene.trave
rsal, com.sun.javafx.scene.web, com.sun.javafx.scene.web.behavior, co
m.sun.javafx.scene.web.skin, com.sun.javafx.sg, com.sun.javafx.sg.pri
sm, com.sun.javafx.sg.prism.web, com.sun.javafx.stage, com.sun.javafx
.text, com.sun.javafx.tk, com.sun.javafx.tk.quantum, com.sun.javafx.u
til, com.sun.javafx.webkit, com.sun.javafx.webkit.drt, com.sun.javafx
.webkit.prism, com.sun.javafx.webkit.prism.resources, com.sun.javafx.
webkit.prism.theme, com.sun.javafx.webkit.theme, javafx, javafx.anima
tion, javafx.application, javafx.beans, javafx.beans.binding, javafx.
beans.property, javafx.beans.property.adapter, javafx.beans.value, ja
vafx.collections, javafx.collections.transformation, javafx.concurren
t, javafx.css, javafx.embed, javafx.embed.swing, javafx.event, javafx
.fxml, javafx.geometry, javafx.print, javafx.scene, javafx.scene.canv
as, javafx.scene.chart, javafx.scene.control, javafx.scene.control.ce
ll, javafx.scene.effect, javafx.scene.image, javafx.scene.input, java
fx.scene.layout, javafx.scene.media, javafx.scene.paint, javafx.scene
.shape, javafx.scene.text, javafx.scene.transform, javafx.scene.web,
javafx.stage, javafx.util, javafx.util.converter, com.sun.deploy.uito
olkit.impl.fx
Fragment-Host: system.bundle; extension:=framework
Bundle-ManifestVersion: 2
Bundle-Name: JavaFX 8 OSGi extension bundle
Bundle-License: The Apache License, Version 2.0
Bundle-SymbolicName: javafx-osgi
Bundle-Version: 8.0.2
UPDATE #3:
I think the javafx-osgi issue is not the real problem. I threw out all FX related stuff and ended up with an error saying "No OSGi framework has been added to the run path"?!
This seems to be a bug in the felix resolver:
Insights from the Bndtools bugtracker: https://github.com/bndtools/bndtools/issues/1877
Felix bugtracker: older issue with felix 5.4.0 and bndtools 3.4.0 ResolverImpl infinite loop
The above felix ticket has been open for over a year and there doesn't seem a solid understanding (yet) what the root cause is.
For those who hit the same roadblock: We ended up switchting to eclipse equinox.

Test Case failures with a java.lang.ArrayIndexOutOfBoundsException: 28526 with JDK 8 and terracotta 3.4.0

I currently moved maven java code from jdk7 to jdk8 which uses terracotta and was working properly but after changing it to jdk8 , my test cases are getting failed. I am getting following error and I didn't get any clues through searching.
java.lang.ArrayIndexOutOfBoundsException: 28526
at com.tc.asm.ClassReader.readClass(ClassReader.java:2015)
at com.tc.asm.ClassReader.getClassName(ClassReader.java:229)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getClassInfo(AsmClassInfo.java:305)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.createClassInfoFromStream(AsmClassInfo.java:717)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getClassInfo(AsmClassInfo.java:256)
at com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo.getInterfaces(AsmClassInfo.java:558)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchInterfaces(TypePattern.java:147)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchInterfaces(TypePattern.java:147)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchSuperClasses(TypePattern.java:120)
at com.tc.aspectwerkz.expression.regexp.TypePattern.matchType(TypePattern.java:92)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:437)
at com.tc.aspectwerkz.expression.ast.ASTClassPattern.jjtAccept(ASTClassPattern.java:24)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visitAnnotatedNode(ExpressionVisitor.java:1016)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:237)
at com.tc.aspectwerkz.expression.ast.ASTWithin.jjtAccept(ASTWithin.java:22)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:100)
at com.tc.aspectwerkz.expression.ast.ASTExpression.jjtAccept(ASTExpression.java:22)
at com.tc.aspectwerkz.expression.ExpressionVisitor.visit(ExpressionVisitor.java:88)
at com.tc.aspectwerkz.expression.ExpressionVisitor.match(ExpressionVisitor.java:74)
at com.tc.object.config.ClassExpressionMatcherImpl.match(ClassExpressionMatcherImpl.java:24)
at com.tc.object.config.CompoundExpressionMatcher.match(CompoundExpressionMatcher.java:18)
at com.tc.object.config.StandardDSOClientConfigHelperImpl.shouldBeAdapted(StandardDSOClientConfigHelperImpl.java:1242)
at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transformInternal(DefaultWeavingStrategy.java:184)
at com.tc.object.bytecode.hook.impl.DefaultWeavingStrategy.transform(DefaultWeavingStrategy.java:134)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.preProcess(DSOContextImpl.java:288)
at com.tc.object.bytecode.hook.impl.DSOContextImpl.transform(DSOContextImpl.java:392)
at org.terracotta.express.ClusteredStateLoader.transform(ClusteredStateLoader.java:124)
at org.terracotta.express.ClusteredStateLoader.loadClass(ClusteredStateLoader.java:83)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory$1.call(TerracottaClusteredInstanceFactory.java:319)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory$1.call(TerracottaClusteredInstanceFactory.java:317)
at org.terracotta.api.Terracotta.lookupOrCreateRoot(Terracotta.java:47)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getStoreRoot(TerracottaClusteredInstanceFactory.java:316)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getStoreMapForCacheManager(TerracottaClusteredInstanceFactory.java:77)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.getOrCreateStore(TerracottaClusteredInstanceFactory.java:68)
at org.terracotta.modules.ehcache.store.TerracottaClusteredInstanceFactory.createStore(TerracottaClusteredInstanceFactory.java:64)
at net.sf.ehcache.terracotta.StandaloneTerracottaClusteredInstanceFactory.createStore(StandaloneTerracottaClusteredInstanceFactory.java:40)
Thank you
As stated in one of the comments, Terracotta 3.4.0 is not Java 8 compatible and given the way the old Terracotta version worked, this is not a surprise.
You will have to update to a later version if you must have Java 8 support.
The exact version will depend on the usage you are making of Terracotta - if you need DSO support, you have to stick with the 3.7.x line.
For Ehcache support, it is recommended to upgraded to the latest version in the 4.3.x line.

Sonarqube 5.5 and mariadb

We are trying to upgrade to lastest sonarqube 5.5. We have mariadb 10.1 (latest) and since now we had no problems with sonarqube.
Now, with the upgrade, sonarqube will not boot. It says:
Unsupported mysql version: 5.5. Minimal supported version is 5.6.
Is there any trick we can use to make "sonar think" we are using mysql 5.6?
You could change the MINIMAL_SUPPORTED_DB_VERSIONS member in the Sonarqube's class https://github.com/SonarSource/sonarqube/blob/master/sonar-db/src/main/java/org/sonar/db/DatabaseChecker.java
private static final Map<String, Version> MINIMAL_SUPPORTED_DB_VERSIONS = ImmutableMap.of(
// MsSQL 2008 is 10.x
// MsSQL 2012 is 11.x
// MsSQL 2014 is 12.x
// https://support.microsoft.com/en-us/kb/321185
MsSql.ID, Version.create(10, 0, 0),
MySql.ID, Version.create(5, 6, 0),
Oracle.ID, Version.create(11, 0, 0),
PostgreSql.ID, Version.create(8, 0, 0)
);
And build the project again, but If they have that requirement it's possible that after the change not everything is going to work fine.
here is a bsdiff file.
you can Patch it with:
bspatch sonar-db-5.6.jar sonar-db-5.6.jar.new sonar-db-5.6.jar.patch
Replace it and it works!
https://drive.google.com/file/d/0B1EExMdpLmiLR1JmVFQ3ZTVPTlU/view?usp=sharing
MariaDB is not supported by SonarQube - still in v7. Please see this here:
SonarQube Requirements
The Solution to run SonarQube in combination with XAMPP is to change the database from MariaDB to MySQL. Here you'll find the steps for changing it:
https://gist.github.com/odan/c799417460470c3776ffa8adce57eece

Netbeans NullpointerException at startup

When I start Netbeans 6.0.1 up, I get the following error message:
java.lang.NullPointerException
at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:521)
at com.sun.servicetag.RegistrationDocument.initializeDocument(RegistrationDocument.java:121)
at com.sun.servicetag.RegistrationDocument.load(RegistrationDocument.java:81)
at com.sun.servicetag.RegistrationData.loadFromXML(RegistrationData.java:392)
at org.netbeans.modules.reglib.NbServiceTagSupport.getRegistrationData(NbServiceTagSupport.java:373)
at org.netbeans.modules.reglib.NbServiceTagSupport.getNbServiceTag(NbServiceTagSupport.java:453)
at org.netbeans.modules.reglib.NbServiceTagSupport.createNbServiceTag(NbServiceTagSupport.java:171)
at org.netbeans.modules.registration.NbInstaller.restored(NbInstaller.java:98)
at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:378)
at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:297)
at org.netbeans.ModuleManager.enable(ModuleManager.java:933)
at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:405)
at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:341)
at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:275)
at org.netbeans.core.startup.Main.getModuleSystem(Main.java:171)
at org.netbeans.core.startup.Main.start(Main.java:322)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:655)
It doesn't keep Netbeans from functioning, I think, but what does it mean and how should I fix it?
Firstly, I would try a newer version of netbeans. 6.0.1 is well over 5 years old.
Also, try clearing out the netbeans cache. On linux, it's stored at $HOME/.netbeans/
Not sure where it would be stored on OSX.
As for what it means - read over this question/answer: What is a Null Pointer Exception?

Resources