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

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

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.

Deploying Applications to Bluemix

Is it possible to deploy the J2EE Module only into Bluemix? Because what I did now is I deployed the entire whole WebSphere Application Server. But then, what happen is that I can't run the application locally anymore because the server.xml configuration has been changed to use the database service selected in the Bluemix platform.
Here's a snippet of the current setup. If there's another way, can someone tell me how
You can publish EAR and web modules directly to the Bluemix server in Eclipse. The Tools also support incremental publish of both type of modules.
To deploy the application, you can simply right click on the Bluemix server on the Servers view and select the Add and Remove option. For details, you can refer to Publishing an EAR file section of the documentation. The steps for publishing a web module is the same as publishing an EAR module.
Note that publishing the module directly does not allow you to include Liberty server configuration, i.e. the server.xml, as part of the publish operation. In case your application require specific server configuration settings, then you need to continue to publish the entire server as before.

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 doesn't import all Axis2 jars but project still runs on Tomcat?

When I develop an Axis2 web service on Eclipse, I noticed that Eclipse is automatically copying the classes from the lib folder of Axis2 to the lib folder of the new project. However, not all classes from the lib folder of Axis2 are being copied. Interestingly, the web service runs without any problem when deployed to Tomcat via Eclipse even if some the jars from Axis2 were not copied. Also, when I viewed the temp file of Tomcat, Tomcat seems to generate the jars for the listed modules on modules.list of the web service.
Can someone enlighten me regarding what is happening on this? Why Eclipse doesn't copy all the jars from Axis2? Why can the web service run on Tomcat even without the other jars from Axis2? What are those temp files for? When and why is it being generated?
I tried to run the same project on WebSphere and I am encountering a ClassDefNotFound exception because of the missing jars. My problem was solved when I copied all the Axis2 jars that was not copied by Eclipse to my project. But I'm not comfortable with my solution because Tomcat can run my project even without those jars. Is my solution really the right solution? Or am I missing a configuration setting?
This is just for clarification:
My web service is already running in Axis2. My class loading policy is set to PARENT_LAST. I know that since WebSphere has its own Axis2 configuration, the class loading policy must be set to PARENT_LAST so that WebSphere will use the Axis2 from the project itself. Aside from setting the class loading policy, I did something to make my web service run on WebSphere. I describe what I did above. My question is why such method must be taken?
WebSphere has it's own axis2 configuration as part of its Java EE server spec for JAX-WS. Change your class loading policy to PARENT_LAST and check if that solves your problem.
Edit:
As the original post already states: WebSphere is a Java EE server depending on version it supports its the standard Java JAX-WS web services. Actually web services became part of the standard jdk.
If you use JAX-WS like mentioned in Introduction to JAX-WS or building web services then you don't have to add any 3rd party library for getting your web services running. As soon as you use the non JDK implementation like axis2 you have to package it with your application.
IBM didn't just pack the axis2 into their WAS/JDK, they modified it. I'm not sure what Tomcat delivers, however as long as you use JAX-WS it shouldn't matter. With JAX-WS you don't have any direct import of the org.apache.axis packages. If you use these imports you have to supply the libraries and make sure that yours are loaded.

Remote deploy from Eclipse to JBoss AS and integration Eclipse with remote JBoss

I have the following situation. My JBoss server runs on the remote server under some bound address. I would like to run Eclipse on my local machine and deploy results of work to the remote server where I could test it and debug it. I'm working on enterprise Java project and I'm normally deploying one ear file.
I know how to provide remote debugging but what possibilities exist for integrating remove deploy in Eclipse?
I was trying for first the JBoss tools plugin. There is a deploy-only server for the only deploying the project. I'm connected on the network disk on the remote server where JBoss instance runs.
But this plugin deploys ear exploded and afterwards because of the one persistence.xml in my project where tag defines what jars contain entities and instead of the jar there are something.jar directories. Then hibernate isn't able to load entities.
Is there some possibility how to easily make a remote deploy directly from Eclipse? Or better is there possibility how to integrate work on remote JBoss server in Eclipse (I mean run JBoss server, stop it.)?