Wednesday, May 18, 2022

Disable Spring DEBUG in log4j2 logs on Weblogic

HOWTO 

 

There is dump of all environment variables in Weblogic log due to Spring initialization

2022-05-12 14:13:43,673;DEBUG;com.bea.core.repackaged.springframework.core.env.AbstractEnvironment;<init>();125;Initialized StandardEnvironment with PropertySources

 

To remove it add logger for com.bea.core.repackaged.springframework into log4j.xml file

    <logger name="com.bea.core.repackaged.springframework" additivity="false">
        <level value="error" />
        <appender-ref ref="some-appender"/>
    </logger>

 

Check in Weblogic logs

weblogic.log:<May 18, 2022 10:24:09,804 AM CEST> <Notice> <Stdout> <BEA-000000> <2022-05-18 10:24:09,804 [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' DEBUG Level value for com.bea.core.repackaged.springframework is [error].>
weblogic.log:<May 18, 2022 10:24:09,804 AM CEST> <Notice> <Stdout> <BEA-000000> <2022-05-18 10:24:09,804 [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' DEBUG com.bea.core.repackaged.springframework level set to ERROR>

Sunday, April 3, 2022

Running JSF 1.1 application on Weblogic 12.2.1.4 with latest patches

 HOWTO

 

javax.faces.FacesException: Expression Error: Named Object: not found 

 

Web app configuration files - placed into WEB-INF

  • faces-config.xml - JSF specific
  • web.xml - web app
  • weblogic.xml - app server specific

Debug compiled JSP pages - use keepgenerated in weblogic.xml to see produced Java code

jsp-descriptor https://docs.oracle.com/cd/E11035_01/wls100/webapp/weblogic_xml.html#wp1038491 

 


working-dir
internally generated directory
The name of a directory where WebLogic Server saves the generated Java and compiled class files for a JSP.

keepgenerated
false
Saves the Java files that are generated as an intermediary step in the JSP compilation process. Unless this parameter is set to true, the intermediate Java files are deleted after they are compiled.

TLD files - add custom files into WEB-INF

<%@ taglib uri="/WEB-INF/tags/customTags.tld"  prefix="tt"%>

 

Faces config - add custom files in faces-config.xml

  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/custom-config.xml,/WEB-INF/other-custom-config.xml
   </param-value>
  </init-param>

Java EE: XML Schemas for Java EE Deployment Descriptors

 Java EE: XML Schemas for Java EE Deployment Descriptors


- Java EE 8 Schema Resources
- Java EE 7 Schema Resources
- Java EE 6 Schema Resources
- Java EE 5 Schema Resources
- J2EE 1.4 XML Schemas
- J2EE 1.3 DTDs
- J2EE 1.2 DTDs

 

Monday, March 21, 2022

Create GihHub Action with Maven build

HOWTO

 

GitHub

  •  https://github.com/dveselka/java-tutorial/tree/master/.github/workflows

 

Workflow file

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v2
      with:
        java-version: '11'
        distribution: 'temurin'
        cache: maven
    - name: Build with Maven
      run: mvn -B package --file pom.xml

 

Run list


 Job detail


 


Wednesday, March 16, 2022

JDK 11 - garbage collector logging

 HOWTO

 

 

GitHub 

* test class  https://github.com/dveselka/java-tutorial/blob/master/src/main/java/gc/LogGC.java

 

GC logs with  timestamp -Xlog:gc*::time

[2022-03-16T22:30:42.734+0100] GC(30) Pause Full (G1 Compaction Pause)
[2022-03-16T22:30:42.734+0100] GC(30) Phase 1: Mark live objects
[2022-03-16T22:30:43.663+0100] GC(30) Phase 1: Mark live objects 929.512ms
[2022-03-16T22:30:43.663+0100] GC(30) Phase 2: Prepare for compaction
[2022-03-16T22:30:43.941+0100] GC(30) Phase 2: Prepare for compaction 277.577ms
[2022-03-16T22:30:43.941+0100] GC(30) Phase 3: Adjust pointers
[2022-03-16T22:30:44.372+0100] GC(30) Phase 3: Adjust pointers 430.642ms
[2022-03-16T22:30:44.372+0100] GC(30) Phase 4: Compact heap
[2022-03-16T22:30:44.748+0100] GC(30) Phase 4: Compact heap 375.878ms
[2022-03-16T22:30:44.751+0100] GC(30) Eden regions: 0->0(99)
[2022-03-16T22:30:44.751+0100] GC(30) Survivor regions: 0->0(13)
[2022-03-16T22:30:44.751+0100] GC(30) Old regions: 1541->1539
[2022-03-16T22:30:44.751+0100] GC(30) Archive regions: 0->0
[2022-03-16T22:30:44.751+0100] GC(30) Humongous regions: 129->129
[2022-03-16T22:30:44.751+0100] GC(30) Metaspace: 3704K(3904K)->3704K(3904K) NonClass: 3407K(3520K)->3407K(3520K) Class: 297K(384K)->297K(384K)
[2022-03-16T22:30:44.751+0100] GC(30) Pause Full (G1 Compaction Pause) 3331M->3330M(3964M) 2017.026ms
[2022-03-16T22:30:44.751+0100] GC(30) User=15.35s Sys=0.02s Real=2.02s
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Rebuild Remembered Sets 3586.878ms
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Mark Abort
[2022-03-16T22:30:44.751+0100] GC(17) Concurrent Mark Cycle 5637.293ms
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.HashMap.resize(HashMap.java:702)
    at java.base/java.util.HashMap.putVal(HashMap.java:661)
    at java.base/java.util.HashMap.put(HashMap.java:610)
    at gc.LogGC.main(LogGC.java:15)
[2022-03-16T22:30:44.755+0100] Heap
[2022-03-16T22:30:44.755+0100]  garbage-first heap   total 4059136K, used 3412405K [0x0000000708400000, 0x0000000800000000)
[2022-03-16T22:30:44.755+0100]   region size 2048K, 1 young (2048K), 0 survivors (0K)
[2022-03-16T22:30:44.755+0100]  Metaspace       used 3801K, committed 3968K, reserved 1056768K
[2022-03-16T22:30:44.755+0100]   class space    used 307K, committed 384K, reserved 1048576K

GC logs with -Xlog:gc*

[0.002s][warning][logging] Output options for existing outputs are ignored.
[0.016s][info   ][gc     ] Using G1
[0.019s][info   ][gc,init] Version: 17.0.1+12 (release)
[0.019s][info   ][gc,init] CPUs: 8 total, 8 available
[0.019s][info   ][gc,init] Memory: 15849M
[0.019s][info   ][gc,init] Large Page Support: Disabled
[0.019s][info   ][gc,init] NUMA Support: Disabled
[0.019s][info   ][gc,init] Compressed Oops: Enabled (Zero based)
[0.019s][info   ][gc,init] Heap Region Size: 2M
[0.019s][info   ][gc,init] Heap Min Capacity: 8M
[0.019s][info   ][gc,init] Heap Initial Capacity: 248M
[0.019s][info   ][gc,init] Heap Max Capacity: 3964M
[0.019s][info   ][gc,init] Pre-touch: Disabled
[0.019s][info   ][gc,init] Parallel Workers: 8
[0.019s][info   ][gc,init] Concurrent Workers: 2
[0.019s][info   ][gc,init] Concurrent Refinement Workers: 8
[0.019s][info   ][gc,init] Periodic GC: Disabled


[4.399s][info][gc,heap     ] GC(31) Survivor regions: 12->12(12)
[4.399s][info][gc,heap     ] GC(31) Old regions: 1535->1563
[4.399s][info][gc,heap     ] GC(31) Archive regions: 0->0
[4.399s][info][gc,heap     ] GC(31) Humongous regions: 244->244
[4.399s][info][gc,metaspace] GC(31) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.399s][info][gc          ] GC(31) Pause Young (Normal) (G1 Preventive Collection) 3632M->3637M(3716M) 34.114ms
[4.399s][info][gc,cpu      ] GC(31) User=0.23s Sys=0.01s Real=0.04s
[4.407s][info][gc,start    ] GC(32) Pause Young (Normal) (G1 Preventive Collection)
[4.407s][info][gc,task     ] GC(32) Using 8 workers of 8 for evacuation
[4.429s][info][gc,phases   ] GC(32)   Pre Evacuate Collection Set: 0.2ms
[4.429s][info][gc,phases   ] GC(32)   Merge Heap Roots: 0.1ms
[4.429s][info][gc,phases   ] GC(32)   Evacuate Collection Set: 21.4ms
[4.429s][info][gc,phases   ] GC(32)   Post Evacuate Collection Set: 0.1ms
[4.429s][info][gc,phases   ] GC(32)   Other: 0.1ms
[4.429s][info][gc,heap     ] GC(32) Eden regions: 12->0(80)
[4.429s][info][gc,heap     ] GC(32) Survivor regions: 12->12(12)
[4.429s][info][gc,heap     ] GC(32) Old regions: 1563->1577
[4.429s][info][gc,heap     ] GC(32) Archive regions: 0->0
[4.429s][info][gc,heap     ] GC(32) Humongous regions: 244->244
[4.429s][info][gc,metaspace] GC(32) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.429s][info][gc          ] GC(32) Pause Young (Normal) (G1 Preventive Collection) 3661M->3666M(3716M) 21.847ms
[4.429s][info][gc,cpu      ] GC(32) User=0.14s Sys=0.00s Real=0.02s
[4.430s][info][gc,start    ] GC(33) Pause Young (Normal) (G1 Humongous Allocation)
[4.430s][info][gc,task     ] GC(33) Using 8 workers of 8 for evacuation
[4.443s][info][gc,phases   ] GC(33)   Pre Evacuate Collection Set: 0.1ms
[4.443s][info][gc,phases   ] GC(33)   Merge Heap Roots: 0.0ms
[4.443s][info][gc,phases   ] GC(33)   Evacuate Collection Set: 11.5ms
[4.443s][info][gc,phases   ] GC(33)   Post Evacuate Collection Set: 0.5ms
[4.443s][info][gc,phases   ] GC(33)   Other: 0.1ms
[4.443s][info][gc,heap     ] GC(33) Eden regions: 2->0(93)
[4.443s][info][gc,heap     ] GC(33) Survivor regions: 12->2(12)
[4.443s][info][gc,heap     ] GC(33) Old regions: 1577->1591
[4.443s][info][gc,heap     ] GC(33) Archive regions: 0->0
[4.443s][info][gc,heap     ] GC(33) Humongous regions: 244->244
[4.443s][info][gc,metaspace] GC(33) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[4.443s][info][gc          ] GC(33) Pause Young (Normal) (G1 Humongous Allocation) 3670M->3672M(3816M) 12.175ms
[4.443s][info][gc,cpu      ] GC(33) User=0.07s Sys=0.00s Real=0.01s
[4.443s][info][gc,ergo     ] Attempting full compaction
[4.443s][info][gc,task     ] GC(34) Using 8 workers of 8 for full compaction
[4.443s][info][gc,start    ] GC(34) Pause Full (G1 Compaction Pause)
[4.449s][info][gc,phases,start] GC(34) Phase 1: Mark live objects
[5.430s][info][gc,phases      ] GC(34) Phase 1: Mark live objects 980.544ms
[5.430s][info][gc,phases,start] GC(34) Phase 2: Prepare for compaction
[5.443s][info][gc,phases      ] GC(34) Phase 2: Prepare for compaction 13.229ms
[5.443s][info][gc,phases,start] GC(34) Phase 3: Adjust pointers
[5.738s][info][gc,phases      ] GC(34) Phase 3: Adjust pointers 295.030ms
[5.738s][info][gc,phases,start] GC(34) Phase 4: Compact heap
[5.756s][info][gc,phases      ] GC(34) Phase 4: Compact heap 17.952ms
[5.785s][info][gc,heap        ] GC(34) Eden regions: 0->0(99)
[5.785s][info][gc,heap        ] GC(34) Survivor regions: 2->0(12)
[5.785s][info][gc,heap        ] GC(34) Old regions: 1591->1541
[5.785s][info][gc,heap        ] GC(34) Archive regions: 0->0
[5.785s][info][gc,heap        ] GC(34) Humongous regions: 244->129
[5.785s][info][gc,metaspace   ] GC(34) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[5.785s][info][gc             ] GC(34) Pause Full (G1 Compaction Pause) 3672M->3331M(3964M) 1341.941ms
[5.785s][info][gc,cpu         ] GC(34) User=9.83s Sys=0.22s Real=1.35s
[5.785s][info][gc,ergo        ] Attempting maximum full compaction clearing soft references
[5.785s][info][gc,task        ] GC(35) Using 8 workers of 8 for full compaction
[5.786s][info][gc,start       ] GC(35) Pause Full (G1 Compaction Pause)
[5.786s][info][gc,phases,start] GC(35) Phase 1: Mark live objects
[6.797s][info][gc,phases      ] GC(35) Phase 1: Mark live objects 1011.022ms
[6.797s][info][gc,phases,start] GC(35) Phase 2: Prepare for compaction
[7.091s][info][gc,phases      ] GC(35) Phase 2: Prepare for compaction 293.850ms
[7.091s][info][gc,phases,start] GC(35) Phase 3: Adjust pointers
[7.551s][info][gc,phases      ] GC(35) Phase 3: Adjust pointers 460.264ms
[7.551s][info][gc,phases,start] GC(35) Phase 4: Compact heap
[7.967s][info][gc,phases      ] GC(35) Phase 4: Compact heap 416.610ms
[7.971s][info][gc,heap        ] GC(35) Eden regions: 0->0(99)
[7.971s][info][gc,heap        ] GC(35) Survivor regions: 0->0(12)
[7.971s][info][gc,heap        ] GC(35) Old regions: 1541->1540
[7.971s][info][gc,heap        ] GC(35) Archive regions: 0->0
[7.971s][info][gc,heap        ] GC(35) Humongous regions: 129->129
[7.971s][info][gc,metaspace   ] GC(35) Metaspace: 3706K(3904K)->3706K(3904K) NonClass: 3409K(3520K)->3409K(3520K) Class: 297K(384K)->297K(384K)
[7.971s][info][gc             ] GC(35) Pause Full (G1 Compaction Pause) 3331M->3330M(3964M) 2185.032ms
[7.971s][info][gc,cpu         ] GC(35) User=15.44s Sys=0.03s Real=2.18s
[7.971s][info][gc,marking     ] GC(19) Concurrent Mark From Roots 5527.878ms
[7.971s][info][gc,marking     ] GC(19) Concurrent Mark Abort
[7.971s][info][gc             ] GC(19) Concurrent Mark Cycle 5539.567ms
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.HashMap.resize(HashMap.java:702)
    at java.base/java.util.HashMap.putVal(HashMap.java:661)
    at java.base/java.util.HashMap.put(HashMap.java:610)
    at gc.LogGC.main(LogGC.java:15)
[7.973s][info][gc,heap,exit   ] Heap
[7.973s][info][gc,heap,exit   ]  garbage-first heap   total 4059136K, used 3412405K [0x0000000708400000, 0x0000000800000000)
[7.973s][info][gc,heap,exit   ]   region size 2048K, 1 young (2048K), 0 survivors (0K)
[7.973s][info][gc,heap,exit   ]  Metaspace       used 3802K, committed 3968K, reserved 1056768K
[7.973s][info][gc,heap,exit   ]   class space    used 307K, committed 384K, reserved 1048576K

 

Saturday, January 29, 2022

Using Maven with Weblogic 14.1.1

 HOWTO

 

GitHub

 

Set env 

dave@dave dave-basic-webapp-ejb-project]$ . /app/weblogic/wlserver/server/bin/setWLSEnv.sh
CLASSPATH=/usr/java/jdk-11.0.13/lib/tools.jar:/home/app/weblogic/wlserver/modules/features/wlst.wls.classpath.jar:

PATH=/home/app/weblogic/wlserver/server/bin:/home/app/weblogic/wlserver/../oracle_common/modules/thirdparty/org.apache.ant/1.10.5.0.0/apache-ant-1.10.5/bin:/usr/java/jdk-11.0.13/bin:/usr/java/jdk-11.0.13/bin:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/app/weblogic-14.1.1/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin:/home/dave/.local/bin:/home/dave/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/app/weblogic/oracle_common/modules/thirdparty/apache-maven_bundle/3.6.1.0.0/apache-maven-3.6.1//bin

Your environment has been set.

 

Compile and deploy the project - requires Maven configuration - see below 

Use Weblogic path /app/weblogic - Maven plugin had issues with Oracle JARs synced to local repository 

Error "java.lang.NoClassDefFoundError Required class missing : weblogic/Deployer" After deleting com/oracle/weblogic in Maven local repo and resync deploy works

dave@dave dave-basic-webapp-ejb-project]$ mvn  clean  compile package  pre-integration-test 
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< dave:dave-basic-webapp-ejb-project >-----------------
[INFO] Building basicWebappEjb 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ dave-basic-webapp-ejb-project ---
[INFO] Deleting /git/weblogic/dave-basic-webapp-ejb-project/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6: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
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ dave-basic-webapp-ejb-project ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 6 source files to /git/weblogic/dave-basic-webapp-ejb-project/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6: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
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ dave-basic-webapp-ejb-project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dave-basic-webapp-ejb-project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /git/weblogic/dave-basic-webapp-ejb-project/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ dave-basic-webapp-ejb-project ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ dave-basic-webapp-ejb-project ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ dave-basic-webapp-ejb-project ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/dave/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Packaging webapp
[INFO] Assembling webapp [dave-basic-webapp-ejb-project] in [/git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb]
[INFO] Processing war project
[INFO] Copying webapp resources [/git/weblogic/dave-basic-webapp-ejb-project/src/main/webapp]
[INFO] Webapp assembled in [105 msecs]
[INFO] Building war: /git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] --- maven-resources-plugin:2.6: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
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ dave-basic-webapp-ejb-project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ dave-basic-webapp-ejb-project ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /git/weblogic/dave-basic-webapp-ejb-project/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ dave-basic-webapp-ejb-project ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ dave-basic-webapp-ejb-project ---
[INFO] No tests to run.
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ dave-basic-webapp-ejb-project ---
[INFO] Packaging webapp
[INFO] Assembling webapp [dave-basic-webapp-ejb-project] in [/git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb]
[INFO] Processing war project
[INFO] Copying webapp resources [/git/weblogic/dave-basic-webapp-ejb-project/src/main/webapp]
[INFO] Webapp assembled in [66 msecs]
[INFO] Building war: /git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] --- weblogic-maven-plugin:14.1.1-0-0:deploy (default) @ dave-basic-webapp-ejb-project ---
[INFO] Command flags are: -noexit -deploy -username weblogic -password ******* -name basicWebappEjb -source /git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb.war -verbose -adminurl t3://127.0.0.1:7001
weblogic.Deployer invoked with options:  -noexit -deploy -username weblogic -name basicWebappEjb -source /git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb.war -verbose -adminurl t3://127.0.0.1:7001
<Jan 30, 2022, 9:00:58 AM Central European Standard Time> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, basicWebappEjb [archive: /git/weblogic/dave-basic-webapp-ejb-project/target/basicWebappEjb.war], to configured targets.> 
Task 6 initiated: [Deployer:149026]deploy application basicWebappEjb on AdminServer.
Task 6 completed: [Deployer:149026]deploy application basicWebappEjb on AdminServer.
Target state: deploy completed on Server AdminServer

Target Assignments:
+ basicWebappEjb  AdminServer
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  10.671 s
[INFO] Finished at: 2022-01-30T09:01:01+01:00
[INFO] ------------------------------------------------------------------------


 


Install Oracle plugin to local repository

Follow instructions from Oracle Weblogic 14.1.1 HOWTO https://docs.oracle.com/en/middleware/standalone/weblogic-server/14.1.1.0/wlprg/maven.html#GUID-C6FC7582-2D1C-4EA5-B000-71AE9A2F2B05 

 


  cd /app/weblogic-14.1.1/
  find . -name   oracle*maven-*.jar
  cd  ./oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/14.1.1/

  ls ~/.m2/repository/
  mvn install:install-file -DpomFile=oracle-maven-sync-14.1.1.pom -Dfile=oracle-maven-sync-14.1.1.jar
  mvn com.oracle.maven:oracle-maven-sync:push -DoracleHome=/app/weblogic-14.1.1/
  mvn archetype:crawl -Dcatalog=$HOME/.m2/archetype-catalog.xml

  List plugins goals

[dave@dave dave-basic-webapp-ejb-project]$ mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=14.1.1-0-0
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------< dave:dave-basic-webapp-ejb-project >-----------------
[INFO] Building basicWebappEjb 1.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- maven-help-plugin:3.2.0:describe (default-cli) @ dave-basic-webapp-ejb-project ---
[INFO] com.oracle.weblogic:weblogic-maven-plugin:14.1.1-0-0

Name: weblogic-maven-plugin
Description: The Oracle WebLogic Server 12.3.1 Maven plugin
Group Id: com.oracle.weblogic
Artifact Id: weblogic-maven-plugin
Version: 14.1.1-0-0
Goal Prefix: weblogic

This plugin has 23 goals:

weblogic:appc
  Description: This goal is a wrapper for the weblogic.appc compiler.

weblogic:create-domain
  Description: Create a domain for WebLogic Server using the default domain
    template. For more complex domain creation use the WLST goal. Note:
    Starting in WLS 12.2.1, there is a single unified version of WLST that
    automatically includes the WLST environment from all products in the
    ORACLE_HOME.

weblogic:deploy
  Description: Deploys an application to WebLogic Server (supports all
    formats WAR, JAR, RAR, EAR, etc.)

weblogic:distribute-app
  Description: Prepares deployment files for deployment by copying deployment
    files to target servers and validating them.

weblogic:install
  Description: Installs WebLogic Server

weblogic:list-apps
  Description: Lists the deployment names for applications and stand-alone
    modules deployed distributed, or installed to the domain

weblogic:purge-tasks
  Description: Flushes out retired deployment tasks

weblogic:redeploy
  Description: Redeploys a running application or part of a running
    application

weblogic:remove-domain
  Description: This class provides basic capabilities to remove a domain
    directory.

weblogic:start-app
  Description: Starts an application

weblogic:start-server
  Description: Starts WebLogic Server.

weblogic:stop-app
  Description: Stops an application

weblogic:stop-server
  Description: This goals run a stop script to stop WebLogic Server.

weblogic:undeploy
  Description: Stops the deployment unit and removes staged files from target
    servers

weblogic:uninstall
  Description: Uninstalls WebLogic Server

weblogic:update-app
  Description: Updates an application's deployment plan by redistributing the
    plan files and reconfiguring the application based on the new plan
    contents.

weblogic:wlst
  Description: This goal is a wrapper for the WLST scripting tool.
    Note: Starting in WLS 12.2.1, there is a single unified version of WLST
    that automatically includes the WLST environment from all products in the
    ORACLE_HOME.

weblogic:wlst-client
  Description: WLST wrapper for Maven that does not require a server install
    for WLST online commands.

weblogic:ws-clientgen
  Description: A Maven goal to generate client web service artifacts from a
    WSDL Note the differences between clientgen Ant task and Maven goal:
    clientgen goal only generates JAXWS web service artifacts, while Ant task
    has JAXRPC as the default. At the moment there is no way to direct
    clientgen goal to also compile and package generated artifacts.
  Deprecated. No reason given

weblogic:ws-jwsc
  Description: This goal builds a JAX-WS web service, generates source code,
    data binding artifacts, deployment descriptors, and so on into an output
    directory.
  Deprecated. No reason given

weblogic:ws-wsdlc
  Description: This goal generates, from an existing WSDL file, a set of
    artifacts that together provide a partial Java implementation of the Web
    Service described by the WSDL file.
  Deprecated. No reason given

weblogic:wsgen
  Description: Reads a JAX-WS service endpoint implementation class and
    generates all of the portable artifacts for a JAX-WS web service.

weblogic:wsimport
  Description: Parses wsdl and binding files and generates Java code needed
    to access it.

For more information, run 'mvn help:describe [...] -Ddetail'

Create project using Eclipse and Maven archetype 


 

 

Saturday, December 25, 2021

Set active sound port to headphones on Linux Fedora Gnome

 HOWTO

 

Get current sound settings
[dave@dave ~]$ pactl list short sinks
44    alsa_output.pci-0000_00_1f.3.analog-stereo    PipeWire    s32le 2ch 48000Hz    RUNNING

[dave@dave ~]$ more ~/.local/state/wireplumber/default-routes 
[default-routes]
alsa_card.pci-0000_00_1f.3:input:analog-input-headset-mic:channelMap=FL;FR;
alsa_card.pci-0000_00_1f.3:input:analog-input-headset-mic:channelVolumes=0.39999160170555;0.39999160170555;
alsa_card.pci-0000_00_1f.3:input:analog-input-headset-mic:latencyOffsetNsec=0
alsa_card.pci-0000_00_1f.3:output:analog-output-headphones:channelMap=FL;FR;
alsa_card.pci-0000_00_1f.3:output:analog-output-headphones:channelVolumes=1.0;1.0;
alsa_card.pci-0000_00_1f.3:output:analog-output-headphones:latencyOffsetNsec=0
alsa_card.pci-0000_00_1f.3:output:analog-output-speaker:channelMap=FL;FR;
alsa_card.pci-0000_00_1f.3:output:analog-output-speaker:channelVolumes=0.39999160170555;0.39999160170555;
alsa_card.pci-0000_00_1f.3:output:analog-output-speaker:latencyOffsetNsec=0
alsa_card.pci-0000_00_1f.3:profile:output:analog-stereo+input:analog-stereo=analog-output-headphones;

Set active port - change to headphones

[dave@dave ~]$ man pactl
[dave@dave ~]$ pactl list sinks |& grep -E "Sink|Ports|analog-ou"
Sink #44
        media.class = "Audio/Sink"
    Ports:
        analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
        analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 2, availability unknown)
    Active Port: analog-output-speaker
[dave@dave ~]$ pactl set-sink-port 44  analog-output-headphones
[dave@dave ~]$ pactl list sinks |& grep -E "Sink|Ports|analog-ou"
Sink #44
        media.class = "Audio/Sink"
    Ports:
        analog-output-speaker: Speakers (type: Speaker, priority: 10000, availability group: Legacy 3, availability unknown)
        analog-output-headphones: Headphones (type: Headphones, priority: 9900, availability group: Legacy 2, availability unknown)
    Active Port: analog-output-headphones
[dave@dave ~]$ pactl set-sink-port 44  analog-output-headphones