Cargo fails to create domain on Weblogic 12.2.1.4

620 views
Skip to first unread message

Kasper Maylann

unread,
May 14, 2020, 6:11:43 PM5/14/20
to Codehaus Cargo
Hi

I am using the cargo-maven2-plugin version 1.7.12. I am trying to upgrade my weblogic version from 12.2.1.2 to 12.2.1.4, but when doing so cargo fails to create the weblogic domain with the following error:

com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.jython.WLSTException: com/oracle/cie/domain/xml/configxb/AuthenticatorType


I see a fix has been made here in cargo version 1.6.7 for weblogic 12.2.1.3: https://codehaus-cargo.atlassian.net/browse/CARGO-1452?focusedCommentId=20538&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel, (commit: https://github.com/codehaus-cargo/cargo/commit/7b6a57ce485495a4108187b3d408965e9c662862). The problem in 12.2.1.4 seems too be the same kind but it doesn't have that version but instead oracle_common/modules/com.oracle.cie.config-wls-schema_8.7.0.0.jar.

I have reported the issue to Oracle. Meanwhile I have moved on by putting oracle_common/modules/com.oracle.cie.config-wls-schema_8.7.0.0.jar on classpath myself, but I am still not able to create the domain. 
When I run the mvn cargo:run it now fails with this error:

[INFO] [talledLocalContainer] Problem invoking WLST - Traceback (innermost last):
[INFO] [talledLocalContainer]   File "C:\Users\KMP\AppData\Local\Temp\wlst4830167464557862809.py", line 111, in ?
[INFO] [talledLocalContainer] AttributeError: 'NoneType' object has no attribute 'setMinPasswordLength'
[INFO] [talledLocalContainer]

debugging some more and I found that this part of the generated python script all fail (all 3 setters) because I guess the cmo is null/None:

# Configure password validator
cd('/SecurityConfiguration/base_domain/Realms/myrealm/PasswordValidators/SystemPasswordValidator')
cmo.setMinPasswordLength(8)
cmo.setMinNumericOrSpecialCharacters(1)

cd('/SecurityConfiguration/base_domain/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.setMinimumPasswordLength(8)


Removing this part of the script and running the script manually succeeds the domain creation. I'm not into the Weblogic details what this SecurityConfiguration/.. stuff is for  and if it is needed. Maybe it has been removed from the Weblogic 12.2.1.4 version, I don't know.
Any tips on this issue are very welcome. 

Best regards
Kasper

S. Ali Tokmen

unread,
May 15, 2020, 1:38:08 AM5/15/20
to codehau...@googlegroups.com

Hi Kasper

This is an interesting issue:

  • With Codehaus Cargo version 1.7.2, the logic is to look for a file with a name starting with com.oracle.cie.config-wls-schema, independent of the version. So, what you've done manually shouldn't have been necessary.
  • And, I didn't know about the new WebLogic 12.2 "patch" version doing such changes and removing certain configuration properties...

Could you try with the weblogic14x container and see if that works?

Regards

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/49b33b25-6907-4aff-9446-02ca03862605%40googlegroups.com.

S. Ali Tokmen

unread,
May 15, 2020, 9:54:27 AM5/15/20
to codehau...@googlegroups.com

Hi Kasper

I downloaded WebLogic 12.2.1.4 and installed on my Windows 10 VM - And indeed, I could replicate your issue!

This should be fixed now (ref. https://codehaus-cargo.atlassian.net/browse/CARGO-1517 and https://github.com/codehaus-cargo/cargo/commit/504dba2a4ff1a3f1fc8d08fae3b22d8116826cc8), can you please give a try with the Codehaus Caego 1.7.3-SNAPSHOT build? You can either build it yourself as described in https://codehaus-cargo.github.io/cargo/Building.html or use https://codehaus-cargo.github.io/cargo/Maven2+Plugin+Installation.html#Maven2PluginInstallation-snapshots.

S. Ali Tokmen

unread,
May 15, 2020, 11:01:06 AM5/15/20
to codehau...@googlegroups.com

Hi Kasper

I'm sorry, I noticed you use an old version; you need to try either:

  • Codehaus Cargo 1.7.12 with the weblogic14x container
    ... or
  • Codehaus Cargo 1.7.13-SNAPSHOT

Kasper Maylann

unread,
May 18, 2020, 10:02:26 AM5/18/20
to Codehaus Cargo
Hi Ali

Wow, thanks for your really fast reply and fix to my issue!
So you are right, for some reason I hadn't noticed the 1.7.12, I only max upgraded to the 1.7.11 version.
Anyway I have tested it on version 17.1.12 with the weblogic14x container and the domain now gets created, yay! But I have a runtime issue. I will get back to that.

I also tested your 1.7.13-SNAPSHOT with the weblogic122x container, which also works and gets my application up and running, but I get the same runtime error as I mentioned on the weblogic14x container.

I also tested the same cargo configuration with (version 1.7.13-SNAPSHOT and container weblogic122x) but on weblogic version 12.2.1.2 and here I don't get this error.

So the runtime error I experience on cargo version 1.7.13-SNAPSHOT + weblogic122x + weblogic version 12.2.1.4 is related to the dependencies I have added to my cargo container configuration. I can see when I'm running with -X that they are put on classpath:

[DEBUG] [talledLocalContainer] Execute:Java13CommandLauncher: Executing 'C:\Program Files\Java\jdk1.8.0_251\jre\bin\java.exe' with arguments:
'-Xmx521m'
'-classpath'
'C:\tools\apache\maven\m2repository\com\h2database\h2\1.4.200\h2-1.4.200.jar;C:\tools\apache\maven\m2repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\tools\apache\maven\m2repository\dk\nykredit\nic\nic-system\1.6.11\nic-system-1.6.11.jar;C:\tools\oracle\weblogic\12.2.1.4_200228\wlserver\server\lib\weblogic.jar;C:\tools\oracle\weblogic\12.2.1.4_200228\oracle_common\modules\com.oracle.cie.config-wls-schema_8.7.0.0.jar' 'weblogic.WLST'
'C:\Users\KMP\AppData\Local\Temp\wlst6045164363581056426.py'

So log4j is added to the dependencies part of the cargo container and put on classpath when starting u the container, but when I invoke my application I get these errors:

[INFO] [talledLocalContainer] javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
[INFO] [talledLocalContainer]   at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:102)
[INFO] [talledLocalContainer]   at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:87)
[INFO] [talledLocalContainer]   at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
[INFO] [talledLocalContainer]   at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:57)
[INFO] [talledLocalContainer]   at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:31)
[INFO] [talledLocalContainer]   Truncated. see log file for complete stacktrace
[INFO] [talledLocalContainer] Caused By: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
[INFO] [talledLocalContainer]   at dk.nykredit.nic.system.wls.PortalProtectAuthFilter.<clinit>(PortalProtectAuthFilter.java:21)
[INFO] [talledLocalContainer]   at java.lang.Class.forName0(Native Method)
[INFO] [talledLocalContainer]   at java.lang.Class.forName(Class.java:348)
[INFO] [talledLocalContainer]   at com.oracle.injection.provider.weld.WeldBeanManager.newBeanInstance(WeldBeanManager.java:92)
[INFO] [talledLocalContainer]   at com.oracle.injection.integration.utils.InjectionBeanCreator.newBeanInstance(InjectionBeanCreator.java:127)
[INFO] [talledLocalContainer]   Truncated. see log file for complete stacktrace
[INFO] [talledLocalContainer] Caused By: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
[INFO] [talledLocalContainer]   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
[INFO] [talledLocalContainer]   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
[INFO] [talledLocalContainer]   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
[INFO] [talledLocalContainer]   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
[INFO] [talledLocalContainer]   at dk.nykredit.nic.system.wls.PortalProtectAuthFilter.<clinit>(PortalProtectAuthFilter.java:21)


Any ideas?


Best regards 
Kasper
To unsubscribe from this group and stop receiving emails from it, send an email to codehau...@googlegroups.com.

S. Ali Tokmen

unread,
May 18, 2020, 2:52:20 PM5/18/20
to codehau...@googlegroups.com

Hi Kasper

Good news! Thanks for the feedback.

I think the error you are facing is because you need log4j but it's not packaged with your application.

Can you add it as a dependency to your WAR? It would then be part of it and work.

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/1ff65873-13d1-40a1-97a3-94fd2ef1ea6f%40googlegroups.com.

Kasper Maylann

unread,
May 19, 2020, 12:44:23 AM5/19/20
to Codehaus Cargo
Yes log4j is not part of my war. And that is intentionally, because we have a log4j jar already on our production weblogic servers along with some other jars like C:\tools\apache\maven\m2repository\dk\nykredit\nic\nic-system\1.6.11\nic-system-1.6.11.jar which you also see in the classpath of my last post. So I don't want to pack the log4j version or the nic-system version to my jar as they are provided by my application server.
This usually works with this cargo configuration, but it doesn't on the latest weblogic version and I am not sure why... 
Hope this makes sence. Or maybe my cargo config clarifies it:

<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>${org.codehaus.cargo.version}</version>
<configuration>
<skip>${skipTests}</skip>
<container>
<containerId>wildfly10x</containerId>
<home>${WILDFLY_HOME}</home>
<systemProperties>
<config>${project.build.directory}/generated-sources/config/local</config>
<log4j.configuration>file:${project.basedir}/src/test/resources/log4j.xml</log4j.configuration>
</systemProperties>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>dk.nykredit.nic</groupId>
<artifactId>nic-system</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
</container>
<configuration>
<properties>
<cargo.servlet.port>7001</cargo.servlet.port>
<cargo.servlet.users>admin:passw0rd:ADMIN</cargo.servlet.users>
<cargo.start.jvmargs>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9005</cargo.start.jvmargs>
<cargo.datasource.datasource.rs-helloword>
cargo.datasource.id=rs-helloword.database|
cargo.datasource.jndi=rs-helloword|
cargo.datasource.driver=org.h2.jdbcx.JdbcDataSource|
cargo.datasource.type=javax.sql.XADataSource|
cargo.datasource.url=jdbc:h2:file:./rs-helloword;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MODE=Oracle|
cargo.datasource.username=sa|
cargo.datasource.password=sa|
cargo.datasource.properties=URL=jdbc:h2:file:./rs-helloword\;DB_CLOSE_DELAY=-1\;DB_CLOSE_ON_EXIT=FALSE\;MODE=Oracle|
cargo.datasource.transactionsupport=XA_TRANSACTION
</cargo.datasource.datasource.rs-helloword>
</properties>
</configuration>
<deployables>
<deployable>
<pingUrlPath>http://localhost:7001/helloworld/ping</pingUrlPath>
</deployable>
<deployable>
<groupId>dk.nykredit.security</groupId>
<artifactId>stub-services</artifactId>
<type>war</type>
<properties>
<context>/security</context>
</properties>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>it.start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>it.stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>

<profiles>
<profile>
<id>wildfly</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>wildfly10x</containerId>
<home>${WILDFLY_HOME}</home>
</container>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>weblogic</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>weblogic122x</containerId>
<home>${WL_HOME}</home>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>dk.nykredit.nic</groupId>
<artifactId>nic-system</artifactId>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
</container>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

Regards
Kasper

S. Ali Tokmen

unread,
May 19, 2020, 10:03:37 AM5/19/20
to codehau...@googlegroups.com

Hi Kasper

Thanks for these details - That is bizarre, as what you do is very similar to https://github.com/codehaus-cargo/cargo/blob/master/extensions/maven2/samples/weblogic-test/pom.xml and these tests pass flawlessly.

Can you check in your WebLogic server log if the JAR is added to the classpath? You should have something similar to the below:

file:///Users/alitokmen/Downloads/Screenshot%202020-05-19%20at%2015.58.55.png

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/c7c5fc3d-6330-4bab-bc2c-a10a4c4407aa%40googlegroups.com.

Kasper Maylann

unread,
May 19, 2020, 3:51:33 PM5/19/20
to Codehaus Cargo
Yes, that should be the same thing as in your test. 
And the server.log says that it should have been added to classpath:

serverlogPNG.PNG



But the server is not failing to start up. I just see these errors in the log once I invoke my REST resource.

/Kasper

S. Ali Tokmen

unread,
May 19, 2020, 4:08:19 PM5/19/20
to codehau...@googlegroups.com

Hi Kasper

Thank you for your reply.

I have the impression there is something specific about log4j, as it seems to already be present in the WebLogic libraries:

Perhaps, removing it from the container classpath in Cargo could "magically" resolve the issue as well.

Would you mind asking Oracle about how to use log4j in your application?

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/48a03760-eb6f-426f-ae3b-aaab8a1551b9%40googlegroups.com.

Kasper Maylann

unread,
May 19, 2020, 5:47:48 PM5/19/20
to Codehaus Cargo
It is not only the log4j dependency. Also the nic-system, which you could see in my cargo configuration, results in a NoClassDefFoundError:

####<18-May-2020 23:37:42,325 o'clock CEST> <Error> <HTTP> <BRAVEHEART-KMP> <server> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <b361ae6f-5c2b-4ac4-acd5-19a4253f0671-00000015> <1589837862325> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-101226> <AuthFilter: dk.nykredit.nic.system.wls.PortalProtectAuthFilter invocation failed in: post-auth phase for URI: /apaas-db/apaas/db/meshes
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class dk.nykredit.nic.system.wls.PortalProtectAuthFilter
at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:102)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:87)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:57)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:31)
at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:676)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:615)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:417)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:307)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:250)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:639)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:508)
at weblogic.servlet.security.internal.WebAppSecurity$AuthFilterAction.run(WebAppSecurity.java:1127)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.security.internal.WebAppSecurity.invokePostAuthFilters(WebAppSecurity.java:934)
at weblogic.servlet.security.internal.WebAppSecurity.checkAccess(WebAppSecurity.java:588)
at weblogic.servlet.security.internal.WebAppSecurity.checkAccess(WebAppSecurity

This is a bit strange. And the nic-system.jar is also on classpath.
When I remove log4j as a dependency my container cannot start up, or at least i fails to startup my application.
I can try asking Oracle. Seems like something has changed in this area. But it does take forever for Oracle support to reply, but lets see.
I will also keep digging.


/Kasper

Kasper Maylann

unread,
May 29, 2020, 2:38:48 AM5/29/20
to Codehaus Cargo
Hi Ali

Sorry for leaving you hanging here. So here is an update on my latest issue. There is actually simple reason for my latest issue :) The problem is not log4j, but slf4j. I found this ticket at the Oracle support: https://support.oracle.com/epmos/faces/SearchDocDisplay?_afrLoop=438254090041889&_afrWindowMode=0&_adf.ctrl-state=ebklqxjyn_109, saying that the slf4j is no longer provided by weblogic since version 12.2.1.3. So I just need to add it as a dependency in my cargo config and everything works :)
Anyway, thanks for your help. 
Do you know when the 1.7.13 cargo version will be released? :)

Kind regards
Kasper

S. Ali Tokmen

unread,
May 29, 2020, 6:16:09 AM5/29/20
to codehau...@googlegroups.com

Hi Kasper

Great news - That then solves the issue!

So far 1.7.13 only has a very small number of fixes, so I'm not planning a release "immediately" - It could be perhaps late June / early July 2020.

Would using 1.7.12 with the weblogic14x container be an acceptable workaround for you?

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/efe6bbe9-1c74-4ca3-a82f-907c3f5b34c9%40googlegroups.com.

Kasper Maylann

unread,
Jun 2, 2020, 5:42:08 AM6/2/20
to Codehaus Cargo
Hi Ali

Even though the weblogic14c does work for me I won't  introduce this for the rest in the organization I work in. We have several 100 projects using cargo for local testing of our applications. I think this will confuse our developers that they will have to use the weblogic14c for a short period and then make a change again for weblogicc122c when cargo 1.7.13 has been released.
So I'm hoping that you can release the version as here in June. Otherwise I think we will have to wait with our weblogic upgrade until your version has been released.

/Kasper

S. Ali Tokmen

unread,
Jun 2, 2020, 8:36:55 AM6/2/20
to codehau...@googlegroups.com

Hi Kasper

I understand - Your opinion makes sense.

I performed a "silent release" of Codehaus Cargo 1.7.13 just now, let me know when you have time to give a try. I'm guessing you only use the Maven 2 / Maven 3 plugin, so you would only need to change the plugin version you use in your pom.

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/9e67ec3b-e80b-4340-89aa-5fa19a16f53e%40googlegroups.com.

Kasper Maylann

unread,
Jun 3, 2020, 4:43:53 AM6/3/20
to Codehaus Cargo
You're great Ali! Thanks a lot. I have tested it and it works like a charm :)

Btw after some messages back and forth with Oracle they have now filed 2 bug reports on the issues we have seen:
- The missing PasswordValidator https://support.oracle.com/epmos/faces/BugDisplay?id=31436227&parent=SrDetailText&sourceId=3-23097758171. The PasswordValidator stuff apparently works in online mode, but not offline.

But anyway, I'm happy that you could help me out fixing it in cargo even though it was bugs in Weblogic :)
Thanks again.

/Kasper

S. Ali Tokmen

unread,
Jun 3, 2020, 7:44:33 AM6/3/20
to codehau...@googlegroups.com

Hi Kaylan

Excellent - Thanks for the feedback!

I believe the "missing" file is not a problem: the version of the WLS schema has actually changed, so what had to adapt was Codehaus Cargo - Which has been done since version 1.7.2.

I'm hoping the password validator bug get fixed. Meanwhile, I got the behaviour documented in https://codehaus-cargo.github.io/apidocs/org/codehaus/cargo/container/weblogic/WebLogicPropertySet.html#PASSWORD_LENGTH_MIN

To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/7d44f839-8176-405f-b5ab-5d9f2d1200bd%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages