Skip to content

str or unicode required for replace when discovering WLS 12.1.3 domain #1466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anatoliatanasov opened this issue Jun 14, 2023 · 6 comments
Closed
Assignees

Comments

@anatoliatanasov
Copy link

anatoliatanasov commented Jun 14, 2023

Hi there,

Just downloaded the latest version of the WLDT tool and tried to run it against offline (shutdown) domain of version 12.1.3. The command I use is

./bin/discoverDomain.sh -oracle_home /opt/Applications/Oracle/soa_studio_1213 -remote -skip_archive -model_file ./model.yaml -domain_home /opt/Applications/Oracle/soa_studio_1213/user_projects/domains/base_domain

where at /opt/Applications/Oracle/soa_studio_1213 I have installed Oracle SOA Suite Studio 12.1.3 (JDeveloper) plus the integrated WLS.

The outcome of the command above is:

JDK version is 1.8.0_301-b09
JAVA_HOME = /opt/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home
WLST_EXT_CLASSPATH = /opt/Applications/Oracle/weblogic-deploy/lib/weblogic-deploy-core.jar
CLASSPATH = /opt/Applications/Oracle/weblogic-deploy/lib/weblogic-deploy-core.jar
WLST_PROPERTIES = -Dcom.oracle.cie.script.throwException=true -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig 
/opt/Applications/Oracle/soa_studio_1213/oracle_common/common/bin/wlst.sh /opt/Applications/Oracle/weblogic-deploy/lib/python/discover.py -oracle_home /opt/Applications/Oracle/soa_studio_1213 -remote -skip_archive -model_file ./model.yaml -domain_home /opt/Applications/Oracle/soa_studio_1213/user_projects/domains/base_domain

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

####<Jun 14, 2023 2:43:03 PM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling discoverDomain version is 3.2.0:.3f64264:May 11, 2023 00:30 UTC>
####<Jun 14, 2023 2:43:03 PM> <INFO> <WLSDeployLoggingConfig> <logLoggingDirectory> <WLSDPLY-01755> <The discoverDomain program will write its log to directory /opt/Applications/Oracle/weblogic-deploy/logs>
Problem invoking WLST - Traceback (innermost last):
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/discover.py", line 632, in ?
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/util/tool_main.py", line 49, in run_tool
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/tool/util/model_context_helper.py", line 37, in create_exit_context
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/tool/util/model_context_helper.py", line 25, in create_context
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/tool/create/domain_typedef.py", line 119, in set_model_context
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/tool/create/domain_typedef.py", line 303, in _DomainTypedef__resolve_paths
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/util/model_context.py", line 892, in replace_token_string
  File "/opt/Applications/Oracle/weblogic-deploy/lib/python/wlsdeploy/util/model_context.py", line 976, in _replace
TypeError: str or unicode required for replace


discoverDomain.sh completed but with some issues (exit code = 1)

The same error crops up in case the tool is executed against WLS 10.3.6 domain.

  1. Are there any WLS versions related limitations of the tool?
  2. Do I have to specify any additional CLI args in case running the discovery against older versions of WLS?

Thanks and regards,
A.

@rakillen rakillen self-assigned this Jun 14, 2023
@anatoliatanasov
Copy link
Author

The issue is resolved by modifying the ${WLDT_HOME}/lib/typedefs/WLS.json file.
The WLS_12CR1 object's baseTemplate attribute is changed to "Basic WebLogic Server Domain", e.g.:

{
    "copyright": "Copyright (c) 2017, 2019, Oracle Corporation and/or its affiliates.  All rights reserved.",
    "license": "Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl",
    "name": "WLS",
    "description": "WLS type domain definitions",
    "versions": {
        "10.3.6": "WLS_11G",
        "12.1.1": "WLS_11G",
        "12.1.2": "WLS_12CR1",
        "12.1.3": "WLS_12CR1",
        "12.2.1": "WLS_12CR2",
        "12.2.1.3": "WLS_12CR2",
        "12.2.1.4": "WLS_12CR2",
        "14.1":     "WLS_14"
    },
    "definitions": {
        "WLS_11G": {
            "baseTemplate": "@@WL_HOME@@/common/templates/domains/wls.jar",
            "extensionTemplates": [ ],
            "customExtensionTemplates": [ ],
            "serverGroupsToTarget": [ ],
            "rcuSchemas": [ ]
        },
        "WLS_12CR1": {
            "baseTemplate": "Basic WebLogic Server Domain",
            "extensionTemplates": [ ],
            "customExtensionTemplates": [ ],
            "serverGroupsToTarget": [ ],
            "rcuSchemas": [ ]
        },
        "WLS_12CR2": {
            "baseTemplate": "Basic WebLogic Server Domain",
            "extensionTemplates": [ ],
            "customExtensionTemplates": [ ],
            "serverGroupsToTarget": [ ],
            "rcuSchemas": [ ]
        },
        "WLS_14": {
            "baseTemplate": "Basic WebLogic Server Domain",
            "extensionTemplates": [ ],
            "customExtensionTemplates": [ ],
            "serverGroupsToTarget": [ ],
            "rcuSchemas": [ ]
        }
    }
}

@anatoliatanasov
Copy link
Author

Reopening after seeing that someone took the assignment.

@robertpatrick
Copy link
Member

There is a fundamental problem here we will fix. Your change to the WLS typedef is working around the problem but will break the typedef if used for createDomain.

@anatoliatanasov
Copy link
Author

Do you need any details from my side?

@robertpatrick
Copy link
Member

No, this is easily reproduced

robertpatrick added a commit that referenced this issue Jun 15, 2023
Ensure that WL_HOME token can be resolved for exit model context typedef

See merge request weblogic-cloud/weblogic-deploy-tooling!1468
@robertpatrick
Copy link
Member

Fixed in release 3.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants