Java upgrade from 1.4 to 6 - java

I am using Jboss 2.4.11, if i upgrade JDK from 1.4 to 6 How is the jboss server going to handle the application?. What are the common things i should start investigating while i am in the process of the upgrade. I am looking at the Oracle's documentation and other posts in stackoverflow related to jdk 6 backwards compatibility with v1.4. My question is more specific towards using Jboss server. Also the application uses ejb 1.1

I'd recomment to move from one consistent system to another one. Even JBoss 4 needs a special version for JDK1.6. Java 5 brought MBeans rigth into the VM and older versions of JBoss used MBeans for configuration. As there must not be to MBean servers within a single VM this was a big issue, when migrated to java5. As EJB 1.1 is still supported I'd recomment to move at least to JBoss 4.2 as this is still kind of similar to older versions, while JBoss 7 is totally different.
The only thing that will really help you to get the migration a little bit smother are tests. At least quite a number of integration tests.

Related

Fail to deploy bare bone webapp to tomee 7.1.0 running openjdk 11

I am planning to migrate a webapp from java 8/tomee 7.0.4 to java 11/tomee 7.1.0, but still unsuccessful. So I write a barebone webapp with only one facelet page and one managed bean. This works on java 10/tomee 7.1.0 but not java 11. The errors are:
java.lang.IllegalStateException: Cannot get Unsafe.defineClass
....
java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String, [B, int, int, java.lang.ClassLoader, java.security.ProtectionDomain)
After some Googling, from http://tomee-openejb.979440.n4.nabble.com/Some-jars-in-TomEE-8-SNAPSHOT-are-not-Java-11-compatible-td4685162.html it seems that the problem originates from jaxb-impl. So I tried adding to pom.xml according to https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/ which failed. I restored pom.xml and modified according to Java 11 package javax.xml.bind does not exist which also failed.
This is for tomee server which is less popular. But tomee 7.1.0 is based on tomcat 8.5 which should be much more popular. I think the problem will still be the same.
Advice is appreciated and I think many people should have the same problem.
Try upgrading your tomcat/tomee to the latest version, or downgrading your Java version as incompatible versions tend to fire these NoSuchMethod/NoSuchFile exceptions.
Could be that one technology is reliant on a certain other technology, and is aware of a certain API version, but you are trying to use a higher API version, which could be entirely different.
Another possibility is that tomee is not yet ready to work with java 11 at all (but this seems rather unlikely).

tomcat7 vs. tomcat6, Is there any significant difference in their performance?

I have been working on stress testing a Java web application (JSP+Tomcat6+Struts2+Hibernate+mysql) and well the results I was getting wasn't something to brag about! So I upgraded the tomcat version to 7, and wow! the requests/sec I got was 5 times better than before.
So enlighten me, is there this much difference between tomcat6 and tomcat7's performance? or there is something wrong with my configuration and stuff?
The Tomcat "Which Version" page includes a high level overview of the differences between different Tomcat versions. The section for Tomcat 7.x does not claim massive performance increases for Tomcat 7.x versus Tomcat 6.x. A Google search didn't offer any clear evidence either.
I'd be inclined to think that a 5-fold throughput improvement is either:
a Java / Tomcat configuration and/or tuning issue,
something a bit unusual about your web application, or
an unidentified artefact of the way you are doing your performance measurements.
What is the difference between Tomcat 7.0 and Tomcat 6.0?
Tomcat 7.0 has improved the security over Tomcat 6.0 due to several security code fixes and additions (such as CSRF prevention filter).
Tomcat 7.0 includes Servlet 3.0 API, which it self is an improved version over its previous version (used by Tomcat 6.0).
So, 3rd party applications that need Servlet 3 containers are supported by Tomcat 7.0.
Configurability is better in Tomcat 7.0, which includes new container components (e.g. ExpiresFilter and AddDefaultCharsetFilter) that allow better handling of problems previously left to the web applications to resolve.
Tomcat 7.0 supports Java 6 or further version, while Tomcat 6.0 supports Java 5 or further version.
Finally, Tomcat 7.0 includes cleaner and modernized code that uses generics in the required places.

JBoss 5 Backward compatibility with Java 6

I just need clarifications related to JBoss Application Server. I've developed a project which is compiled in Java 6. And it is deployed in Jboss 5 version. Till now I didn't find any problem with the application. But I want to know will there be any possibility that Jboss will have any backward compatibility problem. Or does Jboss needed upgradation with respect to Java version. Any suggestion would be appreciable.
Thanks,
Marshal.
Even if JBoss 5 is compiled with Java 5 there shouldn't be compatibility problems at a language level.
As for the libraries there might be a problem but those that JBoss requires should have been taken care of. This leaves you with core libraries that JBoss might have replaced in its class loader hiearchy and thus might have an older version. In that case you could put those libraries into your application and effectively override the JBoss versions on a per-application basis. We did that with some XML libs (IIRC JAXB was one of them).
As an alternative - as suggested by #Geziefer - use a JBoss 5 version specifically compiled for Java 6.

Moving from jboss 3.2.1 to jboss6

Now we have a project with java 1.4 and ejb 2.1 running on jboss 3.2.1. We are trying to update up to java 6 and ejb3.1, but we are doing it in steps. So my question is simple, can we use ejb2.1 on jboss6?
In theory, yes. EJB 2.x is still part of the current JavaEE spec, and JBoss6 supports it fully.
However, JBossAS 3.x and 6.x are architecturally very different to each other. Do not assume the upgrade will be a smooth one, it may well feel like migrating to a completely new appserver.

Tomcat upgradation

We are planning to upgrade our Tomcat from 4.1.31.
Our's is an Axis 1.4 application where we have our web services.
Request you to suggest the latest stable version of Tomcat 5 or Tomcat 6 suitable for our application. And the things to consider while upgrading.
Will the existing 1.4 Java code base works smoothly on Tomcat 5 or 6?
And going further we may write the code in JDK 1.5 as well. So, having Java 1.4 code and Java 1.5 code together, will create any problems?
Kindly suggest.
Please share your upgradation experiences.
Thank You :)
Tomcat 6.0.26 is the latest stable release.
It requires JRE 5.0 or later, so if you are truly stuck on 1.4, you'll need to download the latest 5.5 release, which requires a compatability package to run on 1.4.
My advice: bite the bullet and make the necessary changes for your application to function on 1.6. It is only going to get more and more painful to upgrade (and to continue to code in 1.4) as time goes on.
Go to Java (1.)6; it really makes doing web services like yours easier and it's really widely available now.
If you are going to upgrade I would recommend first doing some tests with java 6 + the existing codebases. If that seems to work, go to Tomcat 6.
Perhaps also upgrade some Axis libraries while you're at it, or leave it as is if it still works.
In my experience you can get to trouble by migrating to Java 5 (and thus 6), especially with XML. My memory has something like a class name clash between Java 5 and an old version of Xerces, but I could be mistaken.

Categories

Resources