Migrating EAR-Files from Apache Geronimo to tomEE - java

I'm trying to migrate some EAR-files from Apache Geronimo 3.0.1 to Apache tomEE 7.0.2.
The only reason to migrate is the "death" of Geronimo and it's lack of Java 8 Support and tomEE looks like its successor.
I was able to get the server running in eclipse 4.6.3 and deploy a new dynamic web project but I can't create a EAR-project for tomEE.
Do I have to change the EARs (containing multiple .war-files) into single .war-files? It seems like tomEE has EAR-support (http://tomee.apache.org/deploying-in-tomee.html) but I can't find any info how to create one that will work.
Thanks for your support!

you can define where is your ear using in tomee.xml and then just drop your .ear in tomee.base/apps.

Related

Tomcat 8 how to set jarsToSkip

We are using Tomcat 7.0 and we want to switch to tomcat 8. There was a parameter in Tomcat 7.0 org.apache.catalina.startup.ContextConfig.jarsToSkip but it does not work in tomcat 8.0.
Any idea ?!
Long Story
Our web application provides some web-services. We used the webservices-rt-2.3.1.jar to implement web services. The jar has a servlet named WSServletContainerInitializer which extends ServletContainerInitializer this auto starts by Tomcat. This was not what we wanted, so we used the org.apache.catalina.startup.ContextConfig.jarsToSkip=webservices-rt-2.3.1.jar to force Tomcat to skip this jar.
You may be looking for the JarScanFilter which is new in Tomcat 8. It's much more flexible than the all-encompassing jarsToSkip setting in Tomcat 7.

Springboot 1.3.3 gives 404 in Jboss EAP 6.4.0GA

I am trying to deploy a spring .war into jboss but am getting 404 errors. I know this has been asked before:
springBoot application on Jboss EAP, servlet context not lodaed
Spring Java Config vs Jboss 7
Cannot deploy Spring Boot on jBoss EAP 6.3.3
But I am very new (this week) to maven/spring/jboss, so may well have messed up. I tried what I understood from the various solutions above and none of them worked for me. Probably me messing up or missing something. So I thought I'd get the problem as simple as I can.
I took the code from:
https://github.com/spring-guides/gs-rest-service.git
And then work in the complete folder.
cd complete
mvn package
java -jar .\target\gs-rest-service-0.1.0.jar
And that all worked as you'd expect.
So then I followed the instructions here (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file) to modify my code and pom.xml to produce a war file.
pom.xml http://pastebin.com/BiLWDskd
Application.java http://pastebin.com/par7rftz
I then mvn clean package and load the resulting .war file into EAP using the UI (http://i.stack.imgur.com/N7zxG.png).
So then in theory this should be the URL right
http://localhost:8080/gs-rest-service-0.1.0/greeting
I also tried
http://localhost:8080/greeting
But am getting the 404 error (http://i.stack.imgur.com/T6J6z.png) as described in the other questions. Nothing appears in the jboss console log at all after the .war is loaded.
So am I missing something? Do I need to write a jboss #WebServelet class to wrap around the spring stuff? Changes to my pom.xml? Should I not be using springboot, and just just pring framework modules directly? I note that in the EAP screen it does not show the class in the third column like it did with the jboss sample .war.
Remember I am new to this, so please explain stuff as if I'm a complete dummy (which I am).
Details of my setup:
OS Windows7 x64
java version "1.8.0_91"
Apache Maven 3.3.9
Springboot 1.3.3
JBOSS EAP 6.4.0
No IDE, using vim and command line
I encountered the same problem on JBoss EAP 6.4 / spring boot 1.5 and what fixed it was to add this property to application.properties
server.servlet-path=/*
as explained in this post : Deploying spring boot on JBOSS EAP 6.1
A simple tutorial you can follow (though he miswrote the property server.servlet.path )
http://code-adda.com/2018/06/how-to-deploy-spring-boot-war-in-jboss/

Java ee: Can't create ear project in eclipse using Tomee

I am using Tomee plus as a server for my java ee project in eclipse. I am unable to create an ear project in eclipse as the option for target runtime does not have apache tomcat for option. The only runtime environments I see are:
Basic - which has J2ee runtime library
Jboss
Object Web
Just to clarify, I am able to create a dynamic web project with tomee runtime. The problem is creating an EAR project with tomee runtime. Any help would be appreciated.
I believe you need to install the JST Server Adapters Extensions. I believe this was only added recently (Mars?).

Where to put property file in JBOSS 7 or Glassflish? (Best practice)

I have developed applications for JBOSS EAP 5 with eclipse. I placed property files under server-conf/conf/...
I am now developing in Netbeans (7.2). The bundled glassfish server is used for easier development. The target environment is JBOSS EAP 6. What is the best place to place property files? A common place for both environments would be great.
If you want to have them external to the application you'll probably have to write a custom module. This isn't as bad as it sounds, check out HowToPutAnExternalFileInTheClasspath.
See also migration-issues-to-jboss-7-1
The most practical solution is creating a custom folder outside both JBOSS and Glassfish (i.e C:\PropertiesFolder) then add this folder to the classpath of each server.
Please read my postfor more details about classpath in JBoss

Problem whille adding project into the websephere 6.1

I am using IBM web-sphere 6.1 as a application server and eclipse as IDE. so i have one project name as MobileBank.ear which contain deployment descriptor file which has one module name as amsejb.jar which is ejb project and some jar files. so while adding MobileBank.ear into the server i am getting the following error " Web-Sphere v6.0 only supports J2EE 1.2, 1.3, and 1.4 Enterprise applications." due to this error i am not able to deploy my ear can anyone guide me please... also MobileBank.ear contains web project though i am not able to add the ear. Kindly Guide me...
Thanks in advance...
Vinod
I am using IBM web-sphere 6.1 ... Web-Sphere v6.0 only supports ... Are you sure you are using WAS 6.1 ?? May be this is what causing the problem
Well, 6.1 really doesn't support more than 1.4 and you're attempting to use newer versions.. You should
Edit the project facets in the project properties to utilize older versions
Not select 6.0 when generating the project as the target. That is used for the remote deployment etc. Eclipse does not really support 6.1/7.x deployment so please generate the generic projects instead.
i deleted the EAR folder ,created new Enterprise Application Project and added all project in that . error got resolved .
I am using WAS 7.0
U need to change the WebSphere Application Server version under Coniguration section while creating a project in Eclipse/RAD.
Then Dynamic Web module version will get changed from 3.0 to 2.5
While creating a dynamic web project,
-- On entering the "project name"
-- we have an option to check "Add project to EAR"
-- Enter the EAR name
-- choose the EAR version on of these - 1.2, 1.3, 1.4 and 5.0
On doing this, we would be able to add the EAR to WAS (I have been using v7)

Categories