oracle/weblogic-deploy-tooling

Definition of JMSServer uses a defined FileStore as the PersistentStore: WLSDPLY-12410: createDomain failed to deploy the resources and applications to the domain

HumaMilisic opened this issue · 2 comments

I am converting an existing Dockerfile and it's scripts.

The script chunk

FILE_STORE_NAME = "tntJmsFileStore"
FILE_STORE_PATH = "/u01/domains/base_domain/FileStore"

JMS_SERVER_NAME="tntJmsServer"

def defineJmsServer():
    print 'Creating JMS Server....'
    startEdit()
    cd('/')

    cmo.createJMSServer(JMS_SERVER_NAME)
    Thread.sleep(10)
    cd('/JMSServers/'+JMS_SERVER_NAME)
    cmo.setPersistentStore(getMBean('/FileStores/' + FILE_STORE_NAME))
    set('Targets',jarray.array([ObjectName('com.bea:Name='+adminServerName+',Type=Server')], ObjectName))
    print 'JMS Server %s created.' % JMS_SERVER_NAME

    activate()
	
def defineFileStore():
    print 'Creating JMS FileStore....'

    cd('/')
    startEdit()
    cmo.createFileStore(FILE_STORE_NAME)
    Thread.sleep(10)
    cd('/FileStores/'+FILE_STORE_NAME)
    cmo.setDirectory(FILE_STORE_PATH)
    set('Targets',jarray.array([ObjectName('com.bea:Name='+adminServerName+',Type=Server')], ObjectName))
    print 'JMS FileStore %s created.' % FILE_STORE_NAME

    activate()
	
# JMS configuration
defineFileStore()
defineJmsServer()

Model minDomain.yaml:

domainInfo:
  AdminUserName: 'test'
  AdminPassword: 'test1test1test1test1'
topology:
  AdminServerName: 'server001'
  Name: server
  Server:
    'server001':
      ListenPort: 7001
resources:
  FileStore:
    'tntJmsFileStore':
      Target: server001
      Directory: /u01/domains/base_domain/FileStore
  JMSServer:
    'tntJmsServer':
      Target: server001
      PersistentStore: /u01/domains/base_domain/FileStore # not ready on time?
./imagetool/bin/imagetool.sh create --tag test/wls:latest --jdkVersion=8u381 --version=12.2.1.4.0 --wdtModel=/tmp/wls/minDomain.yaml 

The log:

#21 [wdt_build 6/6] RUN cd /u01/wdt/weblogic-deploy/bin     &&  ./createDomain.sh     -oracle_home /u01/oracle     -domain_home /u01/domains/base_domain     -domain_type WLS      -model_file /u01/wdt/models/minDomain.yaml
#21 16.97 Welcome to WebLogic Server Administration Scripting Shell
#21 16.97 Type help() for help on available commands
#21 18.24 ####<Sep 28, 2023 8:33:16 AM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling createDomain version is 3.2.2:.562dcb0:Jul 21, 2023 15:28 UTC>
#21 18.24 ####<Sep 28, 2023 8:33:16 AM> <INFO> <WLSDeployLoggingConfig> <logLoggingDirectory> <WLSDPLY-01755> <The createDomain program will write its log to directory /u01/wdt/weblogic-deploy/logs>
#21 18.32 ####<Sep 28, 2023 8:33:16 AM> <INFO> <ModelContext> <__copy_from_args> <WLSDPLY-01050> <WebLogic version for aliases is 12.2.1.4.0>
#21 18.37 ####<Sep 28, 2023 8:33:16 AM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20017> <No filter configuration file /u01/wdt/weblogic-deploy/lib/model_filters.json>
#21 18.37 ####<Sep 28, 2023 8:33:16 AM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20016> <No filters of type create found in filter configuration file /u01/wdt/weblogic-deploy/lib/model_filters.json>
#21 18.67 ####<Sep 28, 2023 8:33:17 AM> <INFO> <DomainCreator> <__create_domain> <WLSDPLY-12203> <Creating domain of type WLS>
#21 18.67 ####<Sep 28, 2023 8:33:17 AM> <INFO> <DomainCreator> <__create_base_domain_with_select_template> <WLSDPLY-12210> <Selecting base template named Basic WebLogic Server Domain>
#21 19.41 ####<Sep 28, 2023 8:33:17 AM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12212> <Loading selected templates>
#21 22.19 ####<Sep 28, 2023 8:33:20 AM> <INFO> <DomainCreator> <__set_domain_name> <WLSDPLY-12227> <Changing domain name from base_domain to server>
#21 22.49 ####<Sep 28, 2023 8:33:20 AM> <INFO> <DomainCreator> <__set_admin_server_name> <WLSDPLY-12229> <Changing the administration server name from AdminServer to server001>
#21 22.70 ####<Sep 28, 2023 8:33:21 AM> <INFO> <Creator> <_create_named_mbeans> <WLSDPLY-12101> <Updating Server with the name server001>
#21 22.76 ####<Sep 28, 2023 8:33:21 AM> <INFO> <Creator> <_create_named_mbeans> <WLSDPLY-12101> <Updating Server with the name server001>
#21 22.79 ####<Sep 28, 2023 8:33:21 AM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12205> <Writing base domain server to directory /u01/domains/base_domain>
#21 25.03 ####<Sep 28, 2023 8:33:23 AM> <INFO> <DomainCreator> <__extend_domain_with_select_template> <WLSDPLY-12206> <Closing templates for domain server>
#21 25.16 ####<Sep 28, 2023 8:33:23 AM> <INFO> <DefaultAuthenticatorHelper> <create_default_init_file> <WLSDPLY-01900> <Append to default authenticator initialization file /u01/domains/base_domain/security/DefaultAuthenticatorInit.ldift>
#21 25.16 ####<Sep 28, 2023 8:33:23 AM> <INFO> <LibraryHelper> <install_domain_libraries> <WLSDPLY-12213> <The model did not specify any domain libraries to install>
#21 25.16 ####<Sep 28, 2023 8:33:23 AM> <INFO> <LibraryHelper> <extract_classpath_libraries> <WLSDPLY-12216> <The archive file was not provided so there are no classpath libraries to extract>
#21 25.16 ####<Sep 28, 2023 8:33:23 AM> <INFO> <LibraryHelper> <extract_custom_files> <WLSDPLY-12565> <The archive file was not provided so there are no custom files to extract>
#21 25.16 ####<Sep 28, 2023 8:33:23 AM> <INFO> <LibraryHelper> <install_domain_scripts> <WLSDPLY-12241> <The model did not specify any domain scripts to install>
#21 25.31 ####<Sep 28, 2023 8:33:23 AM> <INFO> <CommonResourcesDeployer> <_add_named_elements> <WLSDPLY-09605> <Adding FileStore tntJmsFileStore>
#21 25.35 ####<Sep 28, 2023 8:33:23 AM> <INFO> <CommonResourcesDeployer> <_add_named_elements> <WLSDPLY-09605> <Adding JMSServer tntJmsServer>
#21 25.43 ####<Sep 28, 2023 8:33:23 AM> <SEVERE> <create> <main> <WLSDPLY-12410> <createDomain failed to deploy the resources and applications to the domain: PersistentStore /u01/domains/base_domain/FileStore not found in domain or resource group>
#21 25.43 Issue Log for createDomain version 3.2.2 running WebLogic version 12.2.1.4.0 offline mode:
#21 25.43 SEVERE Messages:
#21 25.43         1. WLSDPLY-12410: createDomain failed to deploy the resources and applications to the domain: PersistentStore /u01/domains/base_domain/FileStore not found in domain or resource group
#21 25.43 Total:   SEVERE :    1  WARNING :    0
#21 25.54 createDomain.sh failed (exit code = 2)
#21 ERROR: process "/bin/sh -c cd /u01/wdt/weblogic-deploy/bin     &&  ./createDomain.sh     -oracle_home /u01/oracle     -domain_home /u01/domains/base_domain     -domain_type WLS      -model_file /u01/wdt/models/minDomain.yaml" did not complete successfully: exit code: 2
------
 > [wdt_build 6/6] RUN cd /u01/wdt/weblogic-deploy/bin     &&  ./createDomain.sh     -oracle_home /u01/oracle     -domain_home /u01/domains/base_domain     -domain_type WLS      -model_file /u01/wdt/models/minDomain.yaml:
#21 25.43 Issue Log for createDomain version 3.2.2 running WebLogic version 12.2.1.4.0 offline mode:
#21 25.43 SEVERE Messages:
#21 25.43         1. WLSDPLY-12410: createDomain failed to deploy the resources and applications to the domain: PersistentStore /u01/domains/base_domain/FileStore not found in domain or resource group
#21 25.43 Total:   SEVERE :    1  WARNING :    0
#21 25.54 createDomain.sh failed (exit code = 2)

Model that defines a JMSServer without PersistentStore passes createDomain.sh

Bug?

In minDomain.yaml file, the PersistentStore should point to the FileStore you defined. Try this:

resources:
  FileStore:
    'tntJmsFileStore':
      Target: server001
      Directory: /u01/domains/base_domain/FileStore
  JMSServer:
    'tntJmsServer':
      Target: server001
      PersistentStore: 'tntJmsFileStore'

Brilliant, that solved it.
Thank you