Hail,
This is a quick note regarding default domain creation in Integrated Weblogic Server.
This is a workaround that helped me and by no means, this is not a best practice.
It is simply another approach and is provided as is. This is for my personal reference and notebook. It happened on a windows machine and frankly no specific answer, on the why this is happening came to mind, but a workaround was possible. I must say, that a lot of things learned during this investigation.
In case you are first trying to run an application from within JDeveloper an you get the following:
-------------------------------------------------------------------------------------------------------------
[Waiting for the domain to finish building...]
[11:56:47 AM] Creating Integrated Weblogic domain...
[11:56:47 AM] ERROR: An error occurred while building the default domain.
Please see this log file for more details:
C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.log
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.
------------------------------------------------------------------------------------------------------------
Before First, remove or rename your created DefaultDomain folder ( under system11.1.2.2.39.61.83.1 folder)
First, open the log file as suggested by JDeveloper
Then, most probably, you will see something like the following:
-----------------------------------------------------------------------------------------------------------
Log File: C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.log
Label: JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1
Product Home: C:\XXXX\Oracle\Middleware\home22\jdeveloper\jdev\
Domain: C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomain
"C:\XXXX\Oracle\Middleware\home22\oracle_common\common\bin\wlst.cmd" "C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.py"
Process started
Elapsed time: 47 ms (<--- that was fast!)
----------------------------------------------------------------------------------------------------------
The CreateDefaultDomain.py script is the one that we have to call. but before doing this, we will edit it a bit..
If you try to run it as is, it is going to complain that you havent set an enviornment variable
Soo, you will simply add it in the created Script. This script is always regenerated when you recreate your system folder. After all it is just one line..
=================================================================
import os
os.putenv('ADRS_DOMAIN_PASSWORD', 'welcome1')
if not 'ADRS_DOMAIN_PASSWORD' in os.environ:
print("Error: ADRS_DOMAIN_PASSWORD environment variable not set.")
exit()
==================================================================
C:\XXXX\Oracle\Middleware\home22\oracle_common\common\bin>wlst.cmd C:\XXXX\JDevSystems\jdev22\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.py
This will create succesfully your DefaultDomain for your integrated Weblogic Domain. Note that the domain is already extended by this script and *some* templates are added.
from the same command line you can navigate to the bin folder of your fresh Domain and start your WebLogic
C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomaim> startWebLogic.cmd
This will start your integrated WebLogic.
you can test the console if you want (after you see the status in RUNNING) ofcourse.
my case: 127.0.0.1:7111/console
The ports might be different or the IPs.. but you get the idea.
What we have accomplished here is that you setup the DefaultDomain for the Integrated Weblogic without using JDeveloper and bypassing the problem of JDeveloper.
Of course we can be happy now! right? Not yet,
we have to check if everything is ok with JDeveloper.
Lets start JDeveloper now.
If you start JDeveloper, things are rather different than expexted..
JDeveloper thinks that DefaultDomain is not updated
This means that not all extensions are applied.. But where? where are those extensions??
The extensions can be found in the following path:
C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomain\config\fmwconfig\adrs-domain-config.xml
If you open that xml file you will see the following:
This is the reason why Integrated Weblogic Server show the above error about domain updates.
If you try to update the domain through JDeveloper (right click update Default Domain), it will try to add the templates, even though the script we executed previously mentioned that everything was ok. The result will still be without success.
But, you can do it manually
This is a quick note regarding default domain creation in Integrated Weblogic Server.
This is a workaround that helped me and by no means, this is not a best practice.
It is simply another approach and is provided as is. This is for my personal reference and notebook. It happened on a windows machine and frankly no specific answer, on the why this is happening came to mind, but a workaround was possible. I must say, that a lot of things learned during this investigation.
In case you are first trying to run an application from within JDeveloper an you get the following:
-------------------------------------------------------------------------------------------------------------
[Waiting for the domain to finish building...]
[11:56:47 AM] Creating Integrated Weblogic domain...
[11:56:47 AM] ERROR: An error occurred while building the default domain.
Please see this log file for more details:
C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.log
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.
------------------------------------------------------------------------------------------------------------
Before First, remove or rename your created DefaultDomain folder ( under system11.1.2.2.39.61.83.1 folder)
First, open the log file as suggested by JDeveloper
Then, most probably, you will see something like the following:
-----------------------------------------------------------------------------------------------------------
Log File: C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.log
Label: JDEVADF_11.1.2.2.0_GENERIC_120418.2212.6183.1
Product Home: C:\XXXX\Oracle\Middleware\home22\jdeveloper\jdev\
Domain: C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomain
"C:\XXXX\Oracle\Middleware\home22\oracle_common\common\bin\wlst.cmd" "C:\XXXXX\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.py"
Process started
Elapsed time: 47 ms (<--- that was fast!)
----------------------------------------------------------------------------------------------------------
The CreateDefaultDomain.py script is the one that we have to call. but before doing this, we will edit it a bit..
If you try to run it as is, it is going to complain that you havent set an enviornment variable
Soo, you will simply add it in the created Script. This script is always regenerated when you recreate your system folder. After all it is just one line..
=================================================================
import os
os.putenv('ADRS_DOMAIN_PASSWORD', 'welcome1')
if not 'ADRS_DOMAIN_PASSWORD' in os.environ:
print("Error: ADRS_DOMAIN_PASSWORD environment variable not set.")
exit()
==================================================================
C:\XXXX\Oracle\Middleware\home22\oracle_common\common\bin>wlst.cmd C:\XXXX\JDevSystems\jdev22\system11.1.2.2.39.61.83.1\o.j2ee.adrs\CreateDefaultDomain.py
This will create succesfully your DefaultDomain for your integrated Weblogic Domain. Note that the domain is already extended by this script and *some* templates are added.
from the same command line you can navigate to the bin folder of your fresh Domain and start your WebLogic
C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomaim> startWebLogic.cmd
This will start your integrated WebLogic.
you can test the console if you want (after you see the status in RUNNING) ofcourse.
my case: 127.0.0.1:7111/console
The ports might be different or the IPs.. but you get the idea.
What we have accomplished here is that you setup the DefaultDomain for the Integrated Weblogic without using JDeveloper and bypassing the problem of JDeveloper.
Of course we can be happy now! right? Not yet,
we have to check if everything is ok with JDeveloper.
Lets start JDeveloper now.
If you start JDeveloper, things are rather different than expexted..
JDeveloper thinks that DefaultDomain is not updated
This means that not all extensions are applied.. But where? where are those extensions??
The extensions can be found in the following path:
C:\XXXXX\system11.1.2.2.39.61.83.1\DefaultDomain\config\fmwconfig\adrs-domain-config.xml
If you open that xml file you will see the following:
This is the reason why Integrated Weblogic Server show the above error about domain updates.
If you try to update the domain through JDeveloper (right click update Default Domain), it will try to add the templates, even though the script we executed previously mentioned that everything was ok. The result will still be without success.
But, you can do it manually
These are the extensions, JDeveloper should have written in the xml file. After that, you should be able to see the integrated WebLogic properly and start and stop it at will.
For those of you that might get an authentication error while starting integratedWeblogicServer, the best approach I could find is to create a new Application Server Connection in JDeveloper pointing to the DefaultDomain. This will give you the flexibility to use the integrated WebLogic without having to install any additional standalone servers. JDeveloper provides a fancy UI for handling operations for integrated Weblogic.. With this workaround, we just managed to get the integrated weblogic started and working.
Again, this is just a workaround and not a solution and is not promoted as such.
Cheers!
We could build new integrated Server after deleting SystemXXXXXXXX files
ReplyDeleteHi,
ReplyDeleteI followed steps mentioned by you (instaling JDev 11.1.1.7 on Win8), and after all, I am getting Authentication error when starting integrated WL.
As you say:
"For those of you that might get an authentication error while starting integratedWeblogicServer, the best approach I could find is to create a new Application Server Connection in JDeveloper pointing to the DefaultDomain."
- What do you mena by "pointing to the DefaultDomain" ?
Not sure what I should to do, can you explain in more details ?
Hi to all,
ReplyDeleteFirst of all, thanks for this workaround. It works super fine for me.
For folk that got an authentication error, here the step I did to make my Integrated Weblogic Server work.
In menu View --> Resource Palette. A new panel shows up. In IDE Connections, you can see Application Server node and you can see IntegratedWeblogicServer.
Right click on IntegratedWeblogicServer and click on propreties.
In Authentication tab, enter your password.
Restart JDeveloper and run Integrated Weblogic server. It should work.
Thanks.
Awesome post! thanks for this workaround!!!
ReplyDelete