Skip to content

DiscoverDomain (online) encountered an unexpected runtime exception. Exception: exceptions.AttributeError #1608

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
RogierEnders opened this issue Jan 14, 2025 · 7 comments

Comments

@RogierEnders
Copy link

I'm trying to generate a model file of an existing online domain but discoverDomain encountered a runtime exception.

The domain has a persistent store of type "JDBCStore" with a target "wls_server1". The store is configured with the property "create tabel from ddl file" with the value "weblogic/store/io/jdbc/ddl/oracle_blob_securefile.ddl".

The discoverdomain script can't handle this situation. When I remove the value of the property "create tabel from ddl file", the script ends normally.

The log file
discoverDomain.log.error.log

A part of the stdout.
####<13 Jan 2025 21:47:58> <get_jdbc_stores> <Discovering 3 JDBC Stores>
####<13 Jan 2025 21:47:58> <get_jdbc_stores>
####<13 Jan 2025 21:48:00> <get_jdbc_stores>
####<13 Jan 2025 21:48:02> <get_jdbc_create_script> <Adding JDBC Store jdbcSafStoreWLS1 create DDL file /u01/app/oracle/domains/dm-poo662-wls-o/weblogic/store/io/jdbc/ddl/oracle_blob_securefile.ddl to archive>
####<13 Jan 2025 21:48:02>

Issue Log for discoverDomain version 4.3.0 running WebLogic version 12.2.1.4.0.220105 in online mode against server using WebLogic version 12.2.1.4.0:

WARNING Messages:

    1. WLSDPLY-06642: Custom Keystore file kss://owsm/keystore at location /Server is a kss type which is not currently supported. The Custom Keystore file will not be added to the archive file. Use export / import to add the file to the target domain
    2. WLSDPLY-06642: Custom Keystore file kss://owsm/truststore at location /Server is a kss type which is not currently supported. The Custom Keystore file will not be added to the archive file. Use export / import to add the file to the target domain
    3. WLSDPLY-06642: Custom Keystore file kss://owsm/keystore at location /Server/NetworkAccessPoint is a kss type which is not currently supported. The Custom Keystore file will not be added to the archive file. Use export / import to add the file to the target domain
    4. WLSDPLY-06642: Custom Keystore file kss://owsm/keystore at location /Server/NetworkAccessPoint is a kss type which is not currently supported. The Custom Keystore file will not be added to the archive file. Use export / import to add the file to the target domain
    5. WLSDPLY-06642: Custom Keystore file kss://owsm/keystore at location /Server/NetworkAccessPoint is a kss type which is not currently supported. The Custom Keystore file will not be added to the archive file. Use export / import to add the file to the target domain
    6. WLSDPLY-06140: Unable to cd to the expected path /SecurityConfiguration/dm-poo662-wls-o/Realms/myrealm/AuthenticationProviders/Trust Service Identity Asserter constructed from location context model_folders = ['SecurityConfiguration', 'Realm', 'AuthenticationProvider', 'TrustServiceIdentityAsserter'],  'name_tokens' = {'REALM': 'myrealm','SECURITYCONFIGURATION': 'dm-poo662-wls-o','DOMAIN': 'dm-poo662-wls-o','PROVIDER': 'Trust Service Identity Asserter','SECUREMODE': 'dm-poo662-wls-o'}; the current folder and its sub-folders cannot be discovered: cd(/SecurityConfiguration/dm-poo662-wls-o/Realms/myrealm/AuthenticationProviders/Trust Service Identity Asserter) in online mode failed: Error occurred while performing cd : Error while browsing MBeans : java.lang.ClassNotFoundException: oracle.security.jps.wls.providers.trust.TrustServiceIdentityAsserterMBean 

Use dumpStack() to view the full stacktrace :

SEVERE Messages:

    1. WLSDPLY-20035: discoverDomain encountered an unexpected runtime exception.  Please file an issue on GitHub and attach the log file and stdout. Exception: exceptions.AttributeError

Total: SEVERE : 1 WARNING : 6

Remote discovery created a model that references files or directories on the remote machine that could not be collected. Please collect the items at the paths listed below and add them to the archive file at the specified locations.

TODO Messages:

    1. WLSDPLY-06042: Please create the FILE_STORE in the archive file at wlsdeploy/stores/UMSJMSFileStore.
    2. WLSDPLY-06042: Please create the FILE_STORE in the archive file at wlsdeploy/stores/mds-owsm.

discoverDomain.sh failed (exit code = 2)

@robertpatrick
Copy link
Member

@RogierEnders Please provide the complete stdout and complete log file of the discoverDomain tool invocation. If you are uncomfortable sharing them on GitHub, please file an SR with Oracle Support.

@RogierEnders
Copy link
Author

@robertpatrick Hereby the requested files.

discoverDomain-stdout.txt

discoverDomain.log

@robertpatrick
Copy link
Member

@RogierEnders thanks. I am working on the fix for:

AttributeError: 'NoneType' object has no attribute 'addScript'
Traceback (most recent call last):
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/wlsdeploy/util/tool_main.py", line 78, in run_tool
    exit_code = main(model_context_obj)
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/discover.py", line 808, in main
    model = __discover(model_context, aliases, credential_injector, helper, extra_tokens)
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/discover.py", line 429, in __discover
    aliases=aliases, credential_injector=credential_injector).discover()
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/wlsdeploy/tool/discover/resources_discoverer.py", line 41, in discover
    self._aliases, self._credential_injector).discover()
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/wlsdeploy/tool/discover/common_resources_discoverer.py", line 64, in discover
    model_folder_name, folder_result = self.get_jdbc_stores()
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/wlsdeploy/tool/discover/common_resources_discoverer.py", line 398, in get_jdbc_stores
    self.archive_jdbc_create_script(jdbc_store, result[jdbc_store])
  File "/Users/isc30169/Workspace/weblogic-deploy/lib/python/wlsdeploy/tool/discover/common_resources_discoverer.py", line 421, in archive_jdbc_create_script
    new_source_name = archive_file.addScript(file_name)
AttributeError: 'NoneType' object has no attribute 'addScript'

>

However, you have a bigger issue in that JDK 17 is not compatible with WLS 12.2.1.4. Please drop back to JDK 8. Hopefully, this will clean up issues like:

####<13 Jan 2025 20:54:43> <SEVERE> <Injector> <<clinit>> <null>
####<13 Jan 2025 20:54:43> <SEVERE> <OptionsParser> <<init>> <> <OptionsParserjava.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is null>
com.oracle.cie.nextgen.common.inputs.impl.InputHandlerException: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is null
	at com.oracle.cie.nextgen.common.inputs.parser.OptionsParser.getOptionsInfoDao(OptionsParser.java:550)
	at com.oracle.cie.nextgen.common.inputs.parser.OptionsParser.parseOptionsDao(OptionsParser.java:219)
	at com.oracle.cie.nextgen.common.inputs.parser.OptionsParser.<init>(OptionsParser.java:142)
	at com.oracle.cie.nextgen.common.inputs.parser.OptionsParser.getInstance(OptionsParser.java:129)
	at com.oracle.cie.nextgen.common.inputs.impl.OUIOptions.<init>(OUIOptions.java:59)
	at com.oracle.cie.nextgen.common.inputs.impl.InputsImpl.<init>(InputsImpl.java:53)
	at com.oracle.cie.nextgen.common.inputs.impl.InputsImpl.getInstance(InputsImpl.java:60)
	at com.oracle.cie.nextgen.common.inputs.helpers.InputHandler.getInputs(InputHandler.java:41)
	at com.oracle.cie.gdr.external.impl.OracleHomeInventoryFactory.createInventory(OracleHomeInventoryFactory.java:55)
	at com.oracle.cie.gdr.external.InventoryFactory.getOracleHomeInventory(InventoryFactory.java:99)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.oracle.cie.common.ReflectionHelper.process(ReflectionHelper.java:48)
	at com.oracle.cie.domain.env.EnvironmentServiceImpl.init(EnvironmentServiceImpl.java:384)
	at com.oracle.cie.domain.env.EnvironmentServiceImpl.<init>(EnvironmentServiceImpl.java:89)
	at com.oracle.cie.domain.env.EnvironmentServiceImpl.getInstance(EnvironmentServiceImpl.java:364)
	at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:35)
	at com.oracle.cie.domain.env.EnvironmentServiceFactory.getEnvironmentService(EnvironmentServiceFactory.java:72)
	at com.oracle.cie.domain.script.jython.WLScriptContext.init(WLScriptContext.java:306)
	at com.oracle.cie.domain.script.jython.WLScriptContext.setup(WLScriptContext.java:273)
	at com.oracle.cie.domain.script.jython.WLST_offline.setupContext(WLST_offline.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at weblogic.management.scripting.utils.WLSTUtil.initOfflineContext(WLSTUtil.java:514)
	at weblogic.management.scripting.utils.WLSTUtil.setupOfflineInternal(WLSTUtil.java:488)
	at weblogic.management.scripting.utils.WLSTUtil.setupOffline(WLSTUtil.java:361)
	at weblogic.management.scripting.utils.WLSTUtilWrapper.setupOffline(WLSTUtilWrapper.java:29)
	at weblogic.management.scripting.utils.WLSTInterpreter.<init>(WLSTInterpreter.java:250)
	at weblogic.management.scripting.WLST.main(WLST.java:134)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at weblogic.WLST.main(WLST.java:47)
Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.invoke(Object, Object[])" because "com.sun.xml.bind.v2.runtime.reflect.opt.Injector.defineClass" is null
	at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:311)
	at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:97)
	at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:87)
	at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:179)
	at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:285)
	at com.sun.xml.bind.v2.runtime.property.ArrayProperty.<init>(ArrayProperty.java:68)
	at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.<init>(ArrayERProperty.java:88)
	at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:100)
	at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:62)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
	at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:514)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:331)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:139)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1156)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:165)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:290)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:280)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:380)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:680)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:624)
	at com.oracle.cie.common.dao.jaxb.JaxbDataHandlerSpiImpl.getUnmarshaller(JaxbDataHandlerSpiImpl.java:340)
	at com.oracle.cie.common.dao.jaxb.JaxbDataHandlerSpiImpl.create(JaxbDataHandlerSpiImpl.java:154)
	at com.oracle.cie.gdr.helpers.DaoHelper.parse(DaoHelper.java:224)
	at com.oracle.cie.gdr.helpers.DaoHelper.getRootWrapper(DaoHelper.java:693)
	at com.oracle.cie.nextgen.common.inputs.parser.OptionsParser.getOptionsInfoDao(OptionsParser.java:546)
	... 37 more

@RogierEnders
Copy link
Author

Thanks, I'm currently performing a discover with 1.8.0_391 and so far no stacktraces :-)

@robertpatrick
Copy link
Member

robertpatrick commented Jan 14, 2025

@RogierEnders Another minor issue is that you are invoking discoverDomain.sh with both -skip_archive and -remote. Clearly, the code currently allows this but it really shouldn't--they should be mutually exclusive as they handle the no archive file scenario differently, as documented in paragraph 4 of the Discover Domain Tool docs. My current plan is to put logic into the tool startup to fail the tool if both options are specified. Thoughts?

@RogierEnders
Copy link
Author

Good to point that out. I was trying if I didn't get the error with -skip_archive but that obvious didn't solve it. When I turned back tot -remote I forgot the remove the other one.

Failing to start the domain discovery looks like a good plan.

@robertpatrick
Copy link
Member

Fixed in release 4.3.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

2 participants