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

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.

Related

Tomcat 10 deploy a legacy J2EE war through manager

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.

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

How to run two WAR files in same worklight server?

I want to run two different WAR files in same Worklight server. I came know it is possible from this link. But want to know how to achieve this?
How to change the context root path of war file while
building?
This link explains only to change the context root for local development environment. But i want to run it in one of the testing servers.
Do i need to mention context root while deploying? -
Currently after building ill send the war files to other team to
deploy. They do have a ant script to deploy the war into server.
Let me know do i need to take care of anything else while running 2 wars in same server.
In Eclipse Worklight Studio you will have 2 Worklight projects. Each Worklight project will have its own .war file (in the \bin folder). By default, the context root of each project is the name of the project.
These .war files are separate of each other. They run separate of each other whether you are running in Worklight Studio or outside of it.
Outside of Eclipse Worklight Studio, you are not deploying the .war files to the Worklight Server.
You are deploying the .war files to the application server (WAS, Liberty, Tomcat) that Worklight Server is also deployed to it.
So pointing to http://worklightserver/contextRootA will be the first project, and pointing to http://worklightserver/contextRootA will be the second project

Running Ear Project Out of Eclipse

My team is taking over an existing web product that is made up of 3 Maven projects: one for a WAR, one for a couple of EJBs, and one that contains a few JBoss config files and builds an EAR that contains the WAR and EJB-JAR from the other two projects. We use Eclipse Helios and are currently building the projects individually with maven install and copying the resulting EAR to an instance of JBoss AS 6 for testing. While that process works, I am exploring the possibility of somehow streamlining that process; ideally a setup where small changes are automatically published to JBoss. Can anyone recommend a resource for configuring our projects/Eclipse to publish changes to JBoss automatically?
Get yourself "Eclipse IDE for Java EE Developers" and install JBoss Tools. The combination of the two will allow you to configure projects and server instances such that it is easy to deploy and test incremental changes.
Note that for this to work, your projects need to be WTP conformant. If you aren't using WTP already, take a look at the structure and metadata of projects created with Dynamic Web Project, EJB and Enterprise Application Project wizards. Either copy your source into new projects or copy the metadata files and fragments (very carefully).

How to restart only one war in ear in WebLogic?

I have two war files in my ear.
In JBoss I can restart one web application via jmx-console.
Not whole ear, but only one web application.
Administrative Console from WebLogic allows to restart whole ear only.
I cannot restart only one war in ear.
Why?
Within the packaged EAR, it is not possible to only deploy individual WAR.
But if you follow the directory structure required for Weblogic "Split Development Directory", then you can build your individual webapp within the Enterprise App, and get only that webapp reloaded. I'm not sure how this works from admin console.
This uses OOTB ant tasks available with Weblogic.
Essentially this becomes an exploded directory instead of packaged EAR.