JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
November 12, 2019, 01:20:14 AM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: [solved]:Starting Windows Service fails WrapperSimpleApp ... ObjectWrapping  (Read 6406 times)

stefaneidelloth

  • Guest

When I try to start the Windows service on WindowsServer 2012R2 I get following issue:

Code: [Select]
STATUS | wrapper  | 2014/08/15 10:23:36 | --> Wrapper Started as Service
STATUS | wrapper  | 2014/08/15 10:23:36 | Java Service Wrapper Community Edition 32-bit 3.5.25
STATUS | wrapper  | 2014/08/15 10:23:36 |   Copyright (C) 1999-2014 Tanuki Software, Ltd. All Rights Reserved.
STATUS | wrapper  | 2014/08/15 10:23:36 |     http://wrapper.tanukisoftware.com
STATUS | wrapper  | 2014/08/15 10:23:36 |
STATUS | wrapper  | 2014/08/15 10:23:37 | Launching a JVM...
INFO   | jvm 1    | 2014/08/15 10:23:37 | WrapperManager: Initializing...
INFO   | jvm 1    | 2014/08/15 10:23:37 | driver process id: 18884, uuid: BC571CB2-6EAD-61DC-9C2D-3242B858AA47
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp:
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: Encountered an error running main:
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: java.lang.NoClassDefFoundError: javax/management/remote/generic/ObjectWrapping
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.defineClass1(Native Method)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.defineClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.security.SecureClassLoader.defineClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader.defineClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader.access$100(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.jppf.management.JMXMPServer.start(JMXMPServer.java:92)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.jppf.server.DriverInitializer.createJMXServer(DriverInitializer.java:284)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.jppf.server.DriverInitializer.initJmxServer(DriverInitializer.java:266)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.jppf.server.JPPFDriver.run(JPPFDriver.java:167)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.jppf.server.JPPFDriver.main(JPPFDriver.java:348)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.reflect.Method.invoke(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:290)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: Caused by: java.lang.ClassNotFoundException: javax.management.remote.generic.ObjectWrapping
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader$1.run(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.net.URLClassLoader.findClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: at java.lang.ClassLoader.loadClass(Unknown Source)
INFO   | jvm 1    | 2014/08/15 10:23:59 | WrapperSimpleApp Error: ... 23 more
STATUS | wrapper  | 2014/08/15 10:24:01 | <-- Wrapper Stopped


My "wrapper-driver.conf"-file is

Code: [Select]
#------------------------------------------------------------------------------#
# JPPF                                                                         #
# Copyright (C) 2005-2007 JPPF Team.                                           #
# http://www.jppf.org                                                          #
#                                                                              #
# Licensed under the Apache License, Version 2.0 (the "License");              #
# you may not use this file except in compliance with the License.             #
# You may obtain a copy of the License at                                      #
#                                                                              #
# http://www.apache.org/licenses/LICENSE-2.0                                #
#                                                                              #
# Unless required by applicable law or agreed to in writing, software          #
# distributed under the License is distributed on an "AS IS" BASIS,            #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.     #
# See the License for the specific language governing permissions and          #
# limitations under the License.                                               #
#------------------------------------------------------------------------------#

#********************************************************************
# Configuration file to run a JPPF node with Java Service Wrapper.
# See url=http://www.jppf.org/wiki/index.php?title=Installing
# for details on the installation.
#
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java

# Java Main class.  This class must implement the WrapperListener interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=wrapper.jar
wrapper.java.classpath.2=lib/jppf-common-node.jar
wrapper.java.classpath.3=lib/jppf-common.jar
wrapper.java.classpath.4=lib/jppf-server.jar
wrapper.java.classpath.5=lib/slf4j-api-1.6.1.jar
wrapper.java.classpath.6=lib/slf4j-log4j12-1.6.1.jar
wrapper.java.classpath.7=lib/log4j-1.2.15.jar
wrapper.java.classpath.8=lib/jmxremote_optional-1.0_01-ea.jar
wrapper.java.classpath.9=./config

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=.

# The java executable (if not specified, the first java in the PATH environment is used)
wrapper.java.command=D:\java\java7\bin\java.exe

# Java Additional Parameters
wrapper.java.additional.1=-Djppf.config=jppf-driver.properties
wrapper.java.additional.2=-Dlog4j.configuration=log4j-driver.properties
wrapper.java.additional.3=-Djava.awt.headless=true
# to use a server JVM, make sure the java command points to a JDK, not a JRE
#wrapper.java.additional.4=-server

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.jppf.server.JPPFDriver
wrapper.app.parameter.2=noLauncher

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=wrapper-driver.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=JPPF Driver

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=JPPF Driver

# Display name of the service
wrapper.ntservice.displayname=JPPF Driver

# Description of the service
wrapper.ntservice.description=JPPF Driver

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=

# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Set the priority of the service (valid values are LOW, NORMAL, HIGH. REALTIME)
wrapper.ntservice.process_priority=NORMAL

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

#Ignore Windows LOGOFF events when running in console mode.
wrapper.ignore_user_logoffs=true


#********************************************************************
# Behavior on exit code
#********************************************************************

wrapper.on_exit.default=SHUTDOWN
# restart the driver when java exit code = 2
wrapper.on_exit.2=RESTART


If i try to use java 1.5u11 instead of java7 I get following error:

INFO   | jvm 2    | 2014/08/15 10:38:20 | WrapperSimpleApp Error: Class org.jppf.server.JPPFDriver found but could not be initialized: java.lang.UnsupportedClassVersionError: Bad version number in .class file

(There is a jar file "jppf-jmxremote_optional-1.1.jar" in the lib folder of the driver. Should this jar file provide the missing
"javax/management/remote/generic/ObjectWrapping" ? If yes, does this jar file require a distinct java version?)

« Last Edit: August 15, 2014, 11:23:36 AM by stefaneidelloth »
Logged

stefaneidelloth

  • Guest

I copied a newer version of the jmxremote jar (link below) in the lib folder of the driver and referenced it in the configuration file wrapper-driver.conf
http://www.java2s.com/Code/JarDownload/jmxremote/jmxremote_optional-repackaged-4.0.jar.zip

This resolves the issue.

(Furthermore, I am using a 64 bit-Version of the wrapper which is available here: http://www.krenger.ch/blog/java-service-wrapper-3-5-14-for-windows-x64/ together with a 64 bit version of java. Therefore, the settings file of my first post is not up to date.)
« Last Edit: August 15, 2014, 11:27:57 AM by stefaneidelloth »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2256
    • JPPF Web site

Hello,

Thanks for reporting this issue and sharing your solution. Indeed, the problem is with the location of the JMX remote jar. In the wrapper-node.conf file in JPPF 4.2, there is this line:
wrapper.java.classpath.6=lib/jmxremote_optional-1.0_01-ea.jar

instead, it should be:
wrapper.java.classpath.6=lib/jppf-jmxremote_optional-1.1.jar

I registered this as a bug in the JPPF configuration: JPPF-311 Incorrect JMX remote classpath in wrapper-driver.conf and wrapper-node.conf. The fix will be part of the maintenance release v4.2.1, which I will release later today.

Thanks again,
-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads