Changes in Equinox Framework Config - osgi

Using version 3.7 of equinox I can set :
Constants.FRAMEWORK_STORAGE_CLEAN, "true" and
"osgi.console", consolePortasString()
With equinox version 3.9 setting FRAMEWORK_STORAGE_CLEAN to "true" does not work but setting to "onFirstInit" does.
Has the "true"setting been intentionally dropped from equinox?
Also the console port setting does not work in 3.9.
What is the suggested/intended method for setting these values in 3.9?

Related

i have created a ec2 instance in which i am trying to run airflow but this error is occuring

scheduler | /usr/local/lib/python3.10/dist-packages/airflow/models/base.py:49 MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
webserver | /usr/local/lib/python3.10/dist-packages/airflow/models/base.py:49 MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
triggerer | /usr/local/lib/python3.10/dist-packages/airflow/models/base.py:49 MovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
i tried airflow standalone on ec2 instance and error occured

sts 4.7.0.RELEASE starts embedded mongo

Seems that the new release by default starts the Embedded Mongo when it's found on the classpath instead of using the mongo template defined in the application.properties.
The workaround is to temporary remove flapdoodle.embed from the dependency list even if it's in test scope
2020-06-24 09:22:53.048 INFO 51028 --- [ Thread-305] o.s.b.a.mongo.embedded.EmbeddedMongo : 2020-06-24T09:22:53.047+0200 I CONTROL [initandlisten] MongoDB starting : pid=51029 port=63665 dbpath=/var/folders/7x/ss8w17pd4bsfrg1x1t56sl00zq753h/T/embedmongo-db-20d4fbe0-abac-4715-8ae0-b863f7bc9627 64-bit host=M84452
This is discussed in https://github.com/spring-projects/sts4/issues/493.
The short version is that the behavior of the launch configs slightly changed due to the (now correct) usage of the "exclude test classes" checkbox of the Eclipse platform. Make sure that when you re-use existing launch configs that this checkbox is set correctly.

WAS Liberty 17.0.0.1 does not work with Watson Java SDK

last version of WAS Liberty Profile seems to have broken com.ibm.watson.developer_cloud:java-sdk.
I rebuilt images for my app and got last version 17.0.0.1 , and java-sdk for watson stopped working with exception above. Any idea on which tag to use in my Dockerfile to be able to rebuild version using 16.0.0.4 liberty?
also... how can I have this working with 17.0.0.1?
Caused by: java.net.UnknownServiceException: Unable to find acceptable protocols. isFallback=false, modes=[ConnectionSpec(cipherSuites=[TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA], tlsVersions=[TLS_1_2, TLS_1_1, TLS_1_0], supportsTlsExtensions=true), ConnectionSpec(cipherSuites=[TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_3DES_EDE_CBC_SHA], tlsVersions=[TLS_1_0], supportsTlsExtensions=true), ConnectionSpec()], supported protocols=[TLSv1]
at okhttp3.internal.ConnectionSpecSelector.configureSecureSocket(ConnectionSpecSelector.java:72)
at okhttp3.internal.io.RealConnection.connectTls(RealConnection.java:232)
at okhttp3.internal.io.RealConnection.establishProtocol(RealConnection.java:196)
at okhttp3.internal.io.RealConnection.buildConnection(RealConnection.java:171)
at okhttp3.internal.io.RealConnection.connect(RealConnection.java:111)
at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187)
at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123)
at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:93)
at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:296)
at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at okhttp3.RealCall.getResponse(RealCall.java:243)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.execute(RealCall.java:57)
at com.ibm.watson.developer_cloud.service.WatsonService$1.execute(WatsonService.java:179)
... 53 more
Edit: I have tried adding the system property as explained here:
https://www.ibm.com/support/knowledgecenter/SSYKE2_7.0.0/com.ibm.java.security.component.70.doc/security-component/jsse2Docs/matchsslcontext_tls.html
And I check ps in my docker instance to see that JDK has the property correctly configured:
root#apiqa:/# ps xuww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 4.9 9.4 8512396 3131596 ? Ssl 17:35 10:32 /opt/ibm/java/jre/bin/java -javaagent:/opt/ibm/wlp/bin/tools/ws-javaagent.jar -Djava.awt.headless=true -Xms950m -Xmx3500m -Dcom.ibm.jsse2.overrideDefaultTLS=true -jar /opt/ibm/wlp/bin/tools/ws-server.jar defaultServer
But the problem is not solved with that. Am I not configuring Liberty profile to get the system property so JDK executes with -D ? (I use jvm.properties file)
This is a known issue due to a change in the IBM JDK.
We are working on it (see this).
The workaround is to use an old buildpack for liberty or a different JDK.
Use cf push -b liberty-for-java_v3_7-20170118-2046 to use a liberty version that works with the SDK.
You can also change to OpenJDK by running:
cf set-env myapp JVM 'openjdk'
More information here
My team ran into this issue as well. I'm not 100% sure but we came to the conclusion that Liberty 17.0.0.1 is using Java 8 which we believe no longer supports TLS 1.0. You can see that the service you are trying to connect to only supports TLS 1.0:
"supported protocols=[TLSv1]"
It seems that some of the Bluemix services have moved up to TLS 1.1 and some haven't. TLS 1.0 is evidently not very secure so I'm not positive but I believe that Java 8 no longer supports TLS 1.0. This means either the Bluemix service will need to upgrade to TLS 1.1 or you'll need to run Liberty on a previous version of the JVM.
I solved this issue setting OpenJDK 1.8 on Liberty instance, just setting env variable JBP_CONFIG_OPENJDK.
In my case, was important to set also memory_sizes to overcome an OutOfMemory error, related to the use of OpenJDK
$ cf set-env myapp JBP_CONFIG_OPENJDK: '[version: 1.8.+, memory_sizes: { metaspace: 256m }]'
For complete reference https://console.ng.bluemix.net/docs/runtimes/liberty/customizingJRE.html

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.

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

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

Resources