IBM Cloud start pack does not recognize java8 - java

I've created a new project from a start pack in IBM Cloud and I've created a toolchain for it. But when I commit new code to git, my build stage fails with this message
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.7.0 is not in the allowed range [1.8,).
How do I force IBM Cloud to use Java8?
I am little bit surprised because IBM Cloud liberty profile actually uses java8, according to this
https://console.bluemix.net/docs/runtimes/liberty/customizingJRE.html#customizing_jre

Related

How to fix netty dependency when executing a java jar containing google-cloud app in raspbian

I have a java application in which I am using google cloud speech recognition. Everything works fine when I execute the runnable jar in Ubuntu, but when I execute the runnable jar in my raspberry pi 3 with OS Raspbian using the command java -jar JarFile.jar I get an error about a dependency with netty, which I have never used.
I have read this question
Failed to load libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
which is exactly the same as mine, but I don't know how to carry out the answer provided there. If someone could give me more information about how to do that I would be very pleased.
I have already tried:
Using netty in my maven dependencies although I don't need it.
Installing tomcat apache (I thought it could provide some SSL solution)
Adding latest netty .jar to my dependencies
These are the first lines of the error trace I get:
dic 30, 2018 11: 14: 39 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFORMACIÓN: netty - tcnative unavailable(this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java: 93)
at
Netty does not provide a netty-tcnative artifact for arm32 so you will need to either build it yourself or use another SSL implementation together with grpc. As far as I know they also support using the one which is provided as part of the JDK or allow to use conscrypt.

Failed to customize Java Version in Bluemix

I've deployed my app to Bluemix and want to change the default Java version from 8 to 7. Then I run the cf command "cf set-env myapp JBP_CONFIG_IBMJDK "version: 1.7+"", then run "cf restage myapp", but error occurred. Below is the log.
Anyone can give me some tips on how to customize Java version, instead of using the default one? Thanks so much!
Updated app with guid 978e8006-6211-47c7-aa67-2931be310519 ({"environment_json"=>"PRIVATE DATA HIDDEN"})
Got staging request for app with id 978e8006-6211-47c7-aa67-2931be310519
-----> Downloaded app package (12M)
-----> Downloaded app buildpack cache (4.0K)
-----> Liberty Buildpack Version: v2.3-20151208-1311
E, [2016-01-10T09:42:28.093168 #73] ERROR -- /var/vcap/data/dea_next/admin_buildpacks/24690e4f-31f1-4172-b295-80c16598b357_bb01df5b768b9bb0430b0a8427293feda0a920cc/lib/liberty_buildpack/buildpack.rb:50:in `rescue in drive_buildpack_with_logger': Compile failed with exception #<NoMethodError: undefined method `include?' for nil:NilClass>
undefined method `include?' for nil:NilClass
Staging failed: Buildpack compilation step failed
encountered error: App staging failed in the buildpack compile phase
Stopped app instance (index 0) with guid 978e8006-6211-47c7-aa67-2931be310519
The error is related with the buildpack not compiling successfully.
Check if you are using any feature related to jre 1.8 version.
All the options to configure the jre used in your liberty application are documented here:
https://www.ng.bluemix.net/docs/#starters/liberty/index.html#liberty

How to Enable JDK 7 for Websphere Profile

I am using Websphere 5.5.0 with Default JDk version as 6.
I installed new jdk 7. The Jdk7 got enabled only for the server and not for the entire profile.
Then I ran the managesdk command to enable the Jdk 7 for the entire profile.
managesdk.bat -enableProfile -profileName AppSrv01 -sdkName 1.7_64 -enableServers
But I see the below error:
CWSDK0009E: Unexpected exception com.ibm.websphere.management.exception.ConfigServiceException: RepositoryException while updating documents in master repository
CWSDK1018I: Profile AppSrv01 could not be enabled to use SDK 1.7_64.
CWSDK1002I: The requested managesdk task failed. See previous messages
List available profiles has the following info:
managesdk.bat -listenabledProfileAll
CWSDK1004I: Profile AppSrv01 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_64
CWSDK1008I: Node mvm-wNode01 SDK name: 1.6_64
CWSDK1009I: Server server1 SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.
Any help from anybody ?
Why cannot the profile be enabled for jdk7 ?
Finally able to resolve it through multiple hits and trial.
Looks like managesdk command needs different permissions from the user who accesses the admin console.
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\profiles\AppSrv01\bin
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\bin\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties
Allowed all file permissions ( on the above folders ) to all the users.

Fail to "play new" on Mac

I run into an exception whenever trying play run on my Mac.
Detail stack track is as
The new application will be created in /Users/admin/mine/test2
What is the application name?
> test2
Which template do you want to use for this new application?
1 - Create a simple Scala application
2 - Create a simple Java application
3 - Create an empty project
> 2
java.lang.StackOverflowError
at scala.reflect.ClassManifest$class.newArray(ClassManifest.scala:113)
at scala.reflect.ClassTypeManifest.newArray(ClassManifest.scala:233)
at scala.reflect.ClassManifest$class.newWrappedArray(ClassManifest.scala:133)
at scala.reflect.ClassTypeManifest.newWrappedArray(ClassManifest.scala:233)
at scala.collection.mutable.WrappedArrayBuilder.mkArray(WrappedArrayBuilder.scala:31)
at scala.collection.mutable.WrappedArrayBuilder.resize(WrappedArrayBuilder.scala:37)
at scala.collection.mutable.WrappedArrayBuilder.ensureSize(WrappedArrayBuilder.scala:49)
at scala.collection.mutable.WrappedArrayBuilder.$plus$eq(WrappedArrayBuilder.scala:54)
at scala.collection.mutable.WrappedArrayBuilder.$plus$eq(WrappedArrayBuilder.scala:24)
at scala.collection.TraversableLike$$anonfun$filter$1.apply(TraversableLike.scala:213)
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:34)
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:33)
at scala.collection.TraversableLike$class.filter(TraversableLike.scala:212)
at scala.collection.mutable.WrappedArray.filter(WrappedArray.scala:33)
at scala.collection.TraversableLike$class.filterNot(TraversableLike.scala:223)
at scala.collection.mutable.WrappedArray.filterNot(WrappedArray.scala:33)
at scalax.file.FileSystem.fromSeq(FileSystem.scala:97)
at scalax.file.FileSystem.apply(FileSystem.scala:108)
at scalax.file.FileSystem.presentWorkingDirectory(FileSystem.scala:48)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:26)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:20)
at scalax.file.FileSystem.fromString(FileSystem.scala:90)
at scalax.file.defaultfs.DefaultPath.toAbsolute(DefaultPath.scala:40)
at scalax.file.defaultfs.DefaultPath.toAbsolute(DefaultPath.scala:36)
at scalax.file.FileSystem.presentWorkingDirectory(FileSystem.scala:48)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:26)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:20)
at scalax.file.FileSystem.fromString(FileSystem.scala:90)
at scalax.file.defaultfs.DefaultPath.toAbsolute(DefaultPath.scala:40)
at scalax.file.defaultfs.DefaultPath.toAbsolute(DefaultPath.scala:36)
at scalax.file.FileSystem.presentWorkingDirectory(FileSystem.scala:48)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:26)
at scalax.file.defaultfs.DefaultFileSystem.doCreateFromSeq(DefaultFileSystem.scala:20)
....
Error during sbt execution: java.lang.StackOverflowError
Java version is OpenJDK Runtime Environment (build 1.7.0-internal-henri_2011_06_08_08_48-b00)
Scala version is 2.9.1 (install via brew)
Sbt version is 0.11.3
Playframework version is 2.0.4 (same problem with 2.10 actually)
What should I do then?
Probably this is because of java version. You should try another java version. I use java version "1.6.0_37" on my mac.

Error creating OpenShift application in Eclipse

I am attempting to create/deploy an application onto the Redhat OpenShift Express platform, and am attempting to do this via eclipse using the JBoss OpenShift plugins.
I am following the instructions here: https://www.redhat.com/openshift/community/blogs/getting-started-with-the-openshift-eclipse-plug-in-for-java-applications-on-the-cloud
But when entering my user credentials I get an error preventing me getting any further:
Could not check user credentials: Could not unmarshall response "
{"data":
{"user_info":
{"env_vars":null,
"max_gears":5,
"system_ssh_keys":null,
"uuid":"5a81de3405fe4ac6b5718dbb8540736f",
"rhc_domain":"rhcloud.com",
"rhlogin":"robert.hinds#accenture.com",
"ssh_keys":
{"laptop":{"type":"ssh-rsa","key":"AAAAB3NzaC1yc2EAAAABIwAAAQEAw5GIjtI+B42SBv2kmV32OHI5tCBO7JWmlhF7w9dNy2Tp7MNtK8nE7nLUKYyXSZRzK0i4azPuMDDmmJ4jFpcyAwRdzBM43xZLo/6MlMFneT3t66ukNMNOgYptiRH7Zy8Tmjquwu2dXpui77tRQaEpq4Ms/JxHvanD+YMDNTXlrv8gIDwOjhtetuyeKbf/sr+UK1Bit8eDTgai01UmjXm+u/0Hi1tD6oG/GwNviQKb/2gmrmEs0uPhcJ9Olzrn67Gyu7c2PFOjTEvOXMQHjSUrVp905t8SzffiJ7uWzVnvufrweC5gXlR/v1tp3FrFgRcZVmZX6QlhyOiy5Tr1cLD8pw=="}},
"consumed_gears":0,
"vip":false,
"namespace":"star",
"ssh_key":null,
"ssh_type":null
},
"app_info":{}
},
"api_c":["placeholder"],
"messages":"",
"broker_c":["namespace","rhlogin","ssh","app_uuid","debug","alter","cartridge","cart_type","action","app_name","api"],
"exit_code":0,
"debug":"",
"api":"1.1.3",
"result":""
}
has anyone come across this previously? I am on Win7 Eclipse Indigo on JDK7
Update:
I get this problem using the following versions/steps
Using Eclipse: Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 2 Build id: 20120216-1857
Installed the OpenShift express tools from the JBoss software update site here: http://download.jboss.org/jbosstools/updates/development/indigo/ today (the current version that is downloaded today!)
Then simply file > new > openshift aplication, then enter my username and password (created today with OpenShift Express) and I get the error.
hope thats helpful - will wait for the update to the software.
this is a "known" issue in the sense that you're not the first that reported this:
https://issues.jboss.org/browse/JBIDE-11431
The "interesting" part is that unmarshalling the response fails because of the following 2 properties with null values:
"ssh_key":null,
"ssh_type":null
This error occurrs since OpenShift added support for several keys. We fixed the unmarhslling issue but still dont know how to reproduce it. If you can we'd be very happy to get your instructions.
The fixed version of our client plugin will make it to our nightly update site in a few days. Stay tuned!

Categories