Wednesday, July 14, 2010

Deploying ADF Applications as Shared Libraries on WLS

Today I have new post from Integration series. Most of the ADF applications are developed using multiple ADF Task Flows packaged into different ADF libraries. When we consume ADF libraries, by default these libraries are included into resulting EAR deployment package. In most of the cases it works well, however on large production deployments, customers ask to externalize and exclude ADF libraries from main site deployment package. This allows to redeploy shared ADF libraries without main site redeployment. Multiple applications can consume shared libraries, without packaging them into each EAR package. There is George Maggessy blog post about ADF Task Flows and Shared libraries on WLS - post. I will dive more deeper into this topic and will provide sample application. With my next blog posts I will describe how to:

1. Redeploy and Version shared libraries
2. Perform Production redeployment for main site EAR package, without restarting the server

Download sample application - ADFIntegrationUIShell4.zip. This sample provides UIShell application to integrate four different ADF Task Flows coming from ADF libraries. These libraries will be deployed as single shared library on WLS:


You need to package all these four libraries into single WAR file, to deploy it as a single shared library containing ADF jars. For this purpose, it is enough to create new JDeveloper application with simple generic project:


Include all four libraries into SharedWeb project. You should see them under libraries entries:


Ensure you specify empty context root path in WAR deployment profile:


You need to create and set MANIFEST.MF file to describe shared library:


Sample MANIFEST.MF file, with shared library name set to redsamurai.shared.lib:


When deploying WAR package, select Deploy as a shared Library option. JDeveloper will generate WAR archive with META-INF (manifest file) and WEB-INF (ADF libraries) folders:


After successful deployment, shared library redsamurai.shared.lib will be listed under WLS deployments:


In order to compile main application in JDeveloper, you need to add ADF libraries references:


However, these libraries should not be packaged inside EAR archive during deployment. For this purpose, uncheck them from WAR contributors for main application:


One of the last required configurations for consuming application - create (if it doesn't exist already) weblogic.xml deployment descriptor file under WEB-INF:


Register shared library redsamurai.shared.lib reference in weblogic.xml, this will allow to access it on runtime:


Now deploy main application as EAR package on WLS:


We can unpack generated EAR file and can see that weblogic.xml was updated during EAR generation process with ADF shared libraries references. Our shared library reference is present as well:


On runtime, through Oracle UIShell template we can load dynamic regions from ADF Task Flows, packaged and deployed into WLS shared library:


Both - main application and shared library package are visible under WLS deployment list:

101 comments:

Hasim said...

Too Freaking Cool and Most Used Standard in Corporate.

Anonymous said...

Andrejus Many Thanks for that post.
I was looking for this for a very long time. Waiting for your next Post :
1. Redeploy and Version shared libraries
2. Perform Production redeployment for main site EAR package, without restarting the server

Regards

Nicolas

Andrej Baranovskij said...

Hi,

I have posted second post from this series: http://andrejusb.blogspot.com/2010/07/redeploy-and-version-adf-shared.html

Regards,
Andrejus

Anonymous said...

Hi, Many thanks for the posts. My requirement is a bit different. I wish to deploy each ADF library jar file individually as shared library and not interested in bundling them into a single war and deploy it as a shared library. Is it possible? If so, what are the steps to be followed. I tried it but my application didn't run at all post deployment.

Kanika said...

Hi Andrejus,

I am new to ADF and tried creating an application as a shared lib and using the way you have suggested. The issue is that when i am running this application from my local instance its working fine and my main application is able to use the shared lib. But when i try the same through the ear deployment on the WLS, a blank page comes up with no data. My main application is not using any database tables. My shared lib includes just a print function.The shared lib and the main application are successfully deployed onto my WLS.

Can you please suggest the needful.

Thanks,
Kanika

Younis said...

Hi Andrejus,

I am wondering whether you could have achieved the same by using the lib directories (domain, or server) to place the jar files.

Regards,
Younis

Younis said...

Hi Andrejus,

I was wondering if you could have achieved the same thing by placing the jar files into one of the lib directories on the wls.

Regards,
Younis

Andrej Baranovskij said...

Hi,

It should be possible and it should work as well. Only that you will not be able to control it as shared library.

Regards,
Andrejus

Younis said...

Hi Andrejus,

Thanks for the reply (I apologize for sending the question twice, I didn't realize that they need approval).

i think one of the motivations behind having them in the lib directory is if you have a situation where you have a large number of JAR files that you want to manage separately, then this way you can deploy individually, without needing to add references to the consuming application (I appreciate that this might be a specific case, but this is kind of where we heading).

We will try that shortly and let you know how we go.

Regards,
Younis

Romano said...

Andrejus, Thanks for this post!!
This really helped me a lot!

VVS said...

Hi Andrejus

Please let us know the steps to be executed in case of implementing ADF security for all task flows and main application

Thanks
VVS

Andrej Baranovskij said...

Security must be enabled on main application in standard way as per docs.

Andrejus

Ramesh Reddy said...

Hi Andrejus

This post helped me a lot, and I am able to deploy all services as adf shared jars in WLS and able to access the task flows of adf shared jars deployed separately. But when I am enebling ADF security in the main Dash Board application and configuring the weblogic.xml for referencing the adf shared jars, my main portals login page it self is not rendering Fire fox is showing the following error:



The page isn't redirecting properly







Firefox has detected that the server is redirecting the request for this address in a way that will never complete.





This problem can sometimes be caused by disabling or refusing to accept
cookies.

Andrej Baranovskij said...

I think your login page is broken, may be this post will help - http://andrejusb.blogspot.com/2010/11/things-you-must-know-about-adf-faces.html

Andrejus

Ramesh Reddy said...

Hi Andrejus,

Thanks for your immediate reply I am looking into the blog link you have sent, but I am un able to understand the relation of login page rendering and having the adf shared library references in weblogic.xml, if I remove the adf shared library references in the main dash board application the login page is rendering.

Andrej Baranovskij said...

Hard to say, what is broken in your case. It works perfectly for me...

Andrejus

Ramesh Reddy said...

Hi Andrejus,

I have tried to use jsp and jspx with nothing in the pageas my login page getting the same error and if I am using html my page is being rendered, can you helpme out of this situation

Andrej Baranovskij said...

I dont know how I could help you? What error is generated?

Andrejus

Ramesh Reddy said...

Hi Andrejus,

I have tried with the login.jspx, from your sampple application It worked, as per my observation I found that if the launching page is having a pageDef the page is not launching and I am getting the error which I have mentioned i.e., The page isn't redirecting properly. But after this I am getting un authorized exception (401) for my home page for which I have security enabled.

Andrej Baranovskij said...

As per that blog, you need to enable Anonymous access for Login page. Did you set this permission for Login page?

Andrejus

Ramesh Reddy said...

Hi Andrejus,

Cant we have PageDefs for login page, If I remove pagedefs for login page login page is rendered else getting the same Old error on browser.

Ramesh

Andrej Baranovskij said...

Please read blog post about Login page more carefully.

You need to have Page Def for Login page and set anonymous access.

Andrejus

Ramesh Reddy said...

Hi Andrejus,

At last we found the culprit before deploying the shared applications we have unchecked the web.xml for the application in the filter it worked.

Ramesh Reddy said...

Hi Andrejus,

Is there a way to capture Browsers IP address in ADF

Thanks

Andrej Baranovskij said...

If you want to get client IP, you need to get "HttpServletRequest request" and then from request get request.getRemoteAddr()

Andrejus

Ramesh Reddy said...

Hi Andrejus,

What if hte client is behind a proxy.

Anonymous said...

Hi, Andrejus! Thank you for this post. But, after step of
"deploy as a shared Library" to WLS, I can't see this shared library on Admin console. (WLS version 10.3.5 Jdeveloper version 11.1.2.0.0). Can you help me with this question?

Regards, Stanislav

Andrej Baranovskij said...

Any errors reported in WLS log?

Andrejus

Anonymous said...

No errors in log. Process of deploying is successful. When I try Install this library(war file) using Admin console I get an error that: Application already exists.

Stanislav

Andrej Baranovskij said...

Yes, WLS Admin Console cant deploy libraries - thats correct.

Make sure in Deployments section you have set checkbox to display Libraries also, not only Applications. May be you are seeing filtered view.

Andrejus

Prashant Menon said...

Hi Andrejus,

Thanks for this really wonderful post. I was able to use this and have my task flows running as shared libraries without any difficulties.

I consumed the task flows (via shared library) into a WebCenter portal application and the task flows are working as expected. The only problem is that the logout link in the Portal application is no longer working. It seems like my portal session is getting lost the moment I visit a portal page which has a task flow (coming from a shared library)

This was not happening when I was directly adding my task flows as ADF library JAR's to the portal application. But now that the task flows are in a separate WAR file (shared library), I am getting this problem.

Any pointers as to how I can proceed in debugging this issue?

Thanks.
Prashant

Andrej Baranovskij said...

It still should work the same, because shared War is referenced directly through dependency (its not treating shared ADF task flows as separate application, but everything is assumed to be one application).

What code you are using to logout? Logout link is inside Portal UI template?

Andrejus

Prashant Menon said...

Hi Andrejus,

Yes. I am using the default webcenter portal logout link. This is the one which comes from the page template code "pageTemplate_globe.jspx"

Here is the code.

af:commandLink id="pt_glnk4" text="Logout" action="#{o_w_s_l_LoginBackingBean.doLogout}"

Andrej Baranovskij said...

Any specific error reported in the log, when logout is invoked?

Andrejus

Prashant Menon said...

Hi Andrejus ,

The first time I press logout, i don't get anything in the logs. I just get a browser dialog box with message "A connection to server has failed (status=404)". When i click OK on this dialog and click on Logout again I see "Faces lifecycle receives unhandled exceptions in phase RESTORE_VIEW 1
javax.faces.application.ViewExpiredException: viewId:/pages_transfer_and_payment/transfers - ADF_FACES-30108:The view state of the page has expired because of inactivity. Reload the page." in my logs.

This makes sense since the first logout has done its work and invalidated the session.The question that i have is why the first logout results in 404 from the server.

Andrej Baranovskij said...

This can be because of many reasons, related to WebCenter issues. I recommend to implement your own session invalidation and redirect method and call it from Logout action, instead of using WebCenter logout bean method.

Andrejus

Prashant Menon said...

Hello All,

In case someone stumbles upon this blog while researching this problem....this has been acknowledged by Oracle Support as a product bug (SR # 3-5121396721: Strange Issue with Logout | Shared Library in WebCenter)

As a workaround, I changed the logic for logout link in the page template as follows

af:goImageLink text="Logout" id="logout" rendered="#{securityContext.authenticated}" destination="#{'/adfAuthentication?logout=true&end_url=/faces/oracle/webcenter/portalapp/pages/login.jspx'}"

After this, logout link works fine for all portal pages. The problem still exists for admin pages, but my customer is OK to wait for a patch from Oracle Product Management for this.

Hope this helps.

Regards,
Prashant

Andrej Baranovskij said...

Ok, I see you changed it to use ADF authentication logout only to invalidate session - as I suggested earlier, very good.

Thanks for update.

Andrejus

Unknown said...

Hi Andrejus,

I found the blog useful in creating the EAR. I have a similar use case as of the example you have provided. There are four jar files as yours and all my pages are in the jar files. All these pages are accessed through navigation case in faces config.

But the problem i am facing is when i run the pages in the jar files through URL

http://127.0.0.1:7101/MyApp/faces/home.jspx

I am getting this error.

Error 404--Not Found
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.4.5 404 Not Found


Am i doing something wrong?


Note: Home.jspx is found in the jar file(department.jar) deployed as shared library


Thanks,
Rakesh

Andrej Baranovskij said...

Hi,

JAR files are packaged as ADF Library JAR files or simple JAR files? It should be ADF.

Andrejus

Wendy Tromp said...

Nice post, but I have a few comments:
- I did exactly what you said and I kept getting the error that ResAuth was required. Turns out i needed a res-auth tag in my web.xml inside the resource-ref. Why didn't you run into this?
- The library name in WLS is not the library name I specify in the manifest, it seems to be the name of the deployment profile. Neither that nor the name in the manifest seem to be the one I need to use in web.xml. Can you help me with this?

Andrej Baranovskij said...

Library name should be same as you deployed, and of course same name will be displayed in WLS. Use it for Manifest and reference in weblogic.xml

Andrejus

Unknown said...

Hi,

It is deployed as ADF library. but we are not able to run any page from our libraries.

The one thing that is different between your application and ours is that Application (similar to UIshell) does not contain any page. all the pages are in the deployed jar files.


I found you using a bean to access your pages.

Is it because that i am not using this ean my pages are not running?

Andrej Baranovskij said...

May be your main application doesnt have ADF context set in web.xml. Try to create some dummy ADF page in main, and the test your app.

No, bean is not mandatory - its just UI Shell utility bean.

Andrejus

Unknown said...

Hi,

I tried creating the page on the main application it runs fine. But none of the pages form the jar files run

Andrej Baranovskij said...

As I understood you are deploying JAR file as shared library.

Does it work to access page, when its deployed as part of single EAR together with main application?

Andrejus

Unknown said...

Its the same condition when we tried deploying it as a EAR as well

Andrej Baranovskij said...

Is it working, if you deploy project with pages as EAR, without including it into main application?

Andrejus

Unknown said...

Hi,

Ya i tried deploying individual projects as EAR and the pages in those projects are running fine

Andrej Baranovskij said...

Do you have security enabled inside Main application, may be permissions are not set for pages from libraries?

Andrejus

Unknown said...

No there is no security enabled in the application.


Rakesh

Andrej Baranovskij said...

There is URL Invoke property on ADF Task Flow, for Pages. Not sure how you are calling your pages, may be check this property.

It should work generally pretty easy.

Andrejus

Unknown said...

There is a main template wit which the pages are designed. The task flows are dropped in pages as regions.All the pages are present in the faces config for the navigation cases. These navigation rules are used to invoke the pages through command links.



Task flow URL invoke is just default.


May be am i doing something wrong in the URL i use?

URL i used to run the pages is

http://127.0.0.1:7101/myapp/faces/home.jspx


where myapp is my main application

Andrej Baranovskij said...

If you have sample application, send it to me - I will try to find time to look into it.

Andrejus

Unknown said...

Hi,

I have sent you a sample application based on hr schema . Kindly look into it.

Thanks,
Rakesh
Email id: rakesh.cs47@gmail.com

Andrej Baranovskij said...

Hi,

I found why page was not found, its because you was using wrong context root, its not "myapp". Its - MyApp-ViewController-context-root, So complete URL: http://192.168.229.131:7101/MyApp-ViewController-context-root/faces/Home.jsf

Besides that, I saw many other ADF standards violations. For example, its incorrect to define navigation in faces-config and access page directly - bypassing task flow call.

Andrejus

Andrej Baranovskij said...

Hi Rakesh,

All child applications should be completely rewritten, current implementation will not work correctly. I would rewrite it for you, but unfortunatelly i dont have enough free time.

I would advice to follow UIShell approach and integrate regions into main application. Current navigation model, doesnt trigger ADF Task Flows and doesnt initialize ADF Bindings correctly.

Your initial problem is resolved easy - you was just using incorrect context for Web.

Good luck.

Unknown said...

Hi Andrejus,
Thanks for your help,my application is working now ,the only thing is only .jspx pages are running and .jsf pages are not working is there a way around this.
Thanks in advance

Andrej Baranovskij said...

Not sure about .jsf, this can be even a bug - because facelets was introduced only in R2.

But in general, you should refactor your application - you should not call page directly, if this page resides in bounded task flow. Because you are loosing ADF context initialization.

Andrejus

Unknown said...

Hi,
some of the sub application was created in release one and then migrated to release2.

I am asking this is because we tried creating JSF in the main application which was created in release2 the JSF page runs.

Is it because we migrated ?

Andrej Baranovskij said...

I already answered, your sub applications are not organized based on ADF standard :) You should refactor first and then test again.

Andrejus

Puneet said...

Hi Andrejus,
Thanks for a wonderful blog post.
I tried to replicate what you have done in my application, but i am not able to import TabContext in Launcher.java ,when I try Its giving me an error
"import oracle.ui.pattern.dynamicShell.TabContext"
i am using Jdev Version 11.1.2.1.0.

Andrej Baranovskij said...

Most likely UI Shell library is missing. Just create one page based on UI Shell template, library will be added automatically.

Andrejus

Puneet said...

Thnks for the help its working now.

Anonymous said...

Andrejus,
Thanks for that post. I followed this example to developer a shared lib with jdev 11.1.1.2. All works fine.
Now I started to use jdev 11.1.1.5.
After running ADFIntegrationUIShell4, Strange things happens:
from console' the settings for redsamurai.shared.lib, The list of applications that reference this Library is empty.
If I add the library-ref to redsamurai.shared.lib in the weblogic-application.xml ,From console, application Uishell appears under "Applications that reference this Library".
But there is a new problem Context path conflict:
In the deployment, I saw the message:
Application Redeployed Successfully.
The following URL context root(s) were defined and can be used as a starting point to test your application:
http://localhost:7101/uishell
SharedWeb
Si if I dploye seconde application uishell2 who use also sharedlib as uishell, deployment always fails
An exception occurred for task [Deployer:149026]deploy application UIShellApp2 on DefaultServer.: Context path '/SharedWeb' is already in use by the module: SharedWeb application: UIShellApp2_application1. Weblogic Server Exception: weblogic.application.ModuleException: Context path '/SharedWeb' is already in use by the module: SharedWeb application: UIShellApp
Could you please give me some advices for this problem?
Thanks
Dorothy

Anonymous said...

Hi,

I have packaged my ADF project as a shared library and deployed to WLS.

When another EJB application on same WLS tries to access this library at run-time, it throws InvalidObjectAccessException at vo.executeQuery().

The ADF library has no UI and just the model to access data using EO and VO. I have created the AM using Configuration.createRootApplicationModule("o.MyAM","MyAMLocal").

What is that I'm missing? Do we need to make any configuration changes in the EJB application that accesses the ADF library?

Thanks.

Andrej Baranovskij said...

Hi,

Are you release AM after creating it? Also try to disable AM pooling (AM config options). When you create AM outside of ADF context and then destroy it, there is no need using AM pooling.

Andrejus

BK said...

I am not releasing the AM. I'm reusing the AM instance.

I was getting NPE when I release AM using Configuraion.releaseRootApplicationModule(myAM,true).

Andrej Baranovskij said...

This sounds suspicious - reusing AM. I would recommend to release at the end of request.

Andrejus

BK said...

I should also mention that there is another ADF application that accesses this shared library and has no issues.
The error is only when the EJB application access the library.

BK said...

I get the following error when I release the AM:

java.lang.NullPointerException
at oracle.jbo.client.Configuration.releaseRootApplicationModule(Configuration.java:1435)

Andrej Baranovskij said...

What about AM pooling, is it disabled?

Andrejus

BK said...

jbo.ampool.doampooling=false

is set in my AM config.

Andrej Baranovskij said...

Is quite hard to advice something proper without detail debugging.

Andrejus

BK said...

This is how I create and release my AM instance.

MyAMImpl myAm = (MyAMImpl)Configuration.createRootApplicationModule("org.MyAMImpl", "MyAMLocal");

if(myAm != null)
{
Configuration.releaseRootApplicationModule(myAm, true);
}

Do you see any reason why I get NPE when I release the AM?

Anonymous said...

Hi,

Can i do this for model project as well. I want to deploy model project as shared library and dont want to include model jar in view application EAR.

When trying the same i am getting error while building view EAR : "No J2EE module found in EAR.". I can see the model project added under the ADFLibrary.

Please suggest.

Thanks

Andrej Baranovskij said...

It should work if you package Model project code into WAR. Dont use ADF Library JAR in this case.

Andrejus

Anonymous said...

Hi Andrejus,

I have a question to ask and would like to ask some of your precious time please.

Supposed in my Shared Library, I added an entry for a custom servlet filter then after packaging it and deploying it as shared library will the other project that uses this shared library would be able to use my custom filter?

I mean after referencing the shared library, my custom filter would be able to track down incoming request also?

Is this possible?

Thanks

--marky

Ramesh Reddy said...

I think ADF shared Library it self means it is a library ffrom where the taskflows are used by a dahs board application or any other application this is for reuseability so there is no web context for the shared library so I dont think you can configure filter as there will be no web.xml file in the shared library

Andrej Baranovskij said...

Yes, it will use web.xml from main web application (WAR deployment). It will ignore web.xml from shared library. This needs to be tested, but this is my understanding.

Andrejus

Danilo said...

Hello,

We are trying to reference an application (with model and view controller) deployed as a war file but it does not work.

We have the following error running the main application.

"oracle.jbo.JboException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-34010."

It always takes the jar of the referenced library even if we removed it from the deployment profile
Is this normal behavior ?

Best Regards,
Danilo

Ramesh Reddy said...

Hi can you eloborate your problem in detail i.e., how dod you packaged the main application and the shared library application

Anonymous said...

Hello,

Nice blog. I want to know whether we can deploy a ADF Shared libraries to glassfish server?

Regards
Tinto Chacko

Rahul said...

Hi Andrejus,

Thanks for this post.but i am facing a problem when i am deploying my main application.I also tried to run and deploy your sample application but getting same this error.


[11:09:37 AM] Unable to determine the target platform from the Profile. Using default
[11:09:37 AM] ---- Deployment started. ----
[11:09:37 AM] Target platform is (Weblogic 10.3).
[11:09:39 AM] Retrieving existing application information
[11:09:39 AM] Running dependency analysis...
[11:09:39 AM] Building...
[11:09:43 AM] Deploying 3 profiles...
[11:09:43 AM] Wrote Archive Module to C:\JDeveloper\mywork\UIShellAppFu\Model\deploy\UIShellAppFu_Project1_adflib.jar
[11:09:45 AM] Wrote Web Application Module to C:\JDeveloper\mywork\UIShellAppFu\ViewController\deploy\UIShellAppWeb.war
[11:09:45 AM] Wrote Enterprise Application Module to C:\JDeveloper\mywork\UIShellAppFu\deploy\UIShellAppFu_Project1_UIShellAppFu.ear
[11:09:46 AM] Redeploying Application...
[11:09:47 AM] [Deployer:149191]Operation 'deploy' on application 'UIShellAppFu_Project1_UIShellAppFu' is initializing on 'adf_ManagedServer'
[11:09:47 AM] [Deployer:149193]Operation 'deploy' on application 'UIShellAppFu_Project1_UIShellAppFu' has failed on 'AdminServer'
[11:09:47 AM] [Deployer:149193]Operation 'deploy' on application 'UIShellAppFu_Project1_UIShellAppFu' has failed on 'AdminServer'
[11:09:47 AM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application UIShellAppFu_Project1_UIShellAppFu on JRFWSAsyncJmsServer,AdminServer,adf_ManagedServer.: Failed to load webapp: 'UIShellAppFu-ViewController-context-root'.
[11:09:47 AM] [Deployer:149193]Operation 'deploy' on application 'UIShellAppFu_Project1_UIShellAppFu' has failed on 'adf_ManagedServer'
[11:09:47 AM] [Deployer:149034]An exception occurred for task [Deployer:149026]deploy application UIShellAppFu_Project1_UIShellAppFu on JRFWSAsyncJmsServer,AdminServer,adf_ManagedServer.: Failed to load webapp: 'UIShellAppFu-ViewController-context-root'.
[11:09:47 AM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'UIShellAppFu-ViewController-context-root'
[11:09:47 AM] Caused by: weblogic.management.DeploymentException: Error: Unresolved Webapp Library references for "ServletContext@9262302[app:UIShellAppFu_Project1_UIShellAppFu module:UIShellAppFu-ViewController-context-root path:/UIShellAppFu-ViewController-context-root spec-version:2.5]", defined in weblogic.xml [Extension-Name: redsamurai.shared.lib, exact-match: false]
[11:09:47 AM] See server logs or server console for more details.
[11:09:47 AM] weblogic.application.ModuleException: Failed to load webapp: 'UIShellAppFu-ViewController-context-root'
[11:09:47 AM] Deployment cancelled.
[11:09:47 AM] ---- Deployment incomplete ----.
[11:09:47 AM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)

Andrej Baranovskij said...

This means shared library "redsamurai.shared.lib" is not deployed. You should double check, if this library is deployed correctly.

Andrejus

Rahul said...

Hi,
redsamurai.shared.lib shared lib is already installed on my WLS. its status is also active.Type is Library but showing nothing in Health.is any thing wrong in deployment?

Andrej Baranovskij said...

Yes, something wrong with the deployment. It works for sure, in general.

Andrejus

George said...

Hi Andrejus,

Thanks for the post. Is there a post on the production redeployment without a restart. I am interested in being able to run a previous version of the shared library without having to restart the server. Is that possible?

Thanks,
George

Andrej Baranovskij said...

May be this post will help you: http://andrejusb.blogspot.com/2010/07/redeploy-and-version-adf-shared.html

Andrejus

Unknown said...

Andrejus,

I always enjoy your posts and 99% of the time they work like a charm.
So does this one if I create a new Application Workspace to generate the shared library.
However we would like to deploey specific functionality to separate libraries.
To do this, in the application workspace we create a Library project in addition to the Model and ViewController project. (conform your post)
However, when we try to generate the Library.war file, JDev generates an ear file.
When we deploy that ear file the consuming application is not able to use the library.
Any ideas as to why the ear file gets created?

Kind regards,

Rob

Ramesh Reddy said...

Check your deployment profile for the application you want to make it as a shared library. Create a new deployment profile for creating a war.

Andrej Baranovskij said...

Hi Rob,

As you can see in this example, I'm using empty project with WAR profile, this project imports all JAR's I want to be a part of shared library. This WAR gets deployed on the server and is registered as shared library.

Regards,
Andrejus

Unknown said...

Andrejus,

That is exactly what I have done.
The project containing the VC logic gets deployed as ADF Library Jar and I created a Livrary project containing the VC jar only contains a WAR deployment profile. Yet I get a war and an ear file.
Can I send you the application workspace to have a look?
(Probably some small insane setting I overlook)

Kind regards,

Rob

Andrej Baranovskij said...

Hi Rob,

Yes sure - send me your sample workspace by email, I will take a look.

Regards,
Andrejus

Unknown said...

Thank you for the post ,
but in the live environment , cannot access the backing bean classes for functions or procedures.
The Message is (ClassFunncOrProc unreachable ...) How I can Solve this problem , please

Andrej Baranovskij said...

This would mean shared library is deployed incorrectly, generally you should be able to access all content of the library.

Regards,
Andrejus

Devin said...

Andrejus,

I'm having a similar problem to Wendy Tromp where my war deployment is not showing up with the same name as I have defined in the manifest.mf file. It shows up instead as what I have named the deployment profile. Do you know why this might be happening? I have referenced the the manifest file in war options on deployment profile properties.

Thanks for the help

Anonymous said...

I want to Know If it is possible use this same aproximation to deploy in GlassFish, since I dont want install an EAR file with all WAR dependencies.

My Application which is deployed as EAR, have another application deployed as Shared Libraries with its . With this aproximation I can create easily modular application.

Bhavesh said...

Hi,

My webApp which refers the shared library seems to be reading servletContext param from web.xml of shared libraries.
Is this expected behaviour or an ADF bug.
Can you confirm this comment
"Yes, it will use web.xml from main web application (WAR deployment). It will ignore web.xml from shared library. This needs to be tested, but this is my understanding."

Anonymous said...

Nice post.
I was wondering how to use security context in taskflow if its being consumed in webcenter portal (12c). I mean jazn won't go along in shared lib.
Do we need to configure security in WebCenter Portal?
Sorry this may not be the correct blog to ask this question..

Ravindra Raghuwanshi said...

Hi Andrejus,

I am trying something similar in my application. I deployed the shared libraries into weblogic server but when i try to deploy my current application it failed in deployemnet with following error.

PSC_LNPRESTWebServiceWebApp_waroracle_apps_fnd_applcore_common_ApplSessionServiceBean_Home, throw exception javax.naming.NameAlreadyBoundException. [EJB:011224]Unable to bind the interface oracle.apps.fnd.applcore.common.ApplSessionService to ApplSessionService. Another EJB has already bound an interface to that name.; remaining name 'ApplSessionServiceBean#oracle/apps/fnd/applcore/common'. NestedException Message is :[EJB:011224]Unable to bind the interface oracle.apps.fnd.applcore.common.ApplSessionService to ApplSessionService. Another EJB has already bound an interface to that name