Home > Coherence, Node Manager, Weblogic, WLST > Starting Coherence servers using Node Manager

Starting Coherence servers using Node Manager

January 30, 2012 Leave a comment Go to comments

Once you have created the Coherence servers in your domain, you should be able to manage their lifecycle using the Node Manager, just like with Weblogic managed servers. Of course, for this to work a Coherence server must be assigned to a machine within the Weblogic domain. The Coherence servers can then be started:

  • from the Administration console, by navigating to the “Control” tab and clicking “Start” for the selected servers
  • from WLST, by the following command:

nmConnect(‘weblogic’,’welcome1′,’localhost’,’5556′,’FMW_XPS’,’/shared/oracle/FMW_Home/user_projects/domains/FMW_XPS’,’plain’)

nmStart(‘coh_server1′,serverType=’Coherence’)

However, starting the Coherence servers from the Weblogic Administration console via the Node Manager might result in the below error showing up in the logs. You will usually find the coherence servers logs under $DOMAIN_HOME/server_coherence/<server_name>/logs

Exception in thread “main” java.lang.NoClassDefFoundError: weblogic/nodemanager/server/provider/WeblogicCacheServer
Caused by: java.lang.ClassNotFoundException: weblogic.nodemanager.server.provider.WeblogicCacheServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: weblogic.nodemanager.server.provider.WeblogicCacheServer.  Program will exit.

Although the process should be able to build the correct classpath by default, you might hit this issue in some cases. To overcome the problem, you must explicitly set the classpath in the admin console accordingly:

1. Navigate to “Coherence Servers” in the Environment section, then click the “Server Start” sub-tab under “Configuration”

2. Set the classpath to include:
$COHERENCE_HOME/lib/coherence.jar:$MIDDLEWARE_HOME/modules/features/weblogic.server.modules.coherence.server_<version>.jar

In my test domain it looks like this:

/shared/oracle/FMW_Home/modules/features/weblogic.server.modules.coherence.server_12.1.1.0.jar;/shared/oracle/FMW_Home/coherence_3.7/lib/coherence.jar

Now try again to start the Coherence severs from the Administration Console.

Also, keep in mind that you must start the Coherence server from the Console at least once before attempting the operation from WLST.  Otherwise the startup.properties file of the coherence server will not be created and the start command from WLST will fail with the same error:

java.lang.ClassNotFoundException: weblogic.nodemanager.server.provider.WeblogicCacheServer

Let me know if you encounter any other issues related to this in the comment section.

  1. No comments yet.
  1. No trackbacks yet.

Leave a comment