This discussion is archived
5 Replies Latest reply: Jul 2, 2013 8:12 AM by user2251881 RSS

Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)

934852 Newbie
Currently Being Moderated
I downloaded OEPE Juno Release. I have also downloaded the Weblogic 12.1.1 server (wls1211_dev.zip). I installed the Weblogic Server first, followed the instructions, successfully created my domain server and am able to run it from the CLI. An odd thing to me is the step about having to run the %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd script at the command prompt whenever you first launch a new DOS windows in order for the server to be run correctly. I think this is a key point in my problem with trying to run the same server from within OEPE.

If I launch a new DOS window, navigate to my weblogic domain server home, and run startWebLogic.cmd, I get the following error state:

The JRE was not found in directory . (JAVA_HOME)
Please edit your environment and set the JAVA_HOME
variable to point to the root directory of your Java installation.
Press any key to continue . . .

However, if I then execute %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd and THEN run startWeblogic.cmd, my server starts up fine.

Now, when I create a new server (or point to my existing one) in OEPE, I get the same error output in my console:

The JRE was not found in directory . (JAVA_HOME)
Please edit your environment and set the JAVA_HOME
variable to point to the root directory of your Java installation.
Press any key to continue . . .

I think I've missed a step somewhere. It seems like I need to run %MW_HOME%\wlserver\server\bin\setWLSEnv.cmd, view the environment variables it sets, and make those permanent System Environment Variables in order to get things to work. But I feel like this is a really kludgy process, and one that does not seem to be formally documented. Is this a correct assumption or am I missing something else more fundamental?

My question is essentially what is the correct process (steps) for getting the WLS to run inside of OEPE?

Thanks.
  • 1. Re: Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)
    652340 Explorer
    Currently Being Moderated
    Did you run configure.cmd after unzip wls1211_dev.zip to setup JAVA_HOME and MW_HOME? The cmd file is located at the root directory of the installation
  • 2. Re: Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)
    dvohra21 Oracle ACE
    Currently Being Moderated
    Download the Full OEPE Installer.
    OEPE 12c +
    WebLogic Server 12.1.1
    http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/oepe-1211-1357594.html

    WLS doesn't need to be installed separately.
  • 3. Re: Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)
    934852 Newbie
    Currently Being Moderated
    Yes, that's it. Once I ran the configure.cmd script in my %MW_HOME% directory, I was able to run the server from both the CLI as well as from within OEPE. I definitely missed that step in the README. My fault.

    Thanks for the help!
  • 4. Re: Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)
    Andrew Higginbottom Explorer
    Currently Being Moderated
    Running configure.cmd did not resolve this issue for me, JAVA_HOME was always blank when starting weblogic from within eclipse. I tried overwriting it within the launch configuration with no luck.

    After debugging startWebLogic.cmd I discovered that the problem was in \dev_domain\bin\setDomainEnv.cmd.

    For some reason JAVA_VENDOR was set to "Sun", forcing setDomainEnv.cmd to set JAVA_HOME to SUN_JAVA_HOME, declared at the top of setDomainEnv.cmd to be blank - "SUN_JAVA_HOME=".

    I'm not sure if JAVA_VENDOR is set to "Sun" because I have configured the Server in eclipse to use the Sun JRE or because I initially had JAVA_VENDOR set to "Sun" when I ran configure.cmd. Either way, setting SUN_JAVA_HOME to the correct path worked and I can now start WebLogic from eclipse.
  • 5. Re: Can't run Weblogic Server inside of OEPE (Windows 7/Java 7)
    user2251881 Newbie
    Currently Being Moderated

    I had a similar issue with Spring Tool Suite and Weblogic 12C on Windows 7. For me it was setting JAVA_VENDOR to Oracle which produced the similar behavior you described, namely not setting JAVA_HOME.

     

    BEA_JAVA_HOME=""

    export BEA_JAVA_HOME

     

     

    SUN_JAVA_HOME="C:/Progra~1/Java/jdk1.7.0_25"

    export SUN_JAVA_HOME

     

     

    if [ "${JAVA_VENDOR}" = "Oracle" ] ; then

            JAVA_HOME="${BEA_JAVA_HOME}"

            export JAVA_HOME

    else

            if [ "${JAVA_VENDOR}" = "Sun" ] ; then

                    JAVA_HOME="${SUN_JAVA_HOME}"

                    export JAVA_HOME

            else

                    JAVA_VENDOR="Sun"

                    export JAVA_VENDOR

                    JAVA_HOME="C:/Progra~1/Java/jdk1.7.0_25"

                    export JAVA_HOME

            fi

    fi

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points