How to change Mule ESB (mule.bat) with different Java Version? - java

I want to change java version in mule standalone server that means different java version from what set in Java home. I have referred example How to configure Mule ESB (mule.bat) with different Java Version? but I'm still getting an error. Please help.
I have added specified java version in wrapper.java.command as per example but still referring to java home version not specified wrapper.conf file.
Appreciate your help.
Mule Version : 3.9.4
confg/wrapper.conf
Under Wrapper Properties
wrapper.java.command=C:/java/jdk8u262/bin/java
I didn't change mule.bat.

Related

Apache Camel 2.20.2 compatibility with JDK 11

I'm working on Oracle JDK 8 to AdoptOpenJDK 11 migration. We are also using Apache Camel 2.20.2. After JDK migration, I'm facing below issues in Camel Context XML file.
not able to recognize exchangePattern parameter
enum value not permissible
Even after having above issues, sometimes my application runs successfully and sometimes it gives error that it is not able to create spring bean. While creating below bean it says trustAllPackages is not a valid parameter which I know is not actually causing the issue.
bean creation
I think the issue is somewhat related to the errors in XML file. My question is:
Is Camel 2.20.2 compatible with JDK 11? If not, are above errors result of this incompatibility?
How to resolve these errors and why isn't this causing issue every time I run my application?
Currently we are using :
AdoptOpenJDK 11
Spring 4.3.11.RELEASE
Camel 2.20.2
ActiveMQ 5.15.0
Maven Build Tool
Thanks in advance.
You can see here what JDK version Camel supports
https://camel.apache.org/manual/latest/what-are-the-dependencies.html
Camel 2.x only supports Java 8.
You need Camel 3.x for Java 11 support.

How to deploy war in wild fly server?

we are using one java application in wildfly server which uses java 1.8.0_202, now we want to migrate the java from oracle jdk to adoptopenjdk. I changed the path of new openjdk in management console of wildfly server.
Now the question is do we need again rebuild the application using adoptopenjdk or can i use the old war which is deployed.
Thanks in advance!..
As I cannot comment because of lack of reputation as an answer:
Normally you can run a Java Application without knowledge of the Java it was built with if the versions match. Second: Why don't you just try it? If you have these strong concerns you should try it in a test environment.
You should not need to do anything to migrate from an Oracle JDK to OpenJDK. Just change the path to the JAVA_HOME and that's it. The only possible issues would be if you use Oracle specific API's which one should not be doing anyway :)

Running spring boot application in a different jdk version

I have an application running on jdk7 and jboss and i would like to extract all the batch code from it to make it cleaner.
I want to create executable spring boot 2 jars and run them separately or at least upgrade to spring boot and the jdk version to 8.
Is it possible to run a spring boot 2 application that requires jdk 8 on a machine that also runs a jboss application on jdk 7 ? how can I specify the jdk version at runtime for an executable jar or war ?
I would like to use a container to solve this but our production team doesn't want that right now. I know there is "setenv" in a tomcat or weblogic servers but i would like to know if there is a spring boot solution for that (I didn't find any)
Thank you in advance.
You can have as many JVMs as you like on your machine. you just need to have the settings for the java version you need to be loaded.
ie if your java 8 is in c:\programs\java\jdk8\bin and your java 7 is in c:\programs\java\jdk7\bin, then you need to specify the java.exe absolutely as in c:\programs\java\jdk8\bin\java.exe you also need to set the environment variables for that session, like set JAVA_HOME=c:\programs\java\jdk8\bin\.
My example is using a windows machine as a base. You will need a startup script, or similar for the environment that you are using.
Note that if you just use java.exe in your startup script, then the JVM will be started with the first JVM found in your %PATH%, so you may want to remove Java from the path to be sure that you are getting the exact version you require.

Uploading different versions in GAE in Java

I'm writing a GAE project in Java and now, I'm trying to create a different version to use it for testing future changes.
I read about modules, app-engine-web.xml..., but I can't find how to deploy two versions.
I have seen posts that say that you can access it by changing the url:
"version"."app_id".app...
But I don't know what files have I to modify.
In appengine-web.xml you can use the version tag to specify a version. Likewise when deploying using appcfg you can use the -v argument to override that value with a different version.
So one approach is to have a production version specified in the config file and a testing version you deploy with
appcfg -v test_version ...

Jetty IllegalArgumentException when using 1.9.30 GAE

I've been on a very old version of GAE for a long time. Every time I try to update to the latest version I get this error when deploying it to GCP:
java.lang.IllegalArgumentException: Class file is Java 8 but max supported is
Java 7: org/eclipse/jetty/http/BadMessageException.class in C:\Users\XXXXXXXXXXX\
backendservlet\build\exploded-app\WEB-
INF\lib\jetty-http-9.3.2.v20150730.jar
I think jetty comes with GAE so how do I fix this? When I deploy it locally it runs without errors. It also builds without error. This only happens when deploying to GCP.
My appengine instance is on JAVA 7 runtime so maybe that's the issue? How do I change that? I tried deplying with a different version and name and it still didn't work.
Please help.
Looks like jetty (or at least the version you're using) needs Java 8, which is not supported on GAE: Does Google App Engine support Java 8?.
GAE does not yet support Java 8. If jetty is a dependency of your project, you need to use a version that has source 1.7. Otherwise delete C:\Users\XXXXXXXXXXX\
backendservlet\build\exploded-app\WEB-
INF\lib\jetty-http-9.3.2.v20150730.jar

Categories

Resources