rm is not recognized as an internal or external – OHS startComponent.cmd and stopComponent.cmd

If you installed OHS on Windows then you might run into this issue when attempting to use the startComponent.cmd and stopComponent.cmd commands:

startComponent.cmd and stopComponent.cmd return rm is not recognized as an internal or external...


This is a bug (BUG 17276497). Pretty simple fix:

  1. edit the startComponent.cmd and stopComponent.cmd files in DOMAIN\bin
    Replace the following line:

    if exist %PY_LOC% (
    rm -f %PY_LOC%

    With this line:

    if exist %PY_LOC% (
    del %PY_LOC%

Permanent link to this article: http://devnumbertwo.com/rm-is-not-recognized-as-an-internal-or-external/

cannot delete files – file name is too long

if you’re trying to delete files in Windows that are either too deep or whose names are too long you could get this error:

cannot delete files - file name is too long

cannot delete files - file name is too long

some articles will say to copy the contents to a shorter folder path OR rename the files (duh!) but in some cases this will not work. you end up getting the same error! i.e. copy the long-named file to somewhere else, it will say that the name is too long to perform that action. so I wouldn’t even bother trying that nonsense…

give this a shot, worked like a charm for me:

  1. drill down into the folders to the folder that contains the problem files or folders
  2. share the folder that contains the files/folders
  3. map a network drive to the folder with the problem files/folders
  4. open the mapped drive from another computer on the network, delete the files or folders in question
  5. disconnect the map drive and remove the share

how long can a file name be in windows? here’s what Microsoft says:

It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters. This is why you might occasionally get an error when copying a file with a very long file name to a location that has a longer path than the file’s original location.

Permanent link to this article: http://devnumbertwo.com/cannot-delete-files-file-name-is-too-long/

Unexpected exception from Plugin: java.lang.NullPointerException starting OHS HTTP Server

the problem: you used DOMAIN/bin/installNodeMgrSvc.cmd to install the OHS node manager, and when starting the OHS using startComponent.cmd ohs1 you get –> Server start command for OHS server ‘ohs1’ failed due to: Unexpected exception from Plugin: java.lang.NullPointerException

Starting System Component ohs1 ...

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

Reading domain from C:/Oracle/Middleware/Oracle_Home/user_projects/domains/dev2_domain

Please enter your password :
Connecting to Node Manager ...
Successfully Connected to Node Manager.
Starting server ohs1 ...
Error Starting server ohs1: weblogic.nodemanager.NMException: Received error message from Node Manager Server: 
[Server start command for OHS server 'ohs1' failed due to: Unexpected exception from Plugin: java.lang.NullPointerException. 
Please check Node Manager log and/or server 'ohs1' log for detailed information.]. Please check Node Manager log for details.
Successfully disconnected from Node Manager.

Exiting WebLogic Scripting Tool.


this is a bug! (16883059) fix this suckah by doing the following:

  1. you need to uninstall the nodemanager service
    cd DOMAIN\bin\
  2. set the following java options first and then install the nodemanager service again:
    cd DOMAIN\bin
    set JAVA_OPTIONS=-Dohs.product.home=<product_home> -Dweblogic.rootdirectory=<domain_directory>


    -Dohs.product.home=C:\\Oracle\\Middleware\\Oracle_Home\\ohs -Dweblogic.rootdirectory=C:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain
  3. start the Nodemanager service
  4. start OHS using the startComponent.cmd command again. you should be all set

Permanent link to this article: http://devnumbertwo.com/unexpected-exception-from-plugin-java-lang-nullpointerexception/

fix weblogic error: Received fatal alert certificate_unknown

the problem: starting up weblogic and you get — Received fatal alert certificate_unknown

com.sun.xml.ws.client.ClientTransportException: HTTP transport error: 
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown

you might also be receiving

javax.net.ssl.SSLHandshakeException: General SSLEngine problem
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: sun.security.validator.ValidatorException: PKIX path validation failed:
java.security.cert.CertPathValidatorException: Algorithm constraints check failed: MD5withRSA

the cause: release notes for Java SE Update 40 show that the Default Key Length has been increased. Starting from 7u40, the use of x.509 certificates with RSA keys less than 1024 bits in length is restricted.

fix it so you can startup weblogic without issues – perform ONE of the following:

  1. Create a new Demo Key with the larger key size (strength of 2048)
  2. Obtain your own certificate, by submiting a new request to your CA, increasing its certificate strength (i.e. >1024).
  3. Remove the key length restriction (not recommended but the fastest solution)
    • I did this just so I could startup without errors for the time being until #3 could be done
      edit $JAVA_HOME/jre/lib/security/java.security
      it looks like this

      jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024

      change 1024 to 512

      jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 512
  4. Upgrade to WLS 12.1.2

Permanent link to this article: http://devnumbertwo.com/received-fatal-alert-certificate_unknown/

the server is in incompatible state – weblogic

the problem:  your node manager is reachable but you could not start the managed server. when attempting to start the server it is giving an error like

the server is in incompatible state which is incompatible with this operation or are 
not associated with a running Node Manager or you are not authorized to perform the 
action requested. No action will be performed

weblogic the server is in incompatible state
try this $h1t…

try deleting (or renaming/backing up) this file –> DOMAIN_HOME/servers/<servername>/data/nodemanager/<servername>.state

then try starting the managed server again through the console.

Note that per Oracle’s documentation, the .state file should not be removed as the Node Manager needs this to determine the current state of the file (read the Oracle doc here).

But hey, the state is wrong! If you want to proceed with caution, you can always rename/backup the file (ex. rename that bad boy to <servername>.state.bak) rather than completely removing it. Although, the Node Manager seems to re-generate this file if you delete it – but you should be fine either way.


Permanent link to this article: http://devnumbertwo.com/the-server-is-in-incompatible-state/

poo poo poo… everywhere

Permanent link to this article: http://devnumbertwo.com/poo-poo-poo-everywhere/

create windows service weblogic admin server

installation notes and $h!t on how to create windows service weblogic admin server…

this has been verified on weblogic 10.3.6 but i believe it will work for any 10.3.x version of weblogic.



  1. Create a folder to keep all your windows service related files in, i created a winservices folder in my domain
  2. Create a cmd file named createAdminWinService.cmd in the winservices folder with the following contents
    echo off
    set DOMAIN_NAME=devtwo_domain
    set USERDOMAIN_HOME=c:\oracle\user_projects\domains\devtwo_domain
    set SERVER_NAME=AdminServer
    call "c:\oracle\wlserver_10.3\server\bin\installSvc.cmd"
  3. Go to the WL_HOME\server\bin directory – in my case it’s c:\oracle\wlserver_10.3\server\bin
    Backup installSvc.cmd
    Then edit installSvc.cmd to contain the following changes

    set WL_HOME=C:\app\oracle\product\fmw\wlserver_10.3
    @rem call "%WL_HOME%\common\bin\commEnv.cmd"
    call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
    set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%;C:\oracle\user_projects\domains\devtwo_domain\winservices
    rem *** Install the service
    "%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -stopclass:ServerStopper -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%  -log:"c:\oracle\user_projects\domains\devtwo_domain\servers\AdminServer\logs\AdminServer-stdout.log"
  4. Create ServerStopper.java with the following contents in your winservices folder
    import java.io.File;
    import java.net.URL;
    import java.net.URLClassLoader;
    import java.util.Set;
    import java.util.Iterator;
    import java.rmi.RemoteException;
    import javax.naming.Context;
    import javax.management.ObjectName;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.WebLogicMBean;
    import weblogic.management.configuration.ServerMBean;
    import weblogic.management.runtime.ServerRuntimeMBean;
    import weblogic.management.runtime.ServerStates;
    import weblogic.management.WebLogicObjectName;
    public class ServerStopper {
      public static void stop() throws Exception {
        MBeanHome home = null;
        \\url of the Admin server
        String url = "t3:\\localhost:7001";
        String username = "weblogic";
        String password = "password";
        ServerRuntimeMBean serverRuntime = null;
        Set mbeanSet = null;
        Iterator mbeanIterator = null;
        try {
          \\ Set ContextClassloader to prevent assertions
          URL[] urls = { new File("\").toURL() };
          Environment env = new Environment();
          Context ctx = env.getInitialContext();
          home = (MBeanHome)
          mbeanSet = home.getMBeansByType("ServerRuntime");
          mbeanIterator = mbeanSet.iterator();
          while(mbeanIterator.hasNext()) {
            serverRuntime = (ServerRuntimeMBean)mbeanIterator.next();
        } catch (Exception e) {
  5. Compile the class file by opening a command prompt and performing the following
    cd C:\oracle\user_projects\domains\devtwo_domain\winservices
    set CLASSPATH=c:\wlserver_10.3\server\lib\weblogic.jar
    javac ServerStopper.java

    If you are working with Weblogic 12c, your weblogic.jar will be in a location something like:

    Note: the java class file contains some deprecated items. so you will see some warnings but it should be OK for now:

  6. Run createAdminWinService.cmd, open a command prompt as Administrator and run the file – example:
    cd c:\oracle\user_projects\domains\devtwo_domain\winservices
  7. You should now have a service in your Windows Services a service called “beasvc domainname_AdminServer” (in later versions of Weblogic like 12c it will start with something like wlsvc – see image below)
    create windows service weblogic admin server
  8. Test the service by starting it and accessing the Weblogic Administration Console.
    Also test stopping the service through Windows Services.

Permanent link to this article: http://devnumbertwo.com/create-windows-service-weblogic-admin-server/

install ohs 12c on windows

installation notes and $h!t on how to install ohs 12c on windows

Oracle HTTP Server (64-bit) on Windows

these steps are a compressed, much easier version of Oracle’s documentation – if you’d like to see Oracle’s version, check it out here. also note that this covers JUST the installation. for configuration of the domain, see the Oracle documentation.


  1. Download the OHS from http://www.oracle.com/technetwork/middleware/ias/index-091236.html
    download ohs 12c 64-bit for windows
  2. Put the downloaded zip file somewhere and unzip it. I put mines in c:\softwaretmp – you should now have a file named ohs_1212000_win64.exe
  3. Open a command prompt as Administrator
  4. Execute the exe file
    cd c:\softwaretmp
  5. Feel free to change any of the inputs you see in the screenshots that follow… 
  6. Oracle HTTP Server Install
    install ohs 12c on windows
    install ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows
    ohs 12c on windows

Permanent link to this article: http://devnumbertwo.com/install-ohs-12c-on-windows/

vaccine that fights severe doodoo

that’s right, there’s a vaccine that fights severe doodoo and even bill gates knows how important it is to get that info out there in a twitter pic. right on brotha, right on…

Permanent link to this article: http://devnumbertwo.com/vaccine-that-fights-severe-doodoo/

siebel Failed to start Core Services, Failed to create watchdog termination file

siebel Failed to start Core Services – This can occur when sourcing the siebenv.sh as root then trying as the oracle user:

[oracle@devtwo siebsrvr]$ . ./siebenv.sh
Failed to start Core Services: Failed to create watchdog termination file.

It may be best to reboot the VM prior to doing the steps below.

  1. Backup the regss15: files in the /tmp directory, Example:
    cd /tmp
    mv regss15:123483357904896 regss15:123483357904896.bak
    mv regss15:123483357904896.pid regss15:123483357904896.pid.bak
  2. Login as root, change the ownership of watchdog.keepalive (or just do the entire directory)
    cd /u01/app/ses/siebsrvr/mw/.mw/core_data/devtwosblsrvr/
    chown -R oracle:oinstall .
  3. Try to source siebenv.sh again as oracle
    [oracle@devtwo siebsrvr]# . ./siebenv.sh

Permanent link to this article: http://devnumbertwo.com/siebel-failed-to-start-core-services/

Older posts «

» Newer posts