Sunday, April 12, 2026

Install Jenkins via Docker and setup access via ssh

 


Install Jenkins via Docker 


dave@fedora:/git/devops-docker$ sudo docker run --name jenkins-test -p 8080:8080 -p 50000:50000 -d jenkins/jenkins:lts
[sudo] password for dave: 
Unable to find image 'jenkins/jenkins:lts' locally
lts: Pulling from jenkins/jenkins
53c88f1dfeb7: Pull complete 
4d2125ccf71c: Pull complete 
69503609dc01: Pull complete 
6da7907f70f4: Pull complete 
6327a7366a6f: Pull complete 
01938f7c040b: Pull complete 
b7b154fd69a1: Pull complete 
876217fdee20: Pull complete 
fbae626c1b7a: Pull complete 
b19825c62ed8: Pull complete 
ec7478903548: Pull complete 
e682a95ad036: Pull complete 
Digest: sha256:c4098086090ca98491d4bf66182f5e3b015a8232f2acf2df209a212a5801aa8e
Status: Downloaded newer image for jenkins/jenkins:lts
16c87f857d22f7a0be645a6a1cd88633bfef9b381a03c9061ad723acc4acc33c


Get admin password 

dave@fedora:/git/devops-docker$ sudo docker logs jenkins-test
Running from: /usr/share/jenkins/jenkins.war
webroot: /var/jenkins_home/war
2026-04-12 13:46:37.724+0000 [id=1]    INFO    winstone.Logger#logInternal: Beginning extraction from war file
2026-04-12 13:46:38.325+0000 [id=1]    WARNING    o.e.j.ee9.nested.ContextHandler#setContextPath: Empty contextPath
2026-04-12 13:46:38.359+0000 [id=1]    INFO    org.eclipse.jetty.server.Server#doStart: jetty-12.1.5; built: 2025-12-03T22:18:24.732Z; git: 4905d09d7b6801e792d7b73946cf7b66e4be25d6; jvm 21.0.9+10-LTS
2026-04-12 13:46:38.654+0000 [id=1]    INFO    o.e.j.e.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /, did not find org.eclipse.jetty.ee9.jsp.JettyJspServlet
2026-04-12 13:46:38.699+0000 [id=1]    INFO    o.e.j.s.DefaultSessionIdManager#doStart: Session workerName=node0
2026-04-12 13:46:38.909+0000 [id=1]    INFO    hudson.WebAppMain#contextInitialized: Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
2026-04-12 13:46:38.979+0000 [id=1]    INFO    o.e.j.s.handler.ContextHandler#doStart: Started oeje9n.ContextHandler$CoreContextHandler@3681037{Jenkins v2.541.3,/,b=file:///var/jenkins_home/war/,a=AVAILABLE,h=oeje9n.ContextHandler$CoreContextHandler$CoreToNestedHandler@2459319c{STARTED}}
2026-04-12 13:46:38.990+0000 [id=1]    INFO    o.e.j.server.AbstractConnector#doStart: Started oejs.ServerConnector@2aa6311a{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2026-04-12 13:46:38.991+0000 [id=1]    INFO    org.eclipse.jetty.server.Server#doStart: Started oejs.Server@78525ef9{STARTING}[12.1.5,sto=0] @633ms
2026-04-12 13:46:38.992+0000 [id=43]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2026-04-12 13:46:39.073+0000 [id=42]    INFO    jenkins.model.Jenkins#<init>: Starting version 2.541.3
2026-04-12 13:46:39.122+0000 [id=51]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
2026-04-12 13:46:39.132+0000 [id=72]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2026-04-12 13:46:39.707+0000 [id=51]    INFO    jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2026-04-12 13:46:39.711+0000 [id=51]    INFO    jenkins.InitReactorRunner$1#onAttained: Started all plugins
2026-04-12 13:46:39.712+0000 [id=68]    INFO    jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2026-04-12 13:46:39.837+0000 [id=52]    INFO    jenkins.InitReactorRunner$1#onAttained: System config loaded
2026-04-12 13:46:39.837+0000 [id=59]    INFO    jenkins.InitReactorRunner$1#onAttained: System config adapted
2026-04-12 13:46:39.838+0000 [id=69]    INFO    jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2026-04-12 13:46:39.839+0000 [id=69]    INFO    jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2026-04-12 13:46:39.857+0000 [id=86]    INFO    hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2026-04-12 13:46:40.152+0000 [id=63]    INFO    jenkins.install.SetupWizard#init: 
[LF]> 
[LF]> *************************************************************
[LF]> *************************************************************
[LF]> *************************************************************
[LF]> 
[LF]> Jenkins initial setup is required. An admin user has been created and a password generated.
[LF]> Please use the following password to proceed to installation:
[LF]> 
[LF]> 3c54093a66f94103af3594c3851f070a
[LF]> 
[LF]> This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
[LF]> 
[LF]> *************************************************************
[LF]> *************************************************************
[LF]> *************************************************************

2026-04-12 13:46:46.027+0000 [id=65]    INFO    jenkins.InitReactorRunner$1#onAttained: Completed initialization
2026-04-12 13:46:46.042+0000 [id=42]    INFO    hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running
2026-04-12 13:46:47.011+0000 [id=86]    INFO    h.m.DownloadService$Downloadable#load: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
2026-04-12 13:46:47.011+0000 [id=86]    INFO    hudson.util.Retrier#start: Performed the action check updates server successfully at the attempt #1

Install plugins Install SSH server plugin Access Jenkins via ssh




dave@fedora:/git/devops-docker$ ssh -p 2222 dave@localhost help
  add-job-to-view
    Adds jobs to view.
  build
    Builds a job, and optionally waits until its completion.
  cancel-quiet-down
    Cancel the effect of the "quiet-down" command.
  clear-queue
    Clears the build queue.
  connect-node
    Reconnect to a node(s)
  console
    Retrieves console output of a build.
  copy-job
    Copies a job.
  create-credentials-by-xml
    Create Credential by XML
  create-credentials-domain-by-xml
    Create Credentials Domain by XML
  create-job
    Creates a new job by reading stdin as a configuration XML file.
  create-node
    Creates a new node by reading stdin as a XML configuration.
  create-view
    Creates a new view by reading stdin as a XML configuration.
  declarative-linter
    Validate a Jenkinsfile containing a Declarative Pipeline
  delete-builds
    Deletes build record(s).
  delete-credentials
    Delete a Credential
  delete-credentials-domain
    Delete a Credentials Domain
  delete-job
    Deletes job(s).
  delete-node
    Deletes node(s)
  delete-view
    Deletes view(s).
  disable-job
    Disables a job.
  disable-plugin
    Disable one or more installed plugins.
  disconnect-node
    Disconnects from a node.
  enable-job
    Enables a job.
  enable-plugin
    Enables one or more installed plugins transitively.
  get-credentials-as-xml
    Get a Credentials as XML (secrets redacted)
  get-credentials-domain-as-xml
    Get a Credentials Domain as XML
  get-gradle
    List available gradle installations
  get-job
    Dumps the job definition XML to stdout.
  get-node
    Dumps the node definition XML to stdout.
  get-view
    Dumps the view definition XML to stdout.
  groovy
    Executes the specified Groovy script. 
  groovysh
    Runs an interactive groovy shell.
  help
    Lists all the available commands or a detailed description of single command.
  import-credentials-as-xml
    Import credentials as XML. The output of "list-credentials-as-xml" can be used as input here as is, the only needed change is to set the actual Secrets which are redacted in the output.
  install-plugin
    Installs a plugin either from a file, an URL, or from update center. 
  keep-build
    Mark the build to keep the build forever.
  list-changes
    Dumps the changelog for the specified build(s).
  list-credentials
    Lists the Credentials in a specific Store
  list-credentials-as-xml
    Export credentials as XML. The output of this command can be used as input for "import-credentials-as-xml" as is, the only needed change is to set the actual Secrets which are redacted in the output.
  list-credentials-context-resolvers
    List Credentials Context Resolvers
  list-credentials-providers
    List Credentials Providers
  list-jobs
    Lists all jobs in a specific view or item group.
  list-plugins
    Outputs a list of installed plugins.
  mail
    Reads stdin and sends that out as an e-mail.
  offline-node
    Stop using a node for performing builds temporarily, until the next "online-node" command.
  online-node
    Resume using a node for performing builds, to cancel out the earlier "offline-node" command.
  quiet-down
    Quiet down Jenkins, in preparation for a restart. Don’t start any builds.
  reload-configuration
    Discard all the loaded data in memory and reload everything from file system. Useful when you modified config files directly on disk.
  reload-job
    Reload job(s)
  remove-job-from-view
    Removes jobs from view.
  replay-pipeline
    Replay a Pipeline build with edited script taken from standard input
  restart
    Restart Jenkins.
  restart-from-stage
    Restart a completed Declarative Pipeline build from a given stage.
  safe-restart
    Safe Restart Jenkins. Don’t start any builds.
  safe-shutdown
    Puts Jenkins into the quiet mode, wait for existing builds to be completed, and then shut down Jenkins.
  session-id
    Outputs the session ID, which changes every time Jenkins restarts.
  set-build-description
    Sets the description of a build.
  set-build-display-name
    Sets the displayName of a build.
  shutdown
    Immediately shuts down Jenkins server.
  stop-builds
    Stop all running builds for job(s)
  update-credentials-by-xml
    Update Credentials by XML
  update-credentials-domain-by-xml
    Update Credentials Domain by XML
  update-job
    Updates the job definition XML from stdin. The opposite of the get-job command.
  update-node
    Updates the node definition XML from stdin. The opposite of the get-node command.
  update-view
    Updates the view definition XML from stdin. The opposite of the get-view command.
  version
    Outputs the current version.
  wait-node-offline
    Wait for a node to become offline.
  wait-node-online
    Wait for a node to become online.
  who-am-i
    Reports your credential and permissions.
dave@fedora:/git/devops-docker$ 


Run job via ssh 




Trigger a build and follow the logs (Best for Dev):
ssh -p 2222 my_jenkins_user@localhost build "Your-Job-Name" -s -v

Friday, January 23, 2026

Building Jakarta EE JMS MDB project for WebLogic Server 14.1.2 with Maven

 

HOWTO


See also

Git



Create Java EE project using Maven archetype


dave@dave:/git/weblogic/dave-basic-project-14.1.2$ mvn archetype:generate     -DarchetypeGroupId=com.oracle.weblogic.archetype     -DarchetypeArtifactId=basic-mdb     -DarchetypeVersion=14.1.2-0-0     -DgroupId=dave     -DartifactId=dave-basic-mdb-project     -Dversion=1.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] >>> archetype:3.4.1:generate (default-cli) > generate-sources @ standalone-pom >>>
[INFO] 
[INFO] <<< archetype:3.4.1:generate (default-cli) < generate-sources @ standalone-pom <<<
[INFO] 
[INFO] 
[INFO] --- archetype:3.4.1:generate (default-cli) @ standalone-pom ---
D[INFO] Generating project in Interactive mode
Downloading from central: https://repo.maven.apache.org/maven2/archetype-catalog.xml
Downloaded from central: https://repo.maven.apache.org/maven2/archetype-catalog.xml (18 MB at 57 MB/s)
[WARNING] Archetype not found in any catalog. Falling back to central repository.
[WARNING] Add a repository with id 'archetype' in your settings.xml if archetype's repository is elsewhere.
[INFO] Using property: groupId = dave
[INFO] Using property: artifactId = dave-basic-mdb-project
[INFO] Using property: version = 1.0-SNAPSHOT
[INFO] Using property: package = dave
Confirm properties configuration:
groupId: dave
artifactId: dave-basic-mdb-project
version: 1.0-SNAPSHOT
package: dave
 Y: 
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: basic-mdb:14.1.2-0-0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: dave-basic-mdb-project
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: dave
[INFO] Parameter: packageInPathFormat, Value: dave
[INFO] Parameter: package, Value: dave
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: dave-basic-mdb-project
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Project created from Archetype in dir: /git/weblogic/dave-basic-project-14.1.2/dave-basic-mdb-project
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.442 s
[INFO] Finished at: 2026-01-23T20:47:42+01:00
[INFO] ------------------------------------------------------------------------



Send to queue 

  @Resource(mappedName = "myConnectionFactory")
  private ConnectionFactory connectionFactory;

  @Resource(mappedName = "myJmsQueue")
  private Queue accountQueue;

  public void depositJms() throws JMSException{
    try{
      javax.jms.Connection connection = connectionFactory.createConnection();
      Session accountSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      MessageProducer messageProducer = accountSession.createProducer(accountQueue);
      
      Message message = accountSession.createMessage();
      message.setStringProperty("name", name);
      message.setFloatProperty("amount", amount);
      
      messageProducer.send(message);
    } catch (JMSException e) {
      e.printStackTrace();
      throw e;
    }
    
    msg = "A message with the deposit request has been sent, please check the console output of the server to verify it was received";
  }

MDB



package dave.jms.destination;

import java.text.NumberFormat;
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;

/**
 * @author Copyright (c) 2011,2013, Oracle and/or its affiliates. All rights reserved.
 *
 * Message driven bean used to process messages.
 */

@MessageDriven(
  mappedName = "myJmsQueue",
  activationConfig = {
    @ActivationConfigProperty(
      propertyName  = "destinationType", 
      propertyValue = "javax.jms.Queue"),   
      
    @ActivationConfigProperty(
      propertyName  = "acknowledgeMode",
      propertyValue = "Auto-acknowledge")
  }
)
public class QueueMDB implements MessageListener {
    
  private final NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance();    
  
  @Resource
  private MessageDrivenContext mdctx;
  
  public QueueMDB() {
    
  }
  
  public void onMessage(Message message) {
    try{
      System.out.println("The money has been deposited to " + message.getStringProperty("name") +  ", for the amount of " + currencyFormatter.format(message.getFloatProperty("amount")));
        
    } catch (Exception e) {
      e.printStackTrace();
      mdctx.setRollbackOnly();
    }
  }

}


List Weblogic JMS queue configuration

  /app/weblogic-14.1.2/oracle_common/common/bin/wlst.sh src/main/scripts/list_queue_attrs.py

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Connecting to t3://127.0.0.1:7001 with userid weblogic ...
Successfully connected to Admin Server "AdminServer" that belongs to domain "dave_domain".

Warning: An insecure protocol was used to connect to the server. 
To ensure on-the-wire security, the SSL port or Admin port should be used instead.

Location changed to edit tree.   
This is a writable tree with DomainMBean as the root.    
To make changes you will need to start an edit session via startEdit(). 
For more help, use help('edit').
You already have an edit session in progress and hence WLST will 
continue with your edit session.

Starting an edit session ...
Started edit session, be sure to save and activate your changes once you are done.
dr--   DeliveryFailureParams
dr--   DeliveryParamsOverrides
dr--   MessageLoggingParams
dr--   Quota
dr--   Template
dr--   Thresholds

-rw-   AttachSender                                 supports
-rw-   ConsumptionPausedAtStartup                   false
-rw-   DefaultTargetingEnabled                      false
-rw-   DefaultUnitOfOrder                           false
-rw-   DestinationKeys                              null
-rw-   ForwardDelay                                 -1
-r--   Id                                           0
-rw-   IncompleteWorkExpirationTime                 -1
-rw-   InsertionPausedAtStartup                     false
-rw-   JMSCreateDestinationIdentifier               null
-rw-   JNDIName                                     myJmsQueue
-rw-   LoadBalancingPolicy                          Round-Robin
-rw-   LocalJNDIName                                null
-rw-   MaximumMessageSize                           2147483647
-rw-   MessagingPerformancePreference               25
-rw-   Name                                         myJmsQueue
-rw-   Notes                                        null
-rw-   ProductionPausedAtStartup                    false
-rw-   Quota                                        null
-rw-   ResetDeliveryCountOnForward                  true
-rw-   SAFExportPolicy                              All
-rw-   SubDeploymentName                            subDep
-rw-   Template                                     null
-rw-   UnitOfOrderRouting                           Hash
-rw-   UnitOfWorkHandlingPolicy                     PassThrough

-r-x   addDestinationKey                            Void : String(destinationKey)
-r-x   isSet                                        Boolean : String(propertyName)
-r-x   removeDestinationKey                         Void : String(destinationKey)
-r-x   unSet                                        Void : String(propertyName)

Edit session is cancelled successfully.
Disconnected from weblogic server: AdminServer


Exiting WebLogic Scripting Tool.

Enable JMS logging

$ cat   /app/weblogic-14.1.2/oracle_common/common/bin/wlst.sh src/main/scripts/enable_logging_final.py
#!/bin/sh

SCRIPTNAME=$0
SCRIPTPATH=`dirname "${SCRIPTNAME}"`
MW_HOME=`cd "${SCRIPTPATH}/../../.." ; pwd`
export MW_HOME
# Delegate to the common delegation script ...
"${SCRIPTPATH}/fmwconfig_common.sh" wlst_internal.sh "$@"


try:
    connect('weblogic', 'weblogic123', 't3://127.0.0.1:7001')
    edit()
    startEdit()
    
    queuePath = '/JMSSystemResources/myJmsSystemResource/JMSResource/myJmsSystemResource/Queues/myJmsQueue/MessageLoggingParams/myJmsQueue'
    
    print("Navigating to MessageLoggingParams...")
    try:
        cd(queuePath)
    except:
        print("Direct path failed, trying list...")
        cd('/JMSSystemResources/myJmsSystemResource/JMSResource/myJmsSystemResource/Queues/myJmsQueue/MessageLoggingParams')
        ls()
        # Assume the single child is the one we want
        # In WLST, sometimes we need to pick the specific name if it wasn't auto-named
        kids = cmo.getMessageLoggingParams()
        # But in edit tree we cd.
        # Let's try cd to the first child found in ls() if possible, but manual is safer
        cd('myJmsQueue')
        
    print("Enabling Message Logging...")
    cmo.setMessageLoggingEnabled(True)
    cmo.setMessageLoggingFormat("%header%,%properties%")
    
    save()
    activate()
    print("JMS Queue Message Logging enabled successfully.")
    
except Exception as e:
    print("Error: " + str(e))
    cancelEdit('y')
    exit(exitcode=1)

disconnect()
exit()

Show JMS log


dave@dave:/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project$  ls -l /app/domains/dave_domain/servers/AdminServer/logs/jmsservers/myJMSServer/
total 4
-rw-r-----. 1 dave dave 2389 Jan 23 23:07 myJMSServer-jms.messages.log
dave@dave:/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project$  tail -n 20 /app/domains/dave_domain/servers/AdminServer/logs/jmsservers/myJMSServer/myJMSServer-jms.messages.log
####<Jan 23, 2026, 11:07:31,902 PM Central European Standard Time> <> <> <1769206051902> <116244> <ID:<974816.1769206051889.0>> <> <myJmsSystemResource!myJmsQueue> <Produced> <weblogic> <> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSDeliveryMode&gt;PERSISTENT&lt;/mes:JMSDeliveryMode&gt;&lt;mes:JMSExpiration&gt;0&lt;/mes:JMSExpiration&gt;&lt;mes:JMSPriority&gt;4&lt;/mes:JMSPriority&gt;&lt;mes:JMSRedelivered&gt;false&lt;/mes:JMSRedelivered&gt;&lt;mes:JMSTimestamp&gt;1769206051889&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties&gt;&lt;mes:property name="amount"&gt;&lt;mes:Float&gt;100.5&lt;/mes:Float&gt;&lt;/mes:property&gt;&lt;mes:property name="name"&gt;&lt;mes:String&gt;john.doe&lt;/mes:String&gt;&lt;/mes:property&gt;&lt;mes:property name="JMS_BEA_DeliveryTime"&gt;&lt;mes:Long&gt;1769206051889&lt;/mes:Long&gt;&lt;/mes:property&gt;&lt;mes:property name="JMSXDeliveryCount"&gt;&lt;mes:Int&gt;0&lt;/mes:Int&gt;&lt;/mes:property&gt;&lt;/mes:Properties&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <> 
####<Jan 23, 2026, 11:07:31,967 PM Central European Standard Time> <BEA1-64B3874E479C50BE51E2-574C53746F72655F646176655F646F6D61696E5F5F574C535F41646D696E536572766572> <> <1769206051967> <308200> <ID:<974816.1769206051889.0>> <> <myJmsSystemResource!myJmsQueue> <Consumed> <<anonymous>> <MC:CA(local):OAMI(AdminServer.jms.connection30.session74.consumer76)> <&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;mes:WLJMSMessage xmlns:mes="http://www.bea.com/WLS/JMS/Message"&gt;&lt;mes:Header&gt;&lt;mes:JMSDeliveryMode&gt;PERSISTENT&lt;/mes:JMSDeliveryMode&gt;&lt;mes:JMSExpiration&gt;0&lt;/mes:JMSExpiration&gt;&lt;mes:JMSPriority&gt;4&lt;/mes:JMSPriority&gt;&lt;mes:JMSRedelivered&gt;false&lt;/mes:JMSRedelivered&gt;&lt;mes:JMSTimestamp&gt;1769206051889&lt;/mes:JMSTimestamp&gt;&lt;mes:Properties&gt;&lt;mes:property name="amount"&gt;&lt;mes:Float&gt;100.5&lt;/mes:Float&gt;&lt;/mes:property&gt;&lt;mes:property name="name"&gt;&lt;mes:String&gt;john.doe&lt;/mes:String&gt;&lt;/mes:property&gt;&lt;mes:property name="JMS_BEA_DeliveryTime"&gt;&lt;mes:Long&gt;1769206051889&lt;/mes:Long&gt;&lt;/mes:property&gt;&lt;mes:property name="JMSXDeliveryCount"&gt;&lt;mes:Int&gt;1&lt;/mes:Int&gt;&lt;/mes:property&gt;&lt;/mes:Properties&gt;&lt;/mes:Header&gt;&lt;/mes:WLJMSMessage&gt;> <> 
dave@dave:/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project$ 

Saturday, December 20, 2025

Weblogic 14.1.2 change logging date format pattern on system logs to YYYY-MM-DD

 

HOWTO

Customizing Domain Wide Server Parameters

To customize domain wide server parameters in WebLogic Server, configure setUserOverrides.cmd (Windows) or setUserOverrides.sh (UNIX) libraries by specifying the required Java command line options and environment variables to it.

Every domain includes dynamically generated domain and server startup scripts, such as setDomainEnv. Oracle recommends that you do not modify these startup scripts, as any changes you make to them will be overwritten during subsequent domain upgrade operations.

To enable you to customize server startup parameters that apply to the servers in a domain, there are two scripts that you can provide: setUserOverrides.cmd and setUserOverridesLate.cmd (Windows) or setUserOverrides.sh and setUserOverridesLate.sh (UNIX). The setUserOverrides script will be executed early in the setDomainEnv script, before any domain extension template properties have been set. The setUserOverridesLate script will be executed later after the domain extension template properties have been set. These scripts can be configured to, for example, add custom libraries to the WebLogic Server classpath, specify additional java command line options for running the servers, or specify additional environment variables. Any customizations you add to these files are preserved during domain upgrade operations and are carried over to remote servers when using the pack and unpack commands.

To assure your customizations effectively override all product defaults, add your customizations to the setUserOverridesLate script, otherwise your customizations may be overridden by product extensions when using setUserOverrides.

Log format pattern - set via Weblogic console or WLST



dave@dave:/app/domains/dave_domain$ grep -2  pattern  config/config.xml 
  </security-configuration>
  <log>
    <date-format-pattern>yyyy-MM-dd'T'HH:mm:ss,SSSz</date-format-pattern>
  </log>
  <server>
--
    </ssl>
    <log>
      <date-format-pattern>yyyy-MM-dd'T'HH:mm:ss,SSSz</date-format-pattern>
    </log>
    <listen-address></listen-address>


setUserOverrides.sh called from setDomainEnv.sh 

# Set user overrides, if available.

if [ -f ${DOMAIN_HOME}/bin/setUserOverrides.sh ] ; then
        . ${DOMAIN_HOME}/bin/setUserOverrides.sh
fi

Add into start script

#!/bin/sh

# WARNING: This file is created by the Configuration Wizard.
# Any changes to this script may be lost when adding extensions to this configuration.

DOMAIN_HOME="/app/domains/dave_domain"

export JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.util.logging.config.file=/app/domains/dave_domain/logging.properties"

${DOMAIN_HOME}/bin/startWebLogic.sh $*

Add logging.properties file for domain

dave@dave:~$ cat /app/domains/dave_domain/logging.properties
# WebLogic Unified Logging Configuration
# Forces all Java Util Logging to use WebLogic's log format

# Use WebLogic's log handler
handlers = weblogic.logging.ServerLoggingHandler

# Default logging level
.level = INFO

# Configure WebLogic handler to use the standard format
weblogic.logging.ServerLoggingHandler.level = INFO
weblogic.logging.ServerLoggingHandler.formatter = weblogic.logging.WLLogFormatter

# Subsystem-specific logging levels
weblogic.wsee.level = INFO
weblogic.wsee.runtime.level = INFO


Weblogic start log 


ave@dave:/app/domains/dave_domain$ ./startWebLogic.sh 
.
.
JAVA Memory arguments: -Xms256m -Xmx512m -XX:CompileThreshold=8000
.
CLASSPATH=/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/com.oracle.webservices.wls.wls-jaxrpc.jar::/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.jar:/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/thirdparty/ant-contrib-1.0b3.jar:/home/app/weblogic-14.1.2/wlserver/modules/features/oracle.wls.common.nodemanager.jar::/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbynet.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbytools.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyclient.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derby.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyshared.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyoptionaltools.jar
.
PATH=/app/domains/dave_domain/bin:/home/app/weblogic-14.1.2/wlserver/server/bin:/home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/apache-ant/bin:/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin:/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/app/weblogic/wit/imagetool/bin:/app/weblogic-deploy/bin/:/usr/java/jdk-21/bin:/usr/share/maven/bin:/opt/google:/opt/jmc/jmc-8.3.1_linux-x64/JDK_Mission_Control:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/app/weblogic/wit/imagetool/bin:/app/weblogic-deploy/bin/:/home/dave/.local/bin:/home/dave/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/snapd/snap/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
Starting WLS with line:
/usr/lib/jvm/jdk-21.0.5-oracle-x64/bin/java -server   -Xms256m -Xmx512m -XX:CompileThreshold=8000 -cp /home/app/weblogic-14.1.2/wlserver/server/lib/weblogic-launcher.jar -Dlaunch.use.env.classpath=true -Dweblogic.Name=AdminServer -Djava.security.policy=/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.policy  -Djava.util.logging.config.file=/app/domains/dave_domain/logging.properties -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader -Dweblogic.log.RedirectStdoutToServerLogEnabled=true -Dweblogic.log.StdoutSeverity=Info -Duser.language=en -Duser.country=US  -javaagent:/home/app/weblogic-14.1.2/wlserver/server/lib/debugpatch-agent.jar -da -Dwls.home=/home/app/weblogic-14.1.2/wlserver/server -Dweblogic.home=/home/app/weblogic-14.1.2/wlserver/server      weblogic.Server
[0.027s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.oracle.classloader.weblogic.LaunchClassLoader"). To use archived non-system classes, this property must not be set
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <JceConfig is unknown> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <FIPS compliant operation not available for configuration type OTHER> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Default> <BEA-000000> <JceConfig is in non-FIPS mode> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 21.0.5+9-LTS-239 from Oracle Corporation.> 
<Dec 21, 2025, 9:55:42 PM Central European Standard Time> <Info> <Management> <BEA-141107> <Version: WebLogic Server 14.1.2.0.0  Tue Nov 26 02:40:45 GMT 2024 2171472> 
<Dec 21, 2025, 9:55:43 PM Central European Standard Time> <Info> <Management> <BEA-141340> <Server starting with ProductionModeEnabled=false> 
<Dec 21, 2025, 9:55:43 PM Central European Standard Time> <Info> <Management> <BEA-141341> <Server starting with SecureModeEnabled=false> 
<Dec 21, 2025, 9:55:44 PM Central European Standard Time> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<Dec 21, 2025, 9:55:44 PM Central European Standard Time> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.> 
<2025-12-21T21:55:44,226CET> <Info> <WebLogicServer> <BEA-000214> <WebLogic Server "AdminServer" version:
WebLogic Server 14.1.2.0.0  Tue Nov 26 02:40:45 GMT 2024 2171472 Copyright (c) 1995,2024, Oracle and/or its affiliates. All rights reserved.> 
<2025-12-21T21:55:44,243CET> <Info> <Server> <BEA-002622> <The protocol "t3" is now configured.> 
<2025-12-21T21:55:44,243CET> <Info> <Server> <BEA-002622> <The protocol "t3s" is now configured.> 
<2025-12-21T21:55:44,244CET> <Info> <Server> <BEA-002622> <The protocol "http" is now configured.> 
<2025-12-21T21:55:44,245CET> <Info> <Server> <BEA-002622> <The protocol "https" is now configured.> 
<2025-12-21T21:55:44,246CET> <Info> <Server> <BEA-002622> <The protocol "iiop" is now configured.> 
<2025-12-21T21:55:44,246CET> <Info> <Server> <BEA-002622> <The protocol "iiops" is now configured.> 
<2025-12-21T21:55:44,247CET> <Info> <Server> <BEA-002622> <The protocol "ldap" is now configured.> 
<2025-12-21T21:55:44,248CET> <Info> <Server> <BEA-002622> <The protocol "ldaps" is now configured.> 
<2025-12-21T21:55:44,250CET> <Info> <Server> <BEA-002622> <The protocol "cluster" is now configured.> 
<2025-12-21T21:55:44,250CET> <Info> <Server> <BEA-002622> <The protocol "clusters" is now configured.> 
<2025-12-21T21:55:44,253CET> <Info> <Server> <BEA-002622> <The protocol "snmp" is now configured.> 
<2025-12-21T21:55:44,254CET> <Info> <Server> <BEA-002622> <The protocol "admin" is now configured.> 
<2025-12-21T21:55:44,254CET> <Info> <Server> <BEA-002624> <The administration protocol is "t3s" and is now configured.> 
<2025-12-21T21:55:44,291CET> <Info> <RJVM> <BEA-000570> <Network Configuration for Channel "AdminServer"
 Listen Address         :7001
 Public Address         N/A
 Http Enabled         true
 Tunneling Enabled     true
 Outbound Enabled     false
 Admin Traffic Enabled     true ResolveDNSName Enabled     false> 
<2025-12-21T21:55:44,291CET> <Info> <RJVM> <BEA-000570> <Network Configuration for Channel "AdminServer"
 Listen Address         :7002 (SSL)
 Public Address         N/A
 Http Enabled         true
 Tunneling Enabled     true
 Outbound Enabled     false
 Admin Traffic Enabled     true ResolveDNSName Enabled     false> 
<2025-12-21T21:55:44,333CET> <Info> <Server> <BEA-002609> <Channel Service initialized.> 
<2025-12-21T21:55:44,582CET> <Info> <XML> <BEA-130036> <Initializing XMLRegistry> 
<2025-12-21T21:55:44,599CET> <Info> <Socket> <BEA-000436> <Allocating 4 reader threads.> 
<2025-12-21T21:55:44,599CET> <Info> <Socket> <BEA-000446> <Native I/O enabled.> 
<2025-12-21T21:55:44,610CET> <Info> <Management> <BEA-141278> <Java entropy configuration is: System property "java.security.egd= null"; JRE's java.security file property "securerandom.source= file:/dev/random"; Blocking Config= true; JDK version= 21.0.5; Operating System= Linux.> 
<2025-12-21T21:55:44,611CET> <Info> <Management> <BEA-141279> <Detected BLOCKING java entropy configuration. This is the most secure setting, but may cause performance issues on machines with few sources of entropy.> 
<2025-12-21T21:55:44,611CET> <Info> <Management> <BEA-141187> <Java system properties are defined as follows: 
file.encoding = UTF-8
file.separator = /
java.class.path = /home/app/weblogic-14.1.2/wlserver/../oracle_common/modules/com.oracle.webservices.wls.wls-jaxrpc.jar:/home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.jar:/home/app/weblogic-14.1.2/wlserver/modules/features/oracle.wls.common.nodemanager.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbynet.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbytools.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyclient.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derby.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyshared.jar:/home/app/weblogic-14.1.2/wlserver/common/derby/lib/derbyoptionaltools.jar
java.class.version = 65.0
java.home = /usr/lib/jvm/jdk-21.0.5-oracle-x64
java.io.tmpdir = /tmp
java.library.path = ::/home/app/weblogic-14.1.2/wlserver/server/native/linux/x86_64:/home/app/weblogic-14.1.2/wlserver/server/native/linux/x86_64/oci920_8:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
java.naming.factory.url.pkgs = weblogic.jndi.factories:weblogic.corba.j2ee.naming.url:weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 21.0.5+9-LTS-239
java.security.policy = /home/app/weblogic-14.1.2/wlserver/server/lib/weblogic.policy
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 21
java.system.class.loader = com.oracle.classloader.weblogic.LaunchClassLoader
java.util.logging.config.file = /app/domains/dave_domain/logging.properties
java.vendor = Oracle Corporation
java.vendor.url = https://java.oracle.com/
java.vendor.url.bug = https://bugreport.java.com/bugreport/
java.version = 21.0.5
java.version.date = 2024-10-15
java.vm.compressedOopsMode = 32-bit
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 21
java.vm.vendor = Oracle Corporation
java.vm.version = 21.0.5+9-LTS-239
javax.management.builder.initial = weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
javax.rmi.CORBA.PortableRemoteObjectClass = weblogic.iiop.PortableRemoteObjectDelegateImpl
javax.rmi.CORBA.UtilClass = weblogic.iiop.UtilDelegateImpl
jdk.debug = release
launch.use.env.classpath = true
native.encoding = UTF-8
org.omg.CORBA.ORBClass = weblogic.corba.orb.ORB
org.omg.CORBA.ORBSingletonClass = weblogic.corba.orb.ORB
os.arch = amd64
os.name = Linux
os.version = 6.17.12-300.fc43.x86_64
path.separator = :
stderr.encoding = UTF-8
stdout.encoding = UTF-8
sun.arch.data.model = 64
sun.boot.library.path = /usr/lib/jvm/jdk-21.0.5-oracle-x64/lib
sun.cpu.endian = little
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = weblogic.Server
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
user.country = US
user.dir = /home/app/domains/dave_domain
user.home = /home/dave
user.language = en
user.name = dave
user.timezone = Europe/Prague
vde.home = /home/app/domains/dave_domain/servers/AdminServer/data/ldap
weblogic.Name = AdminServer
weblogic.home = /home/app/weblogic-14.1.2/wlserver/server
weblogic.log.RedirectStdoutToServerLogEnabled = true
weblogic.log.StdoutSeverity = Info
wls.home = /home/app/weblogic-14.1.2/wlserver/server
.> 
<Dec 21, 2025, 9:55:44,633 PM Central European Standard Time> <Notice> <LoggingService> <BEA-320400> <The log file /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms, such as Windows.> 
<Dec 21, 2025, 9:55:44,634 PM Central European Standard Time> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log00020. Log messages will continue to be logged in /home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log.> 
<2025-12-21T21:55:44,653CET> <Notice> <Log Management> <BEA-170019> <The server log file weblogic.logging.FileStreamHandler instance=323078282
Current log file=/home/app/domains/dave_domain/servers/AdminServer/logs/AdminServer.log
Rotation dir=/home/app/domains/dave_domain/servers/AdminServer/logs
 is opened. All server side log events will be written to this file.> 
<2025-12-21T21:55:44,659CET> <Info> <Log Management> <BEA-170023> <The Server Logging is initialized with Java Logging API implementation.> 
<2025-12-21T21:55:44,684CET> <Info> <Log Management> <BEA-170025> <Initialized Domain Logging. Domain log events will be written to /home/app/domains/dave_domain/servers/AdminServer/logs/dave_domain.log.> 
<2025-12-21T21:55:44,690CET> <Info> <IIOP> <BEA-002014> <IIOP subsystem enabled.> 
<2025-12-21T21:55:44,752CET> <Info> <Diagnostics> <BEA-320001> <The ServerDebug service initialized successfully.> 
<2025-12-21T21:55:44,846CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WLS_DIAGNOSTICS" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/data/store/diagnostics requestedWritePolicy="Disabled" fileLockingEnabled=false driver="wlfileio3".> 
<2025-12-21T21:55:44,866CET> <Info> <Store> <BEA-280103> <The persistent file store "WLS_DIAGNOSTICS" will cache in weblogic.store.io.file.direct.FileMapping[granularity=4096 io=mapped].> 
<2025-12-21T21:55:44,881CET> <Info> <Store> <BEA-280009> <The persistent file store "WLS_DIAGNOSTICS" (0b690f1c-259f-4179-b92b-1e7fb949e926) has been opened: blockSize=512 actualWritePolicy="Disabled(single-handle-non-direct)" explicitIOEnforced=false records=33.> 
<2025-12-21T21:55:45,092CET> <Notice> <Security> <BEA-090946> <Security pre-initializing using security realm: myrealm> 
<2025-12-21T21:55:45,100CET> <Info> <Security> <BEA-090909> <Using the configured custom SSL Hostname Verifier implementation: weblogic.security.utils.SSLWLSHostnameVerifier$NullHostnameVerifier.> 
<2025-12-21T21:55:45,247CET> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the pkcs12 keystore file /app/domains/dave_domain/security/DemoIdentity.p12.> 
<2025-12-21T21:55:45,451CET> <Info> <Security> <BEA-000000> <Starting OpenJPA 1.1.1> 
<2025-12-21T21:55:45,525CET> <Info> <Security> <BEA-000000> <StoreServiceImpl.initJDO - StoreService is initialized with Id = ldap_e4nPimS/9S88e4AguhAtdPpVgdI=> 
<2025-12-21T21:55:45,566CET> <Info> <Security> <BEA-090516> <The Authenticator provider has pre-existing LDAP data.> 
<2025-12-21T21:55:45,623CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the pkcs12 keystore file /app/domains/dave_domain/security/DemoTrust.p12.> 
<2025-12-21T21:55:45,643CET> <Notice> <Security> <BEA-090947> <Security post-initializing using security realm: myrealm> 
<2025-12-21T21:55:45,660CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /home/app/weblogic-14.1.2/wlserver/server/lib/DemoTrust.jks.> 
<2025-12-21T21:55:45,662CET> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /usr/lib/jvm/jdk-21.0.5-oracle-x64/lib/security/cacerts.> 
<2025-12-21T21:55:45,668CET> <Info> <WebLogicServer> <BEA-000307> <Exportable key maximum lifespan set to 500 uses.> 
<2025-12-21T21:55:45,774CET> <Info> <Security> <BEA-090516> <The Authorizer provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,010CET> <Info> <Security> <BEA-090516> <The CredentialMapper provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,017CET> <Info> <Security> <BEA-090516> <The RoleMapper provider has preexisting LDAP data.> 
<2025-12-21T21:55:47,129CET> <Notice> <Security> <BEA-090082> <Security initialized using administrative security realm: myrealm> 
<2025-12-21T21:55:47,320CET> <Info> <Connector> <BEA-190000> <Initializing Java EE Connector Service.> 
<2025-12-21T21:55:47,329CET> <Info> <Connector> <BEA-190001> <Java EE Connector Service initialized successfully.> 
<2025-12-21T21:55:47,368CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "_WLS_AdminServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/data/store/default requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:47,387CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.runtime.> 
<2025-12-21T21:55:47,469CET> <Info> <JMS> <BEA-040305> <JMS service is initialized and in standby mode.> 
<2025-12-21T21:55:47,514CET> <Info> <JMS> <BEA-040090> <Deployed 8 default connection factories.> 
<2025-12-21T21:55:47,517CET> <Info> <messaging.interception> <BEA-400000> <Initializing message interception service.> 
<2025-12-21T21:55:47,521CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultConnectionFactory" with its JNDI name "weblogic.jms.ConnectionFactory" is started.> 
<2025-12-21T21:55:47,522CET> <Info> <JMS> <BEA-040407> <Default connection factory "TopicConnectionFactory" with its JNDI name "javax.jms.TopicConnectionFactory" is started.> 
<2025-12-21T21:55:47,522CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory1" with its JNDI name "weblogic.jms.XAConnectionFactory1" is started.> 
<2025-12-21T21:55:47,523CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory0" with its JNDI name "weblogic.jms.XAConnectionFactory0" is started.> 
<2025-12-21T21:55:47,523CET> <Info> <JMS> <BEA-040407> <Default connection factory "PlatformDefaultConnectionFactory" with its JNDI name "weblogic.jms.DefaultConnectionFactory" is started.> 
<2025-12-21T21:55:47,524CET> <Info> <JMS> <BEA-040407> <Default connection factory "QueueConnectionFactory" with its JNDI name "javax.jms.QueueConnectionFactory" is started.> 
<2025-12-21T21:55:47,527CET> <Info> <JMS> <BEA-040407> <Default connection factory "MessageDrivenBeanConnectionFactory" with its JNDI name "weblogic.jms.MessageDrivenBeanConnectionFactory" is started.> 
<2025-12-21T21:55:47,531CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory" with its JNDI name "weblogic.jms.XAConnectionFactory" is started.> 
<2025-12-21T21:55:47,532CET> <Info> <JMS> <BEA-040407> <Default connection factory "DefaultXAConnectionFactory2" with its JNDI name "weblogic.jms.XAConnectionFactory2" is started.> 
<2025-12-21T21:55:47,533CET> <Info> <JMS> <BEA-040306> <JMS service is active now.> 
<2025-12-21T21:55:47,583CET> <Info> <Store> <BEA-280009> <The persistent file store "_WLS_AdminServer" (78fff7ef-2dfc-438c-b24e-00fc9e8d8802) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=19.> 
<2025-12-21T21:55:47,657CET> <Info> <JDBC> <BEA-001135> <Initializing the JDBC service.> 
<2025-12-21T21:55:47,686CET> <Info> <JDBC> <BEA-001137> <Initialization complete.> 
<2025-12-21T21:55:47,686CET> <Info> <JDBC> <BEA-001138> <Resuming the JDBC service.> 
<2025-12-21T21:55:47,687CET> <Info> <JDBC> <BEA-001140> <Resume complete.> 
<2025-12-21T21:55:47,722CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.domainruntime.> 
<2025-12-21T21:55:47,744CET> <Info> <HTTP> <BEA-101128> <Initializing HTTP services.> 
<2025-12-21T21:55:47,758CET> <Info> <HTTP> <BEA-101135> <AdminServer is the default Web server.> 
<2025-12-21T21:55:47,758CET> <Info> <HTTP> <BEA-101052> <[HttpServer (defaultWebserver) name: AdminServer] Initialized> 
<2025-12-21T21:55:47,767CET> <Info> <HTTP> <BEA-101129> <Initializing the Web application container.> 
<2025-12-21T21:55:47,782CET> <Info> <Server> <BEA-002622> <The protocol "[admin, iiops, snmp, ldaps, cluster-broadcast-secure, iiop, t3s, ldap, cluster-broadcast, http, https, t3]" is now configured.> 
<2025-12-21T21:55:47,836CET> <Notice> <JMX> <BEA-149512> <JMX Connector Server started at service:jmx:iiop://192.168.0.115:7001/jndi/weblogic.management.mbeanservers.edit.> 
<2025-12-21T21:55:47,958CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "bea_wls_internal"> 
<2025-12-21T21:55:47,960CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "bea_wls_internal"> 
<2025-12-21T21:55:48,168CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="bea_wls_internal")> 
<2025-12-21T21:55:48,176CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="bea_wls_internal")> 
<2025-12-21T21:55:48,180CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="bea_wls_internal", workmanager="default")> 
<2025-12-21T21:55:48,182CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="bea_wls_internal", workmanager="default")> 
<2025-12-21T21:55:49,334CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.> 
<2025-12-21T21:55:49,334CET> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.> 
<2025-12-21T21:55:49,376CET> <Notice> <Log Management> <BEA-170036> <The Logging monitoring service timer has started to check for logged message counts every 30 seconds.> 
<2025-12-21T21:55:49,378CET> <Info> <Log Management> <BEA-170031> <The Server Logging bridge has initialized successfully.> 
<2025-12-21T21:55:49,383CET> <Info> <SAFService> <BEA-281003> <The SAF service has been initialized.> 
<2025-12-21T21:55:49,384CET> <Info> <SAFService> <BEA-281002> <The SAF service has been started.> 
<2025-12-21T21:55:49,407CET> <Info> <Deployer> <BEA-149209> <The Slave Deployer is resuming.> 
<2025-12-21T21:55:49,495CET> <Info> <EJB> <BEA-015076> <EJB module [mejb.jar] created.> 
<2025-12-21T21:55:49,572CET> <Info> <SAFService> <BEA-281007> <SAF Agent "ReliableWseeJaxwsSAFAgent@AdminServer" has been successfully prepared.> 
<2025-12-21T21:55:49,577CET> <Info> <SAFService> <BEA-281007> <SAF Agent "ReliableWseeSAFAgent@AdminServer" has been successfully prepared.> 
<2025-12-21T21:55:49,604CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:49,873CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeFileStore" (fa105a8a-d3e8-4dbb-bd63-c410031063bc) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=21.> 
<2025-12-21T21:55:49,906CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJaxwsFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeJaxwsFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,197CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeJaxwsFileStore" (717f6ab0-a7a9-410a-b219-1ac90f21ba29) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=23.> 
<2025-12-21T21:55:50,217CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeSoapjmsFileStore" for recovery: directory=/home/app/domains/dave_domain/WseeSoapjmsFileStore requestedWritePolicy="Direct-Write" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,495CET> <Info> <Store> <BEA-280009> <The persistent file store "WseeSoapjmsFileStore" (464fe2f7-c512-411b-8b85-dbd36491586f) has been opened: blockSize=512 actualWritePolicy="Direct-Write(read-buffered)" explicitIOEnforced=false records=11.> 
<2025-12-21T21:55:50,508CET> <Info> <JMS> <BEA-040321> <JMSServer "ReliableWseeJaxwsSAFAgent" is resuming.> 
<2025-12-21T21:55:50,536CET> <Info> <Messaging> <BEA-282003> <The messaging kernel ReliableWseeJaxwsSAFAgent will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,541CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "ReliableWseeJaxwsSAFAgent" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,548CET> <Info> <Messaging> <BEA-282001> <The messaging kernel ReliableWseeJaxwsSAFAgent is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,554CET> <Info> <Messaging> <BEA-282002> <The messaging kernel ReliableWseeJaxwsSAFAgent has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,570CET> <Info> <SAFService> <BEA-281008> <SAF Agent "ReliableWseeJaxwsSAFAgent@AdminServer" has been successfully activated.> 
<2025-12-21T21:55:50,573CET> <Info> <JMS> <BEA-040321> <JMSServer "ReliableWseeSAFAgent" is resuming.> 
<2025-12-21T21:55:50,574CET> <Info> <Messaging> <BEA-282003> <The messaging kernel ReliableWseeSAFAgent will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,579CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "ReliableWseeSAFAgent" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,580CET> <Info> <Messaging> <BEA-282001> <The messaging kernel ReliableWseeSAFAgent is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,584CET> <Info> <Messaging> <BEA-282002> <The messaging kernel ReliableWseeSAFAgent has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,588CET> <Info> <SAFService> <BEA-281008> <SAF Agent "ReliableWseeSAFAgent@AdminServer" has been successfully activated.> 
<2025-12-21T21:55:50,590CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeJaxwsJmsServer" is resuming.> 
<2025-12-21T21:55:50,590CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeJaxwsJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,596CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJaxwsJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,597CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeJaxwsJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,609CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeJaxwsJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,618CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeJmsServer" is resuming.> 
<2025-12-21T21:55:50,618CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,622CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,623CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,631CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,634CET> <Info> <JMS> <BEA-040321> <JMSServer "WseeSoapjmsJmsServer" is resuming.> 
<2025-12-21T21:55:50,635CET> <Info> <Messaging> <BEA-282003> <The messaging kernel WseeSoapjmsJmsServer will use up to 178,956,970 bytes of memory before paging begins.> 
<2025-12-21T21:55:50,639CET> <Info> <Store> <BEA-280008> <Opening the persistent file store "WseeSoapjmsJmsServer" for recovery: directory=/home/app/domains/dave_domain/servers/AdminServer/tmp requestedWritePolicy="Non-Durable" fileLockingEnabled=true driver="wlfileio3".> 
<2025-12-21T21:55:50,640CET> <Info> <Messaging> <BEA-282001> <The messaging kernel WseeSoapjmsJmsServer is beginning recovery of its persistent state.> 
<2025-12-21T21:55:50,645CET> <Info> <Messaging> <BEA-282002> <The messaging kernel WseeSoapjmsJmsServer has recovered 0 persistent messages.> 
<2025-12-21T21:55:50,655CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJaxwsJmsModule"> 
<2025-12-21T21:55:50,655CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJaxwsJmsModule"> 
<2025-12-21T21:55:50,700CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeJaxwsJmsModule")> 
<2025-12-21T21:55:50,700CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeJaxwsJmsModule")> 
<2025-12-21T21:55:50,702CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeJaxwsJmsModule", workmanager="default")> 
<2025-12-21T21:55:50,703CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeJaxwsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,069CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJmsModule"> 
<2025-12-21T21:55:51,070CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeJmsModule"> 
<2025-12-21T21:55:51,079CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeJmsModule")> 
<2025-12-21T21:55:51,080CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeJmsModule")> 
<2025-12-21T21:55:51,080CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,081CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,121CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "WseeSoapjmsJmsModule"> 
<2025-12-21T21:55:51,122CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "WseeSoapjmsJmsModule"> 
<2025-12-21T21:55:51,130CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="WseeSoapjmsJmsModule")> 
<2025-12-21T21:55:51,131CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="WseeSoapjmsJmsModule")> 
<2025-12-21T21:55:51,131CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="WseeSoapjmsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,132CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="WseeSoapjmsJmsModule", workmanager="default")> 
<2025-12-21T21:55:51,171CET> <Info> <JMS> <BEA-040108> <User connection factory "WseeSoapjmsJmsModule!com.oracle.webservices.api.jms.ConnectionFactory" is started.> 
<2025-12-21T21:55:51,185CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "state-management-provider-memory-rar"> 
<2025-12-21T21:55:51,185CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "state-management-provider-memory-rar"> 
<2025-12-21T21:55:51,188CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.jaxws.mdb.DispatchPolicy" WorkManagerMBean for application "basicWebappEjb"> 
<2025-12-21T21:55:51,189CET> <Info> <WorkManager> <BEA-002903> <Creating Work Manager from "weblogic.wsee.mdb.DispatchPolicy" WorkManagerMBean for application "basicWebappEjb"> 
<2025-12-21T21:55:51,270CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="basicWebappEjb")> 
<2025-12-21T21:55:51,270CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="basicWebappEjb")> 
<2025-12-21T21:55:51,271CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="basicWebappEjb", workmanager="default")> 
<2025-12-21T21:55:51,272CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="basicWebappEjb", workmanager="default")> 
<2025-12-21T21:55:51,275CET> <Info> <CONCURRENCY> <BEA-2162601> <Creating ContextService "DefaultContextService" (module="null", application="state-management-provider-memory-rar")> 
<2025-12-21T21:55:51,275CET> <Info> <CONCURRENCY> <BEA-2162600> <Creating ManagedThreadFactory "DefaultManagedThreadFactory" (module="null", application="state-management-provider-memory-rar")> 
<2025-12-21T21:55:51,276CET> <Info> <CONCURRENCY> <BEA-2162610> <Creating ManagedExecutorService "DefaultManagedExecutorService" (module="null", application="state-management-provider-memory-rar", workmanager="default")> 
<2025-12-21T21:55:51,277CET> <Info> <CONCURRENCY> <BEA-2162611> <Creating ManagedScheduledExecutorService "DefaultManagedScheduledExecutorService" (module="null", application="state-management-provider-memory-rar", workmanager="default")> 


Wednesday, November 5, 2025

Weblogic 14.1.2 EJB client with JNDI lookup

 HOWTO



Git


Blog

 

 Add t3 client  

dependency>
    <groupId>com.oracle.weblogic</groupId>
    <artifactId>wlthint3client</artifactId>
    <version>14.1.2-0-0</version>
</dependency>

JNDI names

     java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote

Trying JNDI name: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
✓ Successfully looked up AccountManagerRemote EJB at: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
Depositing $100.5 to account: john.doe

EJB

package dave.service;

import javax.ejb.Stateless;
import javax.ejb.Remote;
import javax.ejb.Local;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.annotation.sql.DataSourceDefinition;

import dave.entity.Account;

/**
 * Option 1: Use name attribute to define the EJB name
 * The JNDI name will be: java:global/<app-name>/<ejb-name>!<interface>
 * 
 * Option 2: Use mappedName for explicit JNDI binding (WebLogic-specific)
 * mappedName = "ejb/AccountManager"
 */
@Stateless(name = "AccountManagerEJB")
@Local(AccountManager.class)
@Remote(AccountManagerRemote.class)
//Data Source defined for JPA. It assume the derby database is started up and listen to localhost:1527
@DataSourceDefinition(name = "java:module/env/mavenArchetypeDataSource", className = "org.apache.derby.jdbc.ClientXADataSource", portNumber = 1527, serverName = "localhost", databaseName = "examples", user = "examples", password = "examples", properties={"create=true", "weblogic.TestTableName=SQL SELECT 1 FROM SYS.SYSTABLES"})
public class AccountManagerImpl implements AccountManager, AccountManagerRemote {

  @PersistenceContext
  private EntityManager em;
  
  public void depositOnAccount(String name, float amount) {
    Account account = em.find(Account.class, name);
    if (account == null) {
      account = new Account();
      account.setName(name);
    }
    account.setAmount(account.getAmount() + amount);
    em.persist(account);
  }
  
  public Account findAccount(String name) {
    return em.find(Account.class, name);
  }
}

JNDI EJB client

/**
 * External Java EJB Client for AccountManager
 */
package dave.client;

import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import dave.service.AccountManagerRemote;
import dave.entity.Account;

public class AccountManagerClient {

    private static final String WEBLOGIC_JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory";
    private static final String PROVIDER_URL = "t3://localhost:7001";
    
    /**
     * JNDI lookup patterns for WebLogic:
     * 
     * Pattern 1 (Portable Global JNDI):
     * java:global/<app-name>/<module-name>/<bean-name>!<fully-qualified-interface-name>
     * Example: java:global/basicWebappEjb/AccountManagerImpl!dave.service.AccountManagerRemote
     * 
     * Pattern 2 (WebLogic-specific):
     * <ejb-name>#<fully-qualified-interface-name>
     * Example: AccountManagerImpl#dave.service.AccountManagerRemote
     * 
     * Pattern 3 (Application-scoped):
     * java:app/<module-name>/<bean-name>!<fully-qualified-interface-name>
     */
    // Multiple JNDI names to try - WebLogic registers EJBs with multiple patterns
    private static final String[] JNDI_NAMES = {
        // Using custom name="AccountManagerEJB"
        "java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote",
        "java:global/basicWebappEjb/AccountManagerEJB",
        // Fallback to default names
        "java:global/basicWebappEjb/AccountManagerImpl!dave.service.AccountManagerRemote",
        "java:global/basicWebappEjb/AccountManagerImpl",
        "basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote",
        "ejb/AccountManager#dave.service.AccountManagerRemote"
    };
    
    public static void main(String[] args) {
        AccountManagerClient client = new AccountManagerClient();
        try {
            client.testEJB();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
    public void testEJB() throws NamingException {
        Context context = null;
        try {
            // Get initial context
            context = getInitialContext();
            
            // Try multiple JNDI names
            AccountManagerRemote accountManager = null;
            String successfulJndiName = null;
            
            for (String jndiName : JNDI_NAMES) {
                try {
                    System.out.println("Trying JNDI name: " + jndiName);
                    accountManager = (AccountManagerRemote) context.lookup(jndiName);
                    successfulJndiName = jndiName;
                    System.out.println("✓ Successfully looked up AccountManagerRemote EJB at: " + jndiName);
                    break;
                } catch (NamingException e) {
                    System.out.println("✗ Failed: " + e.getMessage());
                }
            }
            
            if (accountManager == null) {
                throw new NamingException("Could not find EJB with any of the attempted JNDI names");
            }
            
            // Test deposit
            String accountName = "john.doe";
            float depositAmount = 100.50f;
            
            System.out.println("Depositing $" + depositAmount + " to account: " + accountName);
            accountManager.depositOnAccount(accountName, depositAmount);
            
            // Test find
            Account account = accountManager.findAccount(accountName);
            if (account != null) {
                System.out.println("Account found: " + account.getName() + 
                                   ", Balance: $" + account.getAmount());
            } else {
                System.out.println("Account not found");
            }
            
        } finally {
            if (context != null) {
                try {
                    context.close();
                } catch (NamingException e) {
                    e.printStackTrace();
                }
            }
        }
    }
    
    /**
     * Create InitialContext for WebLogic Server
     */
    private Context getInitialContext() throws NamingException {
        Hashtable<String, String> env = new Hashtable<>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, WEBLOGIC_JNDI_FACTORY);
        env.put(Context.PROVIDER_URL, PROVIDER_URL);
        
        // Add credentials - required for WebLogic security
        env.put(Context.SECURITY_PRINCIPAL, "weblogic");
        env.put(Context.SECURITY_CREDENTIALS, "weblogic123");
        
        return new InitialContext(env);
    }
}

Run client from Maven 


dave@fedora:/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project$ mvn compile exec:java -Dexec.mainClass="./src/main/java/dave/client/AccountManagerClient.java"
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/3.1.0/exec-maven-plugin-3.1.0.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/3.1.0/exec-maven-plugin-3.1.0.pom (14 kB at 24 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/69/mojo-parent-69.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/69/mojo-parent-69.pom (35 kB at 569 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/3.1.0/exec-maven-plugin-3.1.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/3.1.0/exec-maven-plugin-3.1.0.jar (73 kB at 982 kB/s)
[INFO] 
[INFO] -----------------&lt; dave:dave-basic-webapp-ejb-project &gt;-----------------
[INFO] Building basicWebappEjb 1.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ dave-basic-webapp-ejb-project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:2.3.2:compile (default-compile) @ dave-basic-webapp-ejb-project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec:3.1.0:java (default-cli) @ dave-basic-webapp-ejb-project ---
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.pom (11 kB at 200 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom (58 kB at 1.2 MB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar (54 kB at 990 kB/s)
Trying JNDI name: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
✓ Successfully looked up AccountManagerRemote EJB at: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
Depositing $100.5 to account: john.doe


Running with debug

directory /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/src/main/resources
excludes []
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 1 resource from src/main/resources to target/classes
[DEBUG] Copying file META-INF/persistence.xml
[DEBUG] file persistence.xml has a filtered file extension
[DEBUG] Using 'null' encoding to copy filtered resource 'persistence.xml'.
[DEBUG] copy /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/src/main/resources/META-INF/persistence.xml to /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes/META-INF/persistence.xml
[DEBUG] no user filter components
[INFO] 
[INFO] --- compiler:2.3.2:compile (default-compile) @ dave-basic-webapp-ejb-project ---
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for codehaus.snapshots (http://snapshots.repository.codehaus.org).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for snapshots (http://snapshots.maven.codehaus.org/maven2).
[DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for central (http://repo1.maven.org/maven2).
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=227695, ConflictMarker.markTime=109858, ConflictMarker.nodeCount=101, ConflictIdSorter.graphTime=103733, ConflictIdSorter.topsortTime=20479, ConflictIdSorter.conflictIdCount=27, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1003151, ConflictResolver.conflictItemCount=49, DfDependencyCollector.collectTime=66446805, DfDependencyCollector.transformTime=1481816}
[DEBUG] org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2
[DEBUG]    org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-artifact:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-core:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-settings:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-profile:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-model:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-error-diagnostics:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-project:jar:2.0.6:compile
[DEBUG]          org.apache.maven:maven-plugin-registry:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-plugin-descriptor:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0.6:compile
[DEBUG]       org.apache.maven:maven-monitor:jar:2.0.6:compile
[DEBUG]    org.apache.maven:maven-toolchain:jar:1.0:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:2.0.5:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-api:jar:1.8.1:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1:compile
[DEBUG]    org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1:runtime
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2
[DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2
[DEBUG]   Included: org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:2.0.5
[DEBUG]   Included: org.codehaus.plexus:plexus-compiler-api:jar:1.8.1
[DEBUG]   Included: org.codehaus.plexus:plexus-compiler-manager:jar:1.8.1
[DEBUG]   Included: org.codehaus.plexus:plexus-compiler-javac:jar:1.8.1
[DEBUG] Loading mojo org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-compiler-plugin:2.3.2, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27]
[DEBUG] Configuring mojo execution 'org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile:default-compile' with basic configurator -->
[DEBUG]   (f) basedir = /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project
[DEBUG]   (f) buildDirectory = /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target
[DEBUG]   (f) classpathElements = [/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes, /home/dave/.m2/repository/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar, /app/weblogic/weblogic-14.1.2/wlserver/server/lib/wlthint3client.jar, /app/weblogic/weblogic-14.1.2/wlserver/server/lib/weblogic.jar]
[DEBUG]   (f) compileSourceRoots = [/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/src/main/java]
[DEBUG]   (f) compilerId = javac
[DEBUG]   (f) debug = true
[DEBUG]   (f) failOnError = true
[DEBUG]   (f) fork = false
[DEBUG]   (f) generatedSourcesDirectory = /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/generated-sources/annotations
[DEBUG]   (f) optimize = false
[DEBUG]   (f) outputDirectory = /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes
[DEBUG]   (f) outputFileName = basicWebappEjb
[DEBUG]   (f) projectArtifact = dave:dave-basic-webapp-ejb-project:war:1.0-SNAPSHOT
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@588307f7
[DEBUG]   (f) showDeprecation = false
[DEBUG]   (f) showWarnings = false
[DEBUG]   (f) source = 1.8
[DEBUG]   (f) staleMillis = 0
[DEBUG]   (f) target = 1.8
[DEBUG]   (f) verbose = false
[DEBUG] -- end configuration --
[DEBUG] Using compiler 'javac'.
[DEBUG] Source directories: [/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/src/main/java]
[DEBUG] Classpath: [/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes
 /home/dave/.m2/repository/javax/javaee-web-api/6.0/javaee-web-api-6.0.jar
 /app/weblogic/weblogic-14.1.2/wlserver/server/lib/wlthint3client.jar
 /app/weblogic/weblogic-14.1.2/wlserver/server/lib/weblogic.jar]
[DEBUG] Output directory: /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- exec:3.1.0:java (default-cli) @ dave-basic-webapp-ejb-project ---
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=23194, ConflictMarker.markTime=30654, ConflictMarker.nodeCount=4, ConflictIdSorter.graphTime=5608, ConflictIdSorter.topsortTime=10155, ConflictIdSorter.conflictIdCount=4, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=144167, ConflictResolver.conflictItemCount=4, DfDependencyCollector.collectTime=11120279, DfDependencyCollector.transformTime=226745}
[DEBUG] org.codehaus.mojo:exec-maven-plugin:jar:3.1.0
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.4.2:compile
[DEBUG]    org.codehaus.plexus:plexus-component-annotations:jar:2.1.1:compile (optional)
[DEBUG]    org.apache.commons:commons-exec:jar:1.3:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0
[DEBUG]   Included: org.codehaus.mojo:exec-maven-plugin:jar:3.1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.4.2
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:2.1.1
[DEBUG]   Included: org.apache.commons:commons-exec:jar:1.3
[DEBUG] Loading mojo org.codehaus.mojo:exec-maven-plugin:3.1.0:java from plugin realm ClassRealm[plugin>org.codehaus.mojo:exec-maven-plugin:3.1.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27]
[DEBUG] Configuring mojo execution 'org.codehaus.mojo:exec-maven-plugin:3.1.0:java:default-cli' with basic configurator -->
[DEBUG]   (f) addOutputToClasspath = true
[DEBUG]   (f) addResourcesToClasspath = false
[DEBUG]   (f) additionalClasspathElements = [/app/weblogic/weblogic-14.1.2/wlserver/server/lib/wlthint3client.jar]
[DEBUG]   (f) arguments = []
[DEBUG]   (f) classpathScope = runtime
[DEBUG]   (f) cleanupDaemonThreads = false
[DEBUG]   (f) daemonThreadJoinTimeout = 15000
[DEBUG]   (f) includePluginDependencies = false
[DEBUG]   (f) includeProjectDependencies = true
[DEBUG]   (f) keepAlive = false
[DEBUG]   (f) killAfter = -1
[DEBUG]   (f) mainClass = dave.client.AccountManagerClient
[DEBUG]   (f) pluginDependencies = [org.codehaus.mojo:exec-maven-plugin:maven-plugin:3.1.0:, org.codehaus.plexus:plexus-utils:jar:3.4.2:compile, org.codehaus.plexus:plexus-component-annotations:jar:2.1.1:compile, org.apache.commons:commons-exec:jar:1.3:compile]
[DEBUG]   (f) preloadCommonPool = 0
[DEBUG]   (f) project = MavenProject: dave:dave-basic-webapp-ejb-project:1.0-SNAPSHOT @ /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/pom.xml
[DEBUG]   (f) session = org.apache.maven.execution.MavenSession@588307f7
[DEBUG]   (f) skip = false
[DEBUG]   (f) stopUnresponsiveDaemonThreads = false
[DEBUG] -- end configuration --
[DEBUG] Invoking : dave.client.AccountManagerClient.main()
[DEBUG] Plugin Dependencies will be excluded.
[DEBUG] Project Dependencies will be included.
[DEBUG] Collected project artifacts []
[DEBUG] Collected project classpath [/git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes]
[DEBUG] Adding to classpath : /git/weblogic/dave-basic-project-14.1.2/dave-basic-webapp-ejb-project/target/classes
[DEBUG] Adding additional classpath element: /app/weblogic/weblogic-14.1.2/wlserver/server/lib/wlthint3client.jar to classpath
[DEBUG] joining on thread Thread[#34,dave.client.AccountManagerClient.main(),5,dave.client.AccountManagerClient]
Trying JNDI name: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
✓ Successfully looked up AccountManagerRemote EJB at: java:global/basicWebappEjb/AccountManagerEJB!dave.service.AccountManagerRemote
Depositing $100.5 to account: john.doe


Check JNDI in remote Weblogic 14.1.2 console