Friday, December 5, 2008

Deploy your 11G webapp to a WebLogic Server

Deploying your web application from JDeveloper 11g to a WebLogic 10.3 Server is not so simple as with the internal WebLogic server of JDeveloper. Off course we need to install the WebLogic 10.3 and install the ADF runtime 11g to this server ( See my previous blog for this ).

The first step is to create the datasource in WebLogic. In the configuration of the ADF BC applications modules you can see what should be the jndi name in WLS. Default is this, the database connection name of the application with DS. For example database connection = scott then the jndi name will be jdbc/scottDS

Create the jdbc datasource in WLS

Very important, you must enable this datasource by selecting a target. Default the target is not selected and the datasource is disabled.
Add a war deployment to your application.
Give the application a root context.
Now we need to add a ear deployment to your application.

You have to select the just created war deployment profile. In the ear deployment contains the weblogic-deployment.xml where is defined that this application needs the adf 11g library
Now we can deploy the ear to WebLogic server
Here the result of the deployment
In the deployment view we can see our application with its j2ee modules
In the ADF 11g library deployment we can see the just deployed application as a reference to this library


  1. Thank you for sharing this valuable information!


  2. Hi Edwin

    i deployed application to WLS 10.3
    evry thing done successufully bu the applicationModule connection error

    here my steps:
    -install ADF Runtime
    -creating domain
    -creating JDBC connection as :
    ----jndi: jdbc/connectionDS
    ----using thin
    ----using url:
    ----using Driver:
    ----connection tested and success
    ----then applyed to server instance

    in my application AM using DS instaed of URL

    - creating WAR then EAR
    - deploy EAR to EAR
    -deploy application to WLS

    then deployed Successuflly
    and page displaied
    but when open any page have BINDING then get this error:

    WARNING: Unable to locate the credential for key UCouncil in C:\bea\user_project
    Dec 31, 2008 2:56:50 PM oracle.adf.share.jndi.ReferenceStoreHelper throwPartialR
    WARNING: Incomplete connection information
    (Dec 31, 2008 2:56:51 PM PST)
    (Error) (HTTP) (BEA-101017)
    ([weblogic.servlet.internal.WebAppServletContext@59b3b6 - appName: 'UCApplicationEAR', name: 'uc', con
    text-path: '/uc', spec-version: '2.5', request: weblogic.servlet.internal.Servle
    GET /uc/faces/index.jspx?_adf.ctrl-state=979418204_3 HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
    Accept-Language: af
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2
    Connection: Keep-Alive
    Cookie: JSESSIONID=mdKJJb4MNtbTM1f9H2HQqyJ0ny5HPGv0JjdpWSXBx9Z6bX0PhB29!-2087614

    ]] Root cause of ServletException.
    JBO-30003: ??? ???? ????????? (BUIT.Development.UCouncil.model.UCouncilsLocal) ?? ??? ???? ????? ????? ???? ? ???????? ??????:
    at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(
    at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(
    at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(
    at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(

    Truncated. see log file for complete stacktracejava.lang.ClassCastException: weblogic.jdbc.wrapper.PoolConnection_weblogic_jdbc_oracle_OracleConnection cannot be cast to oracle.jdbc.OracleConnection

    at oracle.jbo.server.OracleSQLBuilderImpl.setSessionTimeZone(
    at oracle.jbo.server.DBTransactionImpl.refreshConnectionMetadata(
    at oracle.jbo.server.DBTransactionImpl.initTransaction(
    at oracle.jbo.server.DBTransactionImpl.initTxn(
    at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(
    Truncated. see log file for complete stacktrace)

  3. Hi, Which jdbc driver did you use. Can you use the Oracle thin not XA driver.

    this is your problem.

    stacktracejava.lang.ClassCastException: weblogic.jdbc.wrapper.PoolConnection_weblogic_jdbc_oracle_OracleConnection cannot be cast to oracle.jdbc.OracleConnection

    thanks Edwin

  4. first I thanktyou very much for response and i regard your time

    that what i use
    i dont chose thin with XA absolutly
    i chose NOT XA
    But Strangely when use regular Drive and URL
    that :
    not success connection and get error messages and cannot activate changes
    then i use as WLS doc this

    i dont know is there any other configuration to AM or what?

  5. Hi,

    Are you using the oci lib to connect to the database .

    I always use the thin driver else you need to setup a net8 environment

    very strange your default connection url should work.

    can you send the datasource config of the config.xml of wls

  6. Hi can you change your datasource xml. I have this and it is working fine


    this is your config


  7. Hi
    i try your solution but but Sorry problem still

    really , strang indeed

    is must change AM dataSource to
    jdbc/****DS as WLS
    or keep as it java:comp/env/jdbc/****DS

  8. Hi,

    it must be like java:comp/env/jdbc/****DS

    very strange.

  9. I so sorry Edwin

    i get the problem

    it is windows 2008

    i change the platform then the default url work fine and application deployed smootly and work fine

    thanks alot
    and sorry for noisy

  10. Hi! I have problems with navigation when I deploy my application on Weblogic server 10.3. In my application I have two pages. One page where I can see the records. In this page I have button Create with action to secound jspx page. When I press this button then the first form (where I could see all records) is empty - the create operation worked, but navigation to second page not. Navigation rules is in adf task flow. In default server all works correct. Where is the problem?

    Maybe when I deploy my application I need specialy deploy adf task flow or somewhere write something? If so, then can you explain me where? Any suggestions what to do.

    And when I insert "panelCollection" element in jspx page which I deploy to webLogic 10.3 and run the page then I can not see this "panelCollection" element. Why it is so. On default server all is ok! Maybe problems with ADF???

    I have in log:

    2009.26.3 20:12:52 oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImp
    l setLifecycleContextBuilder
    WARNING: ADFc: Replacing the ADF Page Lifecycle implementation with 'oracle.adfi
    2009.26.3 20:12:52 oracle.adfinternal.controller.util.model.AdfmInterface initia
    INFO: ADFc: BindingContext is present, using ADFm APIs for DataControlFrames.
    2009.26.3 20:12:52 oracle.adfinternal.controller.metadata.provider.MdsMetadataRe
    INFO: ADFc: Controller caching of MDS metadata resources ENABLED.
    2009.26.3 20:12:52 oracle.adf.controller.internal.metadata.MetadataService$Boots
    trap add
    INFO: ADFc: Loading bootstrap metadata from '/WEB-INF/adfc-config.xml'.
    2009.26.3 20:12:54 fe
    WARNING: Unable to locate the credential for key AUGI in D:\bea\user_projects\do
    2009.26.3 20:12:54 oracle.adf.share.jndi.ReferenceStoreHelper throwPartialResult
    WARNING: Incomplete connection information

    Best regards!

  11. Hi, just a few checks.

    did you installed adf lib on wls and is this the same version as your local jdev.

    did you make a war/ ear deployment profile.

    did you make the jdbc datasource and targeted at the right wls server.

    do you run it on the admin server.

    do you have in the weblogic-aplication.xml still have the ADF listener.

    by the way you don't need to make a different deployment for task flows.

    check your am configuration and see how the datasource is called. it has to something like this jdbc/xxxxDS
    xxxx is your connection name.

    hope this helps

  12. 1. I don't installed adf lib on wls it is necessary if I use Jdev 11g and Weglogic 10.3? If yes then can you say how to do it?

    2. I made war for Model and Viewcontroller and one ear for applicattion.

    3. I made the jdbc datasource and targeted it at the right wls server! By the way I can see data in my form, but I can't go to other pages by pressing button and can't see all elements in form (for example can't see panelCollection element).

    4. I run it on the admin server.

    5. In which directory is correct weblogic-aplication.xml file and If I have listener then I need it to remove?

    Best regards!

  13. Hi,

    please see this how to install adf on wls

    in your project home you have a folder \src\META-INF and in this the weblogic-application.xml is located.

    you can remove the listener class this is only necassary locally.

    thanks Edwin

  14. What is difference between ADF Task Flow and Faces-Config? When I create navigation between pages with ADF task flow then the navigation don't work when I deploy my application to Weblogic 10.3. When I use default server then navigation works fine. With Faces_config in both situations all works ok - on Stanalone server and default.

    Where is the problem?

    Best regards!

  15. Hi,

    the faces-config is the old way. adfc-config is the new way.

    but did you put the jsf pages in the adfc-config.xml file and select this file as run target in your project run options.

    thanks Edwin

  16. Hi,

    I have registred domain, there I need to write IP address. How can I get to my application where is written weblogic port and context root - ?

    ok, you can set your ip adress on your network device with ifconfig or in your network adapter.

    or you can add this ip adress on the server in the wls console then wls will add this address on your network device , here you can change the port number too.

    to change the name augi you can change the war profile see this pic


  17. HI! I have problem when I tried to change weblogic listen port from 7001 to 80. When I changed from 7001 to 7777 then all works ok! But why not on 80? With apache all works ok on 80 too.

    I restart my weblogic server and then I have following errors:

    "Server failed to b
    ind to the configured Admin port. The port may already be used by another process.

    Unable to create a serve
    r socket for listening on channel "Default". The address might be
    incorrect or another process is using port 80: Address
    already in use: JVM_Bind.

    Server failed
    . Reason: Server failed to bind to any usable port. See preceeding log message f
    or details.

    Unable to create a serve
    r socket for listening on channel "Default[2]". The address might be i
    ncorrect or another process is using port 80: Address al
    ready in use: JVM_Bind.

    Unable to create a serve
    r socket for listening on channel "Default[1]". The address might
    be incorrect or another process is using port 80: Addres
    s already in use: JVM_Bind.

    Server state ch
    anged to FAILED."

    Best regards!

  18. ok ,

    it seems your port 80 is in use. probably by apache use netstat to check this out.

    but if you have apache on port 80 you can add a wls plugin in apache which routes it to port 7001

    see this

    see this part
    The last part is to configure Apache and the enterprise applications for High Availability.
    Install apache 2.2 and download the weblogic module for apache here.
    edit the httpd.conf add the following lines

    LoadModule weblogic_module modules/

  19. Hi! I want to know how to add prefix www to my domain? I can access my app. using, but I want use Can you help me!?
    Maybe some good tutorials - step by step how to do this!?

    Best regards!

  20. Hi,

    you have to this in your dns server at your provider

    and you can make a virtual host in apache and re-direct to the a alias with the wls plugin to wls.

    first take a look at your dns server

  21. HI! Thanks for reply! I have DNS server addres and this is, but I want I don't want to use apache. Other suggestions? Can I use only wls server? If yes, do you have step by step tutorial - how to do this? I think I need Virtual hosts and clusters, but don't know how to configure. Please help!

    Best regards!

  22. Hi,

    Ok you got your own domain, make a sub entry on this domain. your provider should support this like mail or www.
    and point www to the same ip as your domain

    a virtual server in wls is not possible it can only listen on ip-adresses. but it should always work even with www or mail.


  23. Hi Edwin

    I am little bit confuse here, do we have to create WAR files for both
    1) Model controller
    2) View Controller
    if yes than do we have to specify root context same for both the deployment war profiles .

    Arshid Bhat

  24. Hi,

    I am little bit confuse here, do we have to create WAR files for both
    1) Model controller
    2) View Controller

    No the viewcont project has a dependency with the model project so when you create a war on the view then jdev copies the code in the viewcontroler project.

    what you can do, is to make a jar deployment profile on the model project and use this deployment profile as dependency in the viewcontroller project.


  25. Hi Edwin. Please excuse me for me english.
    I made in my application a module for connection with my database.
    In the Defaultdomain in weblogic 10.3 this deploy perfectly. After I create other domain in this, and deploy the application but the module not connect with the database.
    Thank you for your comment

  26. Hi Lain,

    Did you make a new datasource on the wls server and is the target of this datasource the right one.

    and check your datasource url in the am configuration this must match with the one in wls.

    Hope this helps

  27. Thank you Edwin for your answer. But I have other question. Where is datasource URL? My module in the file weblogic-application.xml is:

    name Connection1
    type JDBC
    path META-INF/Connection1-jdbc.xml

    Thank for your help.

  28. Hi,

    I think it is located in Connection1-jdbc.xml

    Did your deploy an ear , in a war this datasource is not deployed.

    else make your own datasource. the jndi name must be jdbc/dbconnectionDS


  29. Thanks for sharing, It's very helpful.

  30. Hello,

    We had an applciation running on OC4J 10G application server. Now we want to move this applciation to the 11G server.

    What should be the steps to do it?
    I created an EAR file and deployed it to the Weblogic server. it deployed successfully. How cani check the application is deployled corrected ?
    When i try to access the the Login page, it does not work ? I am new to WEBlogic and have no idea about it.please your help is required in the issues.

    thanks is advance.

  31. Hi,

    it depends what you did in your webapplication. But when you use a login module you need move this to wls security realm and maybe you need to make shared libraries and configure weblogic-application.xml.

    for errors please check your domain\servers\XXXXX\logs.

    and see in deployments ( wls console ) for the status of your application deployment.

    good luck

  32. Dear Edwin,
    I have a generic project that includes both JSF pages with backing java beans. How to deploy this project into WLS? and What is the suitable archive type that archives this project?
    Thanks in advance.

  33. Hi,

    For a webapp you need to create a WAR deployment profile. You can do this in JDeveloper , Eclipse , ANT or maven. And you install this war in deployment.

    optional , you can add this WAR to an EAR. If you have EJB you can also include this in this EAR.