Forum Stats

  • 3,827,608 Users
  • 2,260,798 Discussions
  • 7,897,314 Comments

Discussions

Is it possible to start WebLogic server automatically when running forms in Oracle Form Builder?

Moslem
Moslem Member Posts: 39 Green Ribbon

I would like to know if there is a possibility to start WebLogic server automatically when running forms in Oracle Form Builder. In fact, after launching Form Builder, when clicking on the "Run form" button, I get this error message :

FRM:10142 HTTP listener is not running on localhost on port 9001. Please start the Listener or check the run time preferences.

In order to fix that, this is how I usually proceed :

  1. I go to the "bin" folder located on the following path: C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin
  2. I run the startNodeManager.cmd file as administrator.
  3. I run the startWebLogic.cmd file as administrator.
  4. I open a new command prompt then run this command-line: startManagedWebLogic.cmd WLS_FORMS

However, all of this takes some time to get the work done and fix the issue. Is there any way to make it automatic when running forms or even once Form Builder is launched?

Thanks in advance.

«1

Comments

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,208 Employee

    Rather than starting the Builder using the executable, create a batch file to start whatever you want then make the last step starting the Builder.


    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Moslem
    Moslem Member Posts: 39 Green Ribbon
    edited Mar 30, 2022 4:37PM

    I have actually created a batch file (that I named "startBuilder.bat") for that purpose. Here is its content :

    cmd /c "cd C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin"

    start /d startNodeManager.cmd

    start /d startWebLogic.cmd

    cmd /c "startManagedWebLogic.cmd WLS_FORMS"

    start /d "C:\Oracle\Middleware\Oracle_Home\bin" frmbld.exe


    However, when running it as administrator then running the wanted form, I keep getting the same error message that I have mentioned :

    FRM:10142 HTTP listener is not running on localhost on port 9001. Please start the Listener or check the run time preferences.

    Taking in consideration all the steps that I have mentioned in the beginning of this thread, is there any mistakes in the startBuilder.bat file content?

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,208 Employee

    Generally speaking, what you are trying to do is not a good idea, at least the way you are doing it. Think about it, if you run this script to start the Builder the servers will start. But what happens when/if you need to exit the Builder or even if it crashes? Now you run the same script again to restart the Builder, but the server are already running yet your script doesn't know that. Besides wasting resources trying to start servers that are already running, you run the risk of orphaning processes.

    The better approach would be to start the servers as a Windows Service. Then start/stop the Builder as you normally would.

    https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/start/winservice.html


    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Moslem
    Moslem Member Posts: 39 Green Ribbon

    I got your point 🙂

    Well, I have created a server-specific script that would do the needed work. Here it is :


    SETLOCAL

    set DOMAIN_NAME=base_domain

    set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain

    set SERVER_NAME=WLS_FORMS

    set WL_HOME= C:\Oracle\Middleware\Oracle_Home\wlserver

    set WLS_USER=weblogic

    set WLS_PW=my_password

    set PRODUCTION_MODE=true

    set HOST=localhost

    set PORT=7001

    call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd"

    call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"

    ENDLOCAL


    Still,  just to take some precautions before going further in the process of creating the needed Windows service, I would like to check some points out in order to clear some confusions :

    1. In the documentation on the link you gave me, it is mentioned that the text file that contains the server-specific script has to be created in the root directory for the domain's Administration Server. Does that mean in the folder named "\AdminServer" that is located on the following path : C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\servers\AdminServer (see screenshot 1 in the end of this comment)?
    2. Concerning the following bach command : set SERVER_NAME=WLS_FORMS , is it correct (Knowing that I'm aiming to fix the bug gotten when trying to run forms in Form Builder)?
    3. Is there any other mistakes in my script?

    Screenshot 1 :


  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,208 Employee
    edited Mar 31, 2022 8:15PM

    It looks like you are missing a references to the Admin Server.

    Take a look at MOS Note 2478063.1

    Similar information is here too:

    https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/start/winservice.html#GUID-34343DF7-F524-47F1-BFCA-FDCCCABC9C4C


    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Moslem
    Moslem Member Posts: 39 Green Ribbon
    edited Mar 31, 2022 9:35PM

    I have added it. Here is the script updated :


    SETLOCAL

    set DOMAIN_NAME=base_domain

    set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain

    set SERVER_NAME=WLS_FORMS

    set ADMIN_URL=http://localhost:7001

    set WL_HOME= C:\Oracle\Middleware\Oracle_Home\wlserver

    set WLS_USER=weblogic

    set WLS_PW=my_password

    set PRODUCTION_MODE=true

    set HOST=localhost

    set PORT=7001

    call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\setDomainEnv.cmd"

    call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"

    ENDLOCAL


    How about the the text file that contains the server-specific script? Should it be located on the following path? : C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\servers\AdminServer 


  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,208 Employee

    I recommend you go back and review the documentation I mentioned. I am not aware of any text file you should end up with. All the files are scripts (one calls the next and so on), so it won't matter where you locate them as long as the one script calling it has the full and correct path to it included in its call.


    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Moslem
    Moslem Member Posts: 39 Green Ribbon

    Alright! I guess I have kind of fixed it. But, I'm not quite sure. I actually moved the two files startWLS.txt and startWLS.cmd to this path: C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain

    Then, I ran the server-specific script as described in the documentation section on the link below : https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/start/winservice.html

    Here are some screenshots :

    As you can see in the screenshot above, the Windows service that I have created (which is called "base_domain_WLS_FORMS") has been installed. However, when trying to verify that it is configured correctly (by following the "Verifying the Setup" section on this link : https://docs.oracle.com/en/middleware/fusion-middleware/weblogic-server/12.2.1.4/start/winservice.html#GUID-4BC8998A-6EA1-418B-9EA8-CE7CA09910C1), I get the error message below when running this command-line: wlsvcx64 -debug "base_domain_WLS_FORMS"


    'wlsvcx64' is not recognized as an internal or external command, executable program or batch file.


    Any idea how to fix that? Is there any alternative ways to get such verification done?

    One more thing, I still get the same error message, that I have mentioned at the beginning of this thread, when running forms in Form Builder :

    FRM:10142 HTTP listener is not running on localhost on port 9001. Please start the Listener or check the run time preferences.

    Isn't the port value supposed to be 9001 instead of 7001 in my server-specific script? In other words, should this command: set PORT=7001 be replaced by this one: set PORT=9001 ?

  • Michael Ferrante-Oracle
    Michael Ferrante-Oracle Senior Principal Product Manager USMember Posts: 7,208 Employee

    wlsvcx64 lives in C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin. If you have not properly set PATH or navigated to that directory, Windows won't know what to do.

    From the doc:



    Michael Ferrante

    Senior Principal Product Manager

    Oracle

    Twitter: @OracleFormsPM

  • Moslem
    Moslem Member Posts: 39 Green Ribbon

    It is almost done! Yet, I am getting an error message although I have specified the correct service name! 😯

    Here is a screenshot :

    As you know, it is written in the documentation like so : If the script returns an error similar to the following, make sure that you specified the correct service name

    Although, the specified service name was "base_domain_WLS_FORMS" (as you can also see in the screenshot below),

    the command prompt tells me that it is wrong! I really wonder why!

    Any idea?