Error: Could not find or load main class weblogic.security.Encrypt

I am trying to encrypt the database password for mine Java EE Application

in terminal. according to this tutorial

The steps are as follows:

  • Change directory to bin folder of your domain (e.g. cd WLS_home \ user_projects \ domains \ mydomain \ bin)
  • Use a setDomainEnv.cmd/sh

    script to set up your environment
  • Run java weblogic.security.Encrypt

    which will ask for a password and print the encrypted value in a standard file.

However, when I execute 'java weblogic.security.Encrypt' the following is assigned to me:

Error: Could not find or load main class weblogic.security.Encrypt

I am developing my project in Eclipse and set up my server Weblogic-12.1.3

in Eclipse. I'm not sure why this error is happening, but I'm expecting it because my java version is 1.8 and it probably expects me to be using java 1.6 which I think comes with the Weblogic installation.

java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      

+3


source to share


3 answers


You must enter a name cd WLS_home/user_projects/domains/mydomain/bin/

. ./setDomainEnv.sh



You have to use two separate points to do the trick!

+5


source


I am using Java 8 with WebLogic 12.1.3 on Linux. I had to add some entries to the classpath, but it worked like this:



java -cp /home/devuser/Oracle/Middleware/Oracle_Home/wlserver/modules/features/*:/home/devuser/Oracle/Middleware/Oracle_Home/wlserver/modules/*  weblogic.security.Encrypt

      

+3


source


I had the same problem when I set set enableHotswapFlag=

to true. please leave this flag blank and try it.

0


source







All Articles