I want to conditionally execute some wlst commands based the the weblogic version. How to get the weblogic version using wlst?
The version command is supported by wlst.
Below is the output of version command executed with wlst (version 12.2.1)
wls:/offline> print version
WebLogic Server 12.2.1.2.0
With wlst script you can check the version and perform the version specific commands. For example, create a script called test.py as below
weblogic_version=version
if 'WebLogic Server 12.2.1' in weblogic_version:
print "Perform commands for weblogic version 12.2.1"
else:
print "You are on required weblogic version"
You can now execute this script with wlst.sh
.../wlst.sh test.py
Ref:https://docs.oracle.com/middleware/1213/wls/WLSTC/reference.htm#WLSTC516
Related
I've been trying to start the glassfish server domain with the following command asadmin start-domain domain1 but the result wasn't the expected. This what the outputs is throwing out:
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Command start-domain failed.
Btw I've already tried changing the network-listener-port number located inside glassfish folders C:\glassfish4\glassfish\domains\domain1\config\domain.xml from port 8080 to 4949 and it didn't work. Besides I also tried running the start-domain domain1 command in the asadmin batch file and nothing happened, the output still the same.
Any idea how can I fix this out?
I tried to start it with asadmin.sh and it worked on Windows 10
I have an issue when I try running Pentaho Data Integration on Mac bigSur (M1).
issue code in below:
I'm sorry, this Mac platform [arm64] is not yet supported! Please try starting using 'Data Integration 32-bit' or 'Data Integration 64-bit' as appropriate.
java version
> java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
can anyone help me with this issue?
Thanks
Try this guide from reddit
Guide:
Here is how you can force the shell to run in Intel mode so that you
can continue working in this little command-line Rosetta Island while
waiting for native ARM64 support.
Open the Terminal app.
Open the Terminal app’s Preferences.
Click on the Profiles tab.
Select a profile, click on the ellipsis at the bottom of the profile list and then select Duplicate Profile.
Click on the new profile and give it a good name. I named mine as “Rosetta Shell”.
Also in the new profile, click on the Window tab. In the Title, put a name to indicate that this is for running Intel-based apps.I put “Terminal (Intel)” on mine.
Click on the Shell tab and use the following as its Run Command to force the shell run under Rosetta: env /usr/bin/arch -x86_64 /bin/zsh --login
Untick the Run inside shell checkbox. Clearing the checkbox would prevent running the shell twice, which could bloat your environment variables since ~/.zshrc gets run twice.
Optionally set this profile as the Default.
This is the first step. After that you have to replace the swt.jar in the data-integration Folder /path_to_your_data-integration/libswt/osx64/
Otherwise it won't start.
You can download the jar here
Important!: You don't have to rename this file, but you have to remove the original swt.jar .
I've just want to add that you need to have an x86 Java version installed for Tufan Atak solution to work.
So if you've installed an M1 compat Java version and you try to start spoon with that it will throw the next error:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-cocoa-4944r26 in java.library.path
no swt-cocoa in java.library.path
no swt in java.library.path
Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib
Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa.jnilib
Can't load library: /<user-home-path>/.swt/lib/macosx/aarch64/libswt.jnilib
/<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib: dlopen(/<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib, 0x0001): tried: '/<user-home-path>/.swt/lib/macosx/aarch64/libswt-cocoa-4944r26.jnilib' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:348)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:257)
at org.eclipse.swt.internal.C.<clinit>(C.java:19)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:107)
at org.pentaho.di.ui.core.widget.OsHelper.setAppName(OsHelper.java:106)
at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:652)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
So you need to install Java again from the same intel terminal profile so an x86 version is installed.
You can use SDK Man and after that you can execute this command (for java 8 temurin):
> sdk install java 8.0.345-tem
.
.
.
> Do you want java 8.0.345-tem to be set as default? (Y/n): n
The n answer is because you don't wanna run every other java program with the x86 version.
After that you can tell SDK Man to use this new version for this terminal shell
> sdk use java 8.0.345-tem
then just verify the current version is the one you've just indicated sdk man to use:
> java -version
you should see something like this:
openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_345-b01)
OpenJDK 64-Bit Server VM (Temurin)(build 25.345-b01, mixed mode)
After that you can finally start spoon
> ./spoon.sh
While checking the environment setup of Kylin2.1.0, it returns the following "Please make sure the user has the privilege to run hadoop shell"
Versions of tools used
Hadoop: 2.7
Hive: 2.0.0
HBase: hbase-1.2.4
JDK: 1.7
root#ubuntu:~/kylin-2.1.0/bin$ ./check-env.sh
Retrieving hadoop conf dir...
KYLIN_HOME is set to /home/user/kylin-2.1.0
Please make sure the user has the privilege to run hadoop shell
I am trying to check the status of Weblogic server in 12c using the below command which works properly in 10.X weblogic
java weblogic.Admin -url t3://$IP:$Port GETSTATE -username $username -password $password
But in 12c version, wlst (java weblogic.WLST) commands are working fine. But while using weblogic.Admin, getting the error as "Could not find or load main class weblogic.Admin"
I have set my classpath as follows
export CLASSPATH=$WL_HOME/server/lib/weblogic.jar
weblogic.Admin tool is deprecated since version 9 and is no longer available in 12c. You have to use wlst.
I keep getting this error after launching an integrated Weblogic server in Jdeveloper,
Starting WLS with line:
C:\PROGRA~1\Java\JDK18~1.0_2\bin\java -server -Xms768m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=1024m -Dweblogic.Name=DefaultServer -Djava.security.policy=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\weblogic.policy
-Djavax.net.ssl.trustStore=C:\Users\Idiot\AppData\Local\Temp\trustStore7893387873075798475.jks -Doracle.jdeveloper.adrs=true -Dweblogic.nodemanager.ServiceEnabled=true
-Xverify:none -Djava.endorsed.dirs=C:\PROGRA~1\Java\JDK18~1.0_2\jre\lib\endorsed;C:\Oracle\MIDDLE~1\ORACLE~1\oracle_common\modules\endorsed -Djava.protocol.handler.pkgs="oracle.mds.net.protocol|oracle.fabric.common.classloaderurl.handler|oracle.fabric.common.uddiurl.handler|oracle.bpm.io.fs.protocol" -Dopss.version=12.1.3
-Digf.arisidbeans.carmlloc=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\carml -Digf.arisidstack.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\arisidprovider
-Doracle.security.jps.config=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\jps-config.xml -Doracle.deployed.app.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\servers\DefaultServer\tmp\_WL_user -Doracle.deployed.app.ext=\- -Dweblogic.alternateTypesDirectory=C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.ossoiap_12.1.3,C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.oamprovider_12.1.3,C:\Oracle\Middleware\Oracle_Home\oracle_common\modules\oracle.jps_12.1.3 -Dweblogic.jdbc.remoteEnabled=false -Dcommon.components.home=C:\Oracle\Middleware\Oracle_Home\oracle_common -Djrf.version=12.1.3
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1 -Doracle.server.config.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig\servers\DefaultServer -Doracle.domain.config.dir=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1\config\fmwconfig -Doracle.mds.filestore.preferred=true -Dadf.version=12.1.3 -Doracle.osb.home=C:\Oracle\Middleware\Oracle_Home\osb -da
-Dwls.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server -Dweblogic.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server -Djps.app.credential.overwrite.allowed=true -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder -da:org.apache.xmlbeans... -Dem.oracle.home=C:\Oracle\Middleware\Oracle_Home\em -DINSTANCE_HOME=C:\Users\Idiot\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain -Djava.awt.headless=true -Doracle.sysman.util.logging.mode=dual_mode -Dsoa.archives.dir=C:\Oracle\Middleware\Oracle_Home\soa\soa -Dsoa.oracle.home=C:\Oracle\Middleware\Oracle_Home\soa -Dsoa.instance.home=C:\Users\Idiot\AppData\Roaming\JDEVEL~1\SYSTEM~1.100\DEFAUL~1
-Dtangosol.coherence.log=jdk -Djavax.xml.soap.MessageFactory=oracle.j2ee.ws.saaj.soap.MessageFactoryImpl -Dweblogic.transaction.blocking.commit=true -Dweblogic.transaction.blocking.rollback=true -Djavax.net.ssl.trustStore=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\DemoTrust.jks -Doracle.xml.schema\Ignore_Duplicate_Components=true -Doracle.xdkjava.compatibility.version=11.1.1 -Doracle.soa.compatibility.version=11.1.1 -Dums.oracle.home=C:\Oracle\Middleware\Oracle_Home\oracle_common -Djava.util.logging.manager=oracle.core.ojdl.logging.ODLLogManager weblogic.Server
Stopping Derby server...
The system cannot find the path specified.
Derby server stopped.
I uninstalled the latest JDK8 and have only the 7th version in my computer. I checked my environment variables and all possible configuration files like jdev.conf and setENVvar.cmd
Has anyone faced the same issue?
Weblogic annoyingly hard codes the value of JAVA_HOME in ORACLE_HOME\wlserver\common\bin\commEnv.cmd around line 103. The shell version of the script does at least give the option to override this as long as both JAVE_HOME and JAVA_VENDOR are set, but there's no such feature in the Windows script I'm afraid - you just have to edit the file.
The Oracle installer puts the JDK path into several configuration files. You can find them by running e.g. this command within your Oracle_Home directory:
find . -type f -exec grep -H 'jdk1.8.0_31' '{}' \;
In my case the list was:
./inventory/Components/oracle.fmwconfig.common.wls/12.2.1.0.0/context.xml
./inventory/Components/oracle.nginst.core/13.3.0.0.0/context.xml
./inventory/Components/oracle.wls.core.app.server/12.2.1.0.0/context.xml
./inventory/Components/oracle.wls.core.app.server/12.2.1.0.0/installIP2Log.xml
./jdeveloper/jdev/bin/jdev.conf
./oep/common/lib/metaInstallUnix.properties
./oep/common/lib/metaInstallWindows.properties
./oep/utils/load-generator/runloadgen.cmd
./oep/utils/load-generator/runloadgen.sh
./OPatch/bin/listDomainPatchInventory.cmd
./OPatch/bin/listDomainPatchInventory.sh
./oracle_common/common/bin/commBaseEnv.cmd
./oracle_common/common/bin/commBaseEnv.sh
./oracle_common/common/bin/setHomeDirs.cmd
./oracle_common/common/bin/setHomeDirs.sh
./oui/bin/compareInventory.cmd
./oui/bin/compareInventory.sh
./oui/bin/internal/ilaunch.cmd
./oui/bin/launch.sh
./oui/bin/viewInventory.cmd
./oui/bin/viewInventory.sh
./oui/mw/common/framework/bin/configinternal.cmd
./oui/mw/common/framework/bin/configinternal.cmd
./oui/mw/common/framework/bin/configinternal.sh
After replacing the version, all works fine again.
In Jdev 12.1.3, the location to change is system12.1.3.??? folder /DefaultDomain/bin/setDomainEnv.cmd (or sh).
You will find the JDK path there in 3 places. Change all of them to be safe.
However, if you are running ADF on your Integrated server, you will need to resolve issues where older jars may not support Java 8. This includes the older mysql driver that Oracle wants to deploy by default.