Tomcat 10 deploy a legacy J2EE war through manager - legacy-code

Following the docs on Tomcat I had no problem either migrating my war during build or deploying it in the webapps-javaee directory; the migration went just fine.
But I see no option in the manager to deploy a war as legacy; if you try to do that, the app is deployed just fine but it will of course fail when it calls a legacy API.
Thus it seems that the only way is to either migrate the jar before deploy or deploy copying a war file manually (or with a script, but still far from ideal).
Is there a way to have a manager deployed war migrated automatically, just as if it was copied in the legacy directory?
Of course the perfect solution would be to migrate the code... or to not use tomcat 10 until you feel like doing what's needed to make it work flawlessly.

Related

Weblogic 12c deployment shared library not picked while deploying to managed server

Application is a EAR file
Shared Library where the third party jar are bundled and deployed to managed server as shared library.
weblogic-application.xml file where library ref to shared library is made and present in EAR file(META-INF folder).
Shared libraries are deployed to managed server as target and is successful.
while deploying the EAR file, the selection of EAR from console deployment results in ClassNotFoundException of the class present in shared library even though the reference is made in weblogic-application.xml.
Note that if the Library deployment is targeted to Admin Server and Managed Server the deployment of EAR file is successful without any exception.
Single Admin Server deployment is working fine without any issues for the same setup.
Deployment is expecting the JAR is classpath of admin server while deploying to managed server. is this an intended behavior ?
Is there any setup configuration we are missing here ? Correct me if there is any steps gone wrong.
Update : we did the same deployment with ant script using wldeploy and no errors are encountered and application is deployed successfully.
This was a known issue in a previous version of weblogic. Maybe it is still not fixed.
CR282367
While using the WebLogic Administration Console with applications or EJBs deployed on a Managed Server that depend on a deployed library, you may encounter a java.lang.NoClassDefFoundError
Workaround:
The WebLogic Server Administration Console needs access to any shared library deployments so that Java data types and annotations can be processed. Therefore, all shared library deployments should always be targeted to the Administration Server in addition to any Managed Servers or clusters.
https://docs.oracle.com/cd/E11035_01/wls100/issues/known_resolved.html

Can we deploy the war file of ADF fusion application into web logic server?

I have created a ADF fusion application deployed in Jdev. When I deploy it as war file in Integrated weblogic server - works fine. When I deployed that as war in standalone weblogic server - it gives me error 500.
In the console (startweblogic.cmd) "java.lang.NoClassDefFoundError: oracle/adf/model/RegionBinding"
So I found on internet that deploying it as EAR the whole application would solve. Yes. It indeed was solved. My application runs fine in standalone weblogic.
Can we not deploy it as war in standalone weblogic?
The war file is working fine in integrated but not in stand alone.
Why?
P.S.: I installed ADF runtime, prepared the deployment profile to deploy as a web application.
I think you should make a quick research on the difference between these two types of archives EAR and WAR, then it should be clear to you.
Anyways, the fact is that you are trying to deploy a Fusion application, which includes in itself two different projects: the ViewController project and the Model one. The reason why on the standalone version it can only work if you deploy as an EAR is that this type of archive can contain several WARs, JARs (and other types of archives). While a WAR can contain only one of the projects (you can create a WAR for each, the Model and the ViewController project) and related jars. But they would be separate, so they would not have access to each-others files. I bet you've tried to deploy the ViewController.war only. This is the reason why you should deploy an .ear on the standalone version.
Instead, the integrated version, if an EAR file is deployed at the application level, and it has dependencies on a JAR file in the data model project and dependencies on a WAR file in the view-controller project. (It means, you are not deploying just the war from JDeveloper, it internally creates an EAR).
I hope this link would be useful.

Eclipse Jboss processess

I have a couple of questions concerning the way Eclipse 4.3 and JBoss EAP 6.1 work together.
The first would be concerning the Server clean function. Does it matter if the server is running or not when that function is selected within Eclipse? I have tried both ways and get no indication one way or the other that it has preformed the task.
The other question concerns the hot deploy. I'm just starting a project so I have errors in my files, mostly the configuration files. Everything complies clean. When Eclipse deploys my war file it does so with something like 0.0.1-SNAPSHOT.war. It's always the same name so I can't tell if mu updates have been deployed.
The way I'm currently processing my deploys is to:
1. Undeploy the war file from within the Server Admin page
2. Do a Maven clean
3. Do a project clean
4. Do a war build
5. Redeploy from within the Server Admin page.
So this question would be how to determine if my current changes have been deployed? Is there a better way of doing it than the way I currently doing it?
Thanks for the support.
Since you are using Maven, you could use the Maven JBoss Deployment plugin. This would make the entire process automated. Sometimes the Eclipse integration doesn't work like you expect it to. Additionally, you should see on the JBoss command line console from where you started JBoss, that the old war is undeployed and deployed.

Running Maven project on glassfish server

I want to run web based Maven project on glassfish server. I am totally new on maven. However, i have successfully build the maven project and glassfish server is up and running also. Moreover, there is WAR file also in target folder but i am confused what is the next step to run that project on glassfish ?
Any help will be highly appreciated.
You have different options to solve this task:
If you are new to Eclipse I suggest to change to NetBeans. It comes with integrated support for application server deployments. You just add your maven (or nearly any other type of project like WAR, EJB and EAR) project and your desired application server instance (Glassfish) and you are ready: Right-click your project and choose Deploy and it'll get deployed to your server. NetBeans also supports hot-deployment.
You can deploy your WAR file manually in GLASSFISH_ROOT/glassfish/domains/domain1/autodeploy and it'll get deployed if your server is running. But this is not very efficient during development.
If you want to stay with Eclipse you can use the maven-glassfish-plugin or this maven plugin to do the deployment for you. I'm not sure which one is better but this topic is also discussed in this question and this question.

How to avoid that glassfish deploys all the previous project?

When I start the glassfish server I have noted that it loads all the previous projects that i have developed and previously deployed.
I think that somewhere there is a config file that tells the server to reload the projects, but if i would like to work just on one of them what i have to do?
i suppose that i have to change or delete some entry in a glassfish configuration file, but i don't know where it is and how to do that.
thanks
Massimo
You have different options.
You can go to the Glassfish admin GUI via http://localhost:4848 and look under "Applications". You can undeploy properly deployed applications there.
If this is not working you can manually delete the applications from the glassfish folder: Look at
/[glassfish_installation_path]/glassfish/domains/[your_domain]/applications
or
/[glassfish_installation_path]/glassfish/domains/[your_domain]/autodeploy
Glassfish is running applications in these folders at startup time.
The undeployment depends somehow on the method you used to deploy the applications...if you used NetBeans to deploy you can probably even select the application in NetBeans and click "Clean and build" do undeploy it.