Adding uses to weblogic

509 views
Skip to first unread message

Christoffer Mortensen

unread,
Sep 30, 2017, 8:11:14 AM9/30/17
to Codehaus Cargo
Hi
I am facing a problem when trying to add uses to my project. My profile works fine without cargo.servlet.users but fails when I use it. I have tried altering the debug port and the cargo port without success

Any ideas?

The stacktrace

{noformat}
[INFO] [talledLocalContainer] 29.09.2017 10:49:52.871  INFO  com.bea.core.repackaged.springframework.beans.factory.support.DefaultListableBeanFactory - Pr
instantiating singletons in com.bea.core.repackaged.springframework.beans.factory.support.DefaultListableBeanFactory@30cb8f71: defining beans [com.oracle.
tchfork.intercept.InterceptionMetadataBeanPostProcessor]; root of factory hierarchy
[INFO] [talledLocalContainer] Adding users and groups to WebLogic domain.
[WARNING] [talledLocalContainer] ERROR: transport error 202: bind failed: Address already in use
[WARNING] [talledLocalContainer] ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
[WARNING] [talledLocalContainer] JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750]
[WARNING] [talledLocalContainer] org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
[ERROR] Starting container [org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer@73ba6fe6] failed
org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScript(WebLogic121xInstalledLocalContainer.java:205)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executePostStartTasks(WebLogic121xInstalledLocalContainer.java:147)
        at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:233)
        at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction(ContainerStartMojo.java:84)
        at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute(ContainerRunMojo.java:96)
        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:462)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:239)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScript(WebLogic121xInstalledLocalContainer.java:201)
        ... 27 more
Caused by: org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 2
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:233)
        ... 28 more
org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:239)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScript(WebLogic121xInstalledLocalContainer.java:201)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executePostStartTasks(WebLogic121xInstalledLocalContainer.java:147)
        at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:233)
        at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction(ContainerStartMojo.java:84)
        at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute(ContainerRunMojo.java:96)
        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:462)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 2
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:233)
        ... 28 more
org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 2
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:233)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScript(WebLogic121xInstalledLocalContainer.java:201)
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executePostStartTasks(WebLogic121xInstalledLocalContainer.java:147)
        at org.codehaus.cargo.container.spi.AbstractLocalContainer.start(AbstractLocalContainer.java:233)
        at org.codehaus.cargo.maven2.ContainerStartMojo.executeLocalContainerAction(ContainerStartMojo.java:84)
        at org.codehaus.cargo.maven2.ContainerRunMojo.doExecute(ContainerRunMojo.java:96)
        at org.codehaus.cargo.maven2.AbstractCargoMojo.execute(AbstractCargoMojo.java:462)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
{noformat} 


My maven profile look like this

{code:xml}
        <profile>
            <id>wls12</id>
            <dependencies>
                <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>${log4j.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.ibm.db2</groupId>
                    <artifactId>db2jcc4</artifactId>
                    <version>10.5.5</version>
                </dependency>
                <dependency>
                    <groupId>com.ibm.db2</groupId>
                    <artifactId>db2jcc-license</artifactId>
                    <version>10.5.5</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                     <groupId>org.codehaus.cargo</groupId>
                     <artifactId>cargo-maven2-plugin</artifactId>
                     <configuration>
                     <container>
                     <containerId>weblogic121x</containerId>
                     <home>${WL_HOME}</home>
                     <systemProperties>
                     <config>
                     ${project.basedir}/lanc-application/target/generated-sources/config/${env}
                     </config>
                     <config.endpoints>
 
\\appsrv538\d_webtek\t8\tservice\deployments\endpointsconfig\current\config
                     </config.endpoints>
                     <log4j.configuration>
 
file:/${project.basedir}/lanc-application/src/test/resources/log4j.xml
                     </log4j.configuration>
                     <java.util.logging.config.file>
                     ${project.basedir}/lanc-application/src/test/resources/javalogging.properties
                     </java.util.logging.config.file>
                     <weblogic.configuration.schemavalidationenabled>false</weblogic.configuration.schemavalidationenabled>
                     <org.jboss.weld.xml.disableValidating>true</org.jboss.weld.xml.disableValidating>
                     </systemProperties>
                     <dependencies>
                     <dependency>
                     <groupId>log4j</groupId>
                     <artifactId>log4j</artifactId>
                     </dependency>
                     <dependency>
                     <location>${WL_HOME}\modules\databinding.override.jar</location>
                     </dependency>
                     <dependency>
                     <groupId>com.ibm.db2</groupId>
                     <artifactId>db2jcc4</artifactId>
                     </dependency>
                     <dependency>
                     <groupId>com.ibm.db2</groupId>
                     <artifactId>db2jcc-license</artifactId>
                     </dependency>
                     </dependencies>
                     </container>
                     <configuration>
                     <properties>
                     <cargo.servlet.port>7001</cargo.servlet.port>
                     <cargo.jvmargs>
                     -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000 -Xnoagent
                     -Xms512m -Xmx750m
                     </cargo.jvmargs>
                     <cargo.servlet.users>
                     test-clientid:passw0rd:advisor|customer1:passw0rd:
                     </cargo.servlet.users>

                     <cargo.logging>high</cargo.logging>
                     <deployable.location>${project.basedir}/lanc-mq-connector/target/lanc-mq-connector.rar</deployable.location>
                     <deployable.plan.env>${env}</deployable.plan.env>
                     </properties>
                     <configfiles>
                     <configfile>
                     <file>${project.basedir}/lanc-application/src/test/weblogic-config/config.xml</file>
                     <todir>config</todir>
                     <configfile>true</configfile>
                     </configfile>
                     <configfile>
                     <file>${project.basedir}/lanc-application/src/test/weblogic-config/jms/systemmodule-0-jms.xml</file>
                     <todir>config/jms</todir>
                     <configfile>true</configfile>
                     </configfile>
                     <configfile>
                     <file>${project.basedir}/lanc-application/src/test/weblogic-config/jdbc/DB2DataSource-jdbc.xml</file>
                     <todir>config/jdbc</todir>
                     <configfile>true</configfile>
                     </configfile>
                     </configfiles>
                     </configuration>
                     </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
{code}

Karel Suta

unread,
Oct 2, 2017, 10:38:20 AM10/2/17
to Codehaus Cargo
Hi Christoffer,

The issue may be related to cargo.jvmargs. This parameter is applied every time when Cargo invokes Java operation on container.
When you define users then Cargo tries to invoke Java operation on WebLogic processing WLST script with users. This Java operation contains debug definition from cargo.jvmargs and crash on occupied port.
Please try to replace cargo.jvmargs by cargo.start.jvmargs. Values from cargo.start.jvmargs are applied just when application server is starting.

Br, Karel



Dne sobota 30. září 2017 14:11:14 UTC+2 Christoffer Mortensen napsal(a):

Christoffer Mortensen

unread,
Oct 4, 2017, 12:53:21 AM10/4/17
to Codehaus Cargo

That seemed to work i little, but now I get this

[INFO] [talledLocalContainer] Adding users and groups to WebLogic domain.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Initializing WebLogic Scripting Tool (WLST) ...
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Welcome to WebLogic Server Administration Scripting Shell
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Type help() for help on available commands
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Connecting to t3://localhost:7001 with userid weblogic ...
[INFO] [talledLocalContainer] <03-10-2017, 10:20:52,853 AM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Initializing callback
s>
[INFO] [talledLocalContainer] <03-10-2017, 10:20:52,853 AM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Added MBeanServerConn
ection in DomainRuntimeServiceMBean >
[INFO] [talledLocalContainer] <03-10-2017, 10:20:52,853 AM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Callback is done>
[INFO] [talledLocalContainer] <03-10-2017, 10:20:52,853 AM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Connection already ex
ists for the server. Did not attempt to connect to the server>
[INFO] [talledLocalContainer] Successfully connected to Admin Server "server" that belongs to domain "domain".
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Warning: An insecure protocol was used to connect to the server.
[INFO] [talledLocalContainer] To ensure on-the-wire security, the SSL port or Admin port should be used instead.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] No stack trace available.
[INFO] [talledLocalContainer] Problem invoking WLST - Traceback (innermost last):
[INFO] [talledLocalContainer]   File "C:\Users\cfmo\AppData\Local\Temp\wlst5479460336596308535.py", line 35, in ?
[INFO] [talledLocalContainer]   File "<iostream>", line 168, in cd
[INFO] [talledLocalContainer]   File "<iostream>", line 553, in raiseWLSTException
[INFO] [talledLocalContainer] WLSTException: Error cding to the MBean
[INFO] [talledLocalContainer]
[WARNING] [talledLocalContainer] org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
[ERROR] Starting container [org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer@73ba6fe6] failed
org.codehaus.cargo.util.CargoException: Cannot execute WLST script.

Karel Suta

unread,
Oct 4, 2017, 1:48:35 AM10/4/17
to Codehaus Cargo
In your user definition you have this:

...|customer1:passw0rd:

If you try to create user "
customer1" without roles then you need to delete last colon, to have "...|customer1:passw0rd</cargo.servlet.users>". Otherwise Cargo will interpret any character after the last colon as role.


Dne středa 4. října 2017 6:53:21 UTC+2 Christoffer Mortensen napsal(a):

Christoffer Mortensen

unread,
Oct 4, 2017, 4:45:03 AM10/4/17
to Codehaus Cargo
I tried removing the colon and even |customer1:passw0rd
but it gives the same error :-/

Karel Suta

unread,
Oct 4, 2017, 5:32:54 AM10/4/17
to Codehaus Cargo
Can you try to run the maven build in debug mode - with "-X" as parameter? In debug mode Cargo will print content of all its commands. With that we can find out what is present on the failing line. Can you please run the maven build and send debug output here, at least the jython command used for adding of users?

Dne středa 4. října 2017 10:45:03 UTC+2 Christoffer Mortensen napsal(a):

Christoffer Mortensen

unread,
Oct 4, 2017, 6:43:00 AM10/4/17
to Codehaus Cargo
[DEBUG] [.http.HttpConnection] Called [http://0.0.0.0:7001/console], result = [200]
[INFO] [talledLocalContainer] Adding users and groups to WebLogic domain.
[DEBUG] [talledLocalContainer] Sending WLST script:
"""
    Codehaus CARGO, copyright 2004-2011 Vincent Massol, 2012-2016 Ali Tokmen.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at


    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

connect('weblogic','weblogic1','t3://0.0.0.0:7001')

"""
    Codehaus CARGO, copyright 2004-2011 Vincent Massol, 2012-2016 Ali Tokmen.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at


    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

cd('/SecurityConfiguration/weblogic121x/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')

if not cmo.groupExists('advisor'):
    cmo.createGroup('advisor','advisor')

"""
    Codehaus CARGO, copyright 2004-2011 Vincent Massol, 2012-2016 Ali Tokmen.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at


    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

cd('/SecurityConfiguration/weblogic121x/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')

if not cmo.userExists('test-clientid'):
    if not cmo.groupExists('test-clientid'):
        cmo.createUser('test-clientid','passw0rd','test-clientid')

"""
    Codehaus CARGO, copyright 2004-2011 Vincent Massol, 2012-2016 Ali Tokmen.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at


    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

cd('/SecurityConfiguration/weblogic121x/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.addMemberToGroup('advisor','test-clientid')

"""
    Codehaus CARGO, copyright 2004-2011 Vincent Massol, 2012-2016 Ali Tokmen.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at


    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

disconnect()
exit()

dumpStack()
[DEBUG] [talledLocalContainer]    +Task: java
[DEBUG] [talledLocalContainer] Adding [C:\tools\apache\maven\m2repository\com\ibm\db2\db2jcc4\10.5.5\db2jcc4-10.5.5.jar] to execution classpath
[DEBUG] [talledLocalContainer] Adding [C:\tools\apache\maven\m2repository\com\ibm\db2\db2jcc-license\10.5.5\db2jcc-license-10.5.5.jar] to execution classpat
h
[DEBUG] [talledLocalContainer] Adding [C:\tools\oracle\weblogic\12.2.1.2_18\wlserver\modules\databinding.override.jar] to execution classpath
[DEBUG] [talledLocalContainer] Adding [C:\tools\apache\maven\m2repository\log4j\log4j\1.2.17\log4j-1.2.17.jar] to execution classpath
[DEBUG] [talledLocalContainer] Execute:Java13CommandLauncher: Executing 'C:\tools\oracle\jdk\1.8.0_131\jre\bin\java.exe' with arguments:
'-Dlog4j.configuration=file:/C:\projects\land-register-connector/lanc-application/src/test/resources/log4j.xml'
'-Dweblogic.configuration.schemavalidationenabled=false'
'-Djava.util.logging.config.file=C:\projects\land-register-connector/lanc-application/src/test/resources/javalogging.properties'
'-Dorg.jboss.weld.xml.disableValidating=true'
'-Dconfig=C:\projects\land-register-connector/lanc-application/target/generated-sources/config/T8'
'-Dconfig.endpoints=\\appsrv538\d_webtek\t8\tservice\deployments\endpointsconfig\current\config'
'-classpath'
'C:\tools\apache\maven\m2repository\com\ibm\db2\db2jcc4\10.5.5\db2jcc4-10.5.5.jar;C:\tools\apache\maven\m2repository\com\ibm\db2\db2jcc-license\10.5.5\db2jc
c-license-10.5.5.jar;C:\tools\oracle\weblogic\12.2.1.2_18\wlserver\modules\databinding.override.jar;C:\tools\apache\maven\m2repository\log4j\log4j\1.2.17\lo
g4j-1.2.17.jar;C:\tools\oracle\weblogic\12.2.1.2_18\wlserver\server\lib\weblogic.jar'
'weblogic.WLST'
'C:\Users\cfmo\AppData\Local\Temp\wlst4710267761208684807.py'

The ' characters around the executable and arguments are
not part of the command.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Initializing WebLogic Scripting Tool (WLST) ...
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Welcome to WebLogic Server Administration Scripting Shell
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Type help() for help on available commands
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Connecting to t3://0.0.0.0:7001 with userid weblogic ...
[INFO] [talledLocalContainer] <04-10-2017, 12:40:02,225 PM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Initializing callback
s>
[INFO] [talledLocalContainer] <04-10-2017, 12:40:02,235 PM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Added MBeanServerConn
ection in DomainRuntimeServiceMBean >
[INFO] [talledLocalContainer] <04-10-2017, 12:40:02,235 PM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Callback is done>
[INFO] [talledLocalContainer] <04-10-2017, 12:40:02,245 PM CEST> <Warning> <JMX> <BEA-149535> <JMX Resiliency Activity Server=server : Connection already ex
ists for the server. Did not attempt to connect to the server>
[INFO] [talledLocalContainer] Successfully connected to Admin Server "server" that belongs to domain "domain".
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] Warning: An insecure protocol was used to connect to the server.
[INFO] [talledLocalContainer] To ensure on-the-wire security, the SSL port or Admin port should be used instead.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] No stack trace available.
[INFO] [talledLocalContainer] Problem invoking WLST - Traceback (innermost last):
[INFO] [talledLocalContainer]   File "C:\Users\cfmo\AppData\Local\Temp\wlst4710267761208684807.py", line 35, in ?
[INFO] [talledLocalContainer]   File "<iostream>", line 168, in cd
[INFO] [talledLocalContainer]   File "<iostream>", line 553, in raiseWLSTException
[INFO] [talledLocalContainer] WLSTException: Error cding to the MBean
[INFO] [talledLocalContainer]
[WARNING] [talledLocalContainer] org.codehaus.cargo.util.CargoException: Cannot execute WLST script.
[ERROR] Starting container [org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer@69c93ca4] failed
Caused by: org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 1
Caused by: org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 1
        at org.codehaus.cargo.container.weblogic.WebLogic121xInstalledLocalContainer.executeScriptFiles(WebLogic121xInstalledLocalContainer.java:233)
        ... 28 more
org.codehaus.cargo.container.ContainerException: Failure when invoking WLST script, java returned 1

Christoffer Mortensen

unread,
Oct 4, 2017, 7:54:23 AM10/4/17
to Codehaus Cargo
Another thing that I noticed is that if I remove cargo.servlet.users, it starts up. But I am unable to login in with user/password: weblogic/weblogic


Den lørdag den 30. september 2017 kl. 14.11.14 UTC+2 skrev Christoffer Mortensen:

Karel Suta

unread,
Oct 4, 2017, 7:57:14 AM10/4/17
to Codehaus Cargo
I guess the issue has some relation to your custom config.xml. Paths for Jython commands (to configure WebLogic) are designed in Cargo to work against default config file. Do you have some specific configuration in your config.xml which you need for the Maven build?

Dne středa 4. října 2017 12:43:00 UTC+2 Christoffer Mortensen napsal(a):

Karel Suta

unread,
Oct 4, 2017, 7:59:00 AM10/4/17
to Codehaus Cargo
Since weblogic121x the admin password is weblogic1.


Dne středa 4. října 2017 13:54:23 UTC+2 Christoffer Mortensen napsal(a):

Christoffer Mortensen

unread,
Oct 4, 2017, 9:00:11 AM10/4/17
to Codehaus Cargo
It actually seems to start up when I comment out the config file. Do I need it?, Well, there is some domain and jms configuration...

<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns="http://xmlns.oracle.com/weblogic/domain"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd">
<name>domain</name>
<domain-version>12.2.1.0</domain-version>
<security-configuration>
<name>domain</name>
<realm>
<sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
<sec:authentication-provider xsi:type="wls:default-identity-asserterType">
<sec:active-type>AuthenticatedUser</sec:active-type>
</sec:authentication-provider>
<sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
<sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
<sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
<sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
<sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
<sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
<sec:name>myrealm</sec:name>
<sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
<sec:name>SystemPasswordValidator</sec:name>
<pas:min-password-length>8</pas:min-password-length>
<pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
</sec:password-validator>
</realm>
<default-realm>myrealm</default-realm>
<credential-encrypted>weblogic</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>weblogic</node-manager-password-encrypted>
</security-configuration>
<jta>
<name>domain</name>
<timeout-seconds>500</timeout-seconds>
</jta>
<server>
<name>server</name>
</server>
<embedded-ldap>
<name>domain</name>
<credential-encrypted>weblogic</credential-encrypted>
</embedded-ldap>
<configuration-version>12.2.1.0</configuration-version>

<app-deployment>
<name>land-register-connector</name>
<target>server</target>
<source-path>@deployable.location@</source-path>
<plan-path>../../../../lanc-application/target/generated-sources/config/@deployable.plan.env@/deploymentplan.xml</plan-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>

<jms-server>
<name>JMSServer-0</name>
<target>server</target>
<persistent-store>FileStore-0</persistent-store>
</jms-server>
<file-store>
<name>FileStore-0</name>
<target>server</target>
</file-store>
<jms-system-resource>
<name>SystemModule-0</name>
<target>server</target>
<sub-deployment>
<name>jmssub</name>
<target>JMSServer-0</target>
</sub-deployment>
<descriptor-file-name>jms/systemmodule-0-jms.xml</descriptor-file-name>
</jms-system-resource>


<admin-server-name>server</admin-server-name>

<jdbc-system-resource>
<name>DB2DataSource</name>
<target>server</target>
<descriptor-file-name>jdbc/DB2DataSource-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>

</domain>
...

Karel Suta

unread,
Oct 4, 2017, 9:31:39 AM10/4/17
to Codehaus Cargo
If you align Cargo configuration with your config.xml then it may work.
Try to set Cargo domain name to same value as you have in your config - set configuration home folder into domain folder (WebLogic domain name is derived from folder name):
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>

            <configuration>
             
<home>${some folder}/domain</home>
            </configuration>
        </configuration>

Add DefaultAuthenticator to your config.xml:

<sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>

replace with


      <sec:authentication-provider xsi:type="wls:default-authenticatorType">
        <sec:name>DefaultAuthenticator</sec:name>
      </sec:authentication-provider>




Dne středa 4. října 2017 15:00:11 UTC+2 Christoffer Mortensen napsal(a):
...

Christoffer Mortensen

unread,
Oct 5, 2017, 1:16:17 AM10/5/17
to Codehaus Cargo
hmmm, not sure what to type here. Can't seem to find a domain folder anywhere, not in the project or the weblogic installation. I did although find an entry in oracle\weblogic\12.2.1.2_18/domain-registry.xml that said <domain location="C:\projects\land-register-connector\target\cargo\configurations\weblogic121x" /> but no domain folder in there...

My WL_HOME is set to oracle\\weblogic\\12.2.1.2_18\\wlserver , in the config the version refers to 12.2.1.0 ??

...

Karel Suta

unread,
Oct 5, 2017, 3:38:37 AM10/5/17
to Codehaus Cargo
Sorry, I guess I didn't explain it well.
There are two different "homes" for application servers when you run Cargo. First is a container home - place where the application server is installed. In your case it is ${WL_HOME} .
Then there is "configuration home", it is the place where WebLogic domain/profile is installed. If you don't specify this
configuration home then WebLogic profile is created in default location (in target\cargo\configurations\weblogic121x). This configuration home contains all your custom configuration you use.
WebLogic identifies a domain/profile using domain name. Domain name is derived from folder name of the folder where configuration home is set. In your current case it is weblogic121x.
To set domain name to same value as you have defined in config.xml you need to set configuration home to something like this:
        <artifactId>cargo-maven2-plugin</artifactId>
       
<configuration>

            <configuration>

             
<home>
C:\projects\land-register-connector\target\cargo\configurations\domain</home>
            </configuration>
        </configuration>




Dne čtvrtek 5. října 2017 7:16:17 UTC+2 Christoffer Mortensen napsal(a):
...

Christoffer Mortensen

unread,
Oct 6, 2017, 12:47:32 AM10/6/17
to Codehaus Cargo
Weill, I'll be damned, it works :-) That is incredible! Thx.
Some last questions,.. in the config file I have entered this
<credential-encrypted>weblogic</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>weblogic</node-manager-password-encrypted>

what are they for and shouldn't the password change to weblogic1

And I'm a bit interested in where I could have found the new password "weblogic1", I have roamed the oracle documentation a bit but couldn.t find it
...

Karel Suta

unread,
Oct 10, 2017, 3:23:37 AM10/10/17
to Codehaus Cargo
You're welcome :)
About credentials in config file - I am not sure what are they used for. I don't have so deep WebLogic knowledge.
The "weblogic1" password is specified by Cargo (by property cargo.weblogic.administrator.password).

Dne pátek 6. října 2017 6:47:32 UTC+2 Christoffer Mortensen napsal(a):
...
Reply all
Reply to author
Forward
0 new messages