Difference between wildfly 8 vs 10 - java

I have a chalenge to develop an maven java ee wep application using JAX-RS, my client is using wilfly 8 and wants to upgrade in the future to wildfly 10, the question is, how can i have guidelines im my project to attempt the two versions?

If you're building to the JAX-RS spec it won't matter. Both WildFly 8 and WildFly 10 are full Java EE 7 compliant containers.

You can use Maven profiles, one using the Maven dependencies for WildFly 8 and the other for WildFly 10.

Related

How to identify which version spring framework to use when upgrading java 1.7 webapp to openjdk 19?

Few years back, I develop a web application using Java 1.7, SpringFramework 4.1.1.RELEASE and Hibernate 3.6.10.Final. This webapp is running on Tomcat 7.0.4 at the time.
Now, I planning to upgrade and compile everything using OpenJDK 19, and Tomcat 10.1.
How do I know which version to use in my pom.xml (Maven) so that theres no error after compilation and during runtime.
WHat should I do first?
Using the latest Eclipse and I have downloaded both Tomcat 10.1 and OpenJDK 19.
I've set the Java Compiler to openJDK 19 and added both JRE System Library and Server Runtime in the build path.
I have also added some more jar file to fix issues in Marker tab but I encountered error during starting up application.
Tomcat 10.1 uses Servlet API 6.0 which is now part of Jakarta EE. As part of the move from Java EE to Jakarta EE, the packages in javax.servlet.* are moved to jakarta.servlet.* since the error you are getting.
If your target platform is Tomcat 10.1, you should move to Spring Framework 6.
Check the migration guide

Downgrade embedded tomcat version in maven

My Springboot application was build in tomcat 9.0 with java version of 1.8 and our server has tomcat 6 with java version of 1.7. I have already downgrade our java version in facet.
How can i downgrade the embedded tomcat in maven? Do I need to generate a new initialize from springIO?
From the SpringBoot docs:
Spring Boot 2.1.1.RELEASE requires Java 8 and is compatible up to Java
11 (included). Spring Framework 5.1.3.RELEASE or above is also
required.
https://docs.spring.io/spring-boot/docs/2.1.1.RELEASE/reference/htmlsingle/#getting-started-system-requirements
So if you must stay on 1.7 and Tomcat 6, you'll need to move away from SpringBoot and back to your older solutions.

Can't add resource when defining a server in Eclipse

I'm attempting to define a server in the Eclipse (Oxygen) Server view. My project was not visible in the list of resources so per the following answer:
Cannot add a project to a tomcat server in eclipse
I configured project facets as follows:
Dynamic Web Module: 4.0
Java: 1.8
JavaScript 1.0
This made the the project visible when I tried again to define the server but I can't add it because "Tomcat version 8.5 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5, 6, and 7 Web modules". This answer:
Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules
makes some suggestions for Tomcat 6 and 7 but I can't get it working for 8 (also don't seem to be able to back out of the facet configuration, though I haven't tried deleting it in .settings yet).
Thanks in advance for suggestions.

How to choose the right JDK JavaEE Spring version

Generally I will use the following framework in my project: Spring MVC + Hibernate with Tomcat as the container.
And I never care about the version, the later the better.
This is the concrete SDK, framework version in the project:
JDK 1.7
Spring Framework:
spring-webmvc >> 4.1.6.RELEASE
Hibernate:
hibernate-entitymanager >> 4.3.10.Final
org.hibernate.javax.persistence >> hibernate-jpa-2.1-api >> 1.0.0.Final
Tomcat 7
The application works well under tomcat, however I meet some problems when I deploy the application from Tomcat to a Java EE Server(which support JavaEE 5 only).
One of the error I got is something like:
java.lang.NoSuchMethodError: javax.persistence.Table.indexes()
It seems that the indexes is a new method in JPA2.1(which is supported in JavaEE 7) while the Java EE server does not provide it.
But as shown, the hibernate dependency org.hibernate.javax.persistence >> hibernate-jpa-2.1-api >> 1.0.0.Final provide the methods, why the Java EE Server can not use that?
And to solve the problme, for a given JavaEE Server say it support JavaEE 5 only, what should be under consideration when choosing JDK, frameworks?
JPA 2.1 is for JavaEE7 and Java 7 onwards.
For JavaEE compatibity with JDK versions, I would take a look at this previous StackOverflow question.

EAR version 1.4, 5, 6

Can someone please explain to me the difference in the EAR versions.
Is it tied to the JDK version 1.4, 5 and 6?
Thanks.
It is not JDK version. It is J2EE/Java EE version.
It is asking you which J2EE/Java EE version the ear format (deployment descriptor etc) should adhere to: J2EE 1.2 or 1.3 or 1.4 or Java EE 5 or Java EE 6.
Application servers publish their compliance levels. And some application servers generally support older ear versions as well. For e.g. WebSphere 6.x is J2EE 1.4 compliant but it can still run 1.3 ear version.
enter link description hereWhat application server and version are you looking to ultimately deploy to? You would want the ear to match the level of compliance the target application server is. For example, Oracle 10.1.3.5 Is J2EE 1.4 while JBoss 7 is Java EE 6.0 compliant.
Wikipedia and others attempt to track what each vendor's compliance level is.

Categories

Resources