Pasindu Thejan
Pasindu Thejan

Reputation: 37

How to solve "WrapperSimpleApp: Unable to locate the class ..." in tanukisoftware wrapper

I have got error when running tanukisoftware wrapper.

wrapper  | --> Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    | 
jvm 1    | WrapperSimpleApp: Unable to locate the class com.aplova.productimagesautouploader.ProductImagesAutoUploaderApplication.class: java.lang.ClassNotFoundException: com.aplova.productimagesautouploader.ProductImagesAutoUploaderApplication.class
jvm 1    | 
jvm 1    | WrapperSimpleApp Usage:
jvm 1    |   java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_arguments]
jvm 1    | 
jvm 1    | Where:
jvm 1    |   app_class:      The fully qualified class name of the application to run.
jvm 1    |   app_arguments:  The arguments that would normally be passed to the
jvm 1    |                   application.
wrapper  | <-- Wrapper Stopped

I'm new to creating wrappers and no idea about this error. My wrapper.conf looks like this,

#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=java
wrapper.working.dir=..

# 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
set.default.REPO_DIR=lib
set.APP_BASE=.

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=lib/wrapper.jar
wrapper.java.classpath.2=conf
wrapper.java.classpath.3=%REPO_DIR%/product-images-auto-uploader-0.0.1-SNAPSHOT.jar
wrapper.java.classpath.4=%REPO_DIR%/spring-boot-configuration-processor-2.3.2.RELEASE.jar
wrapper.java.classpath.5=%REPO_DIR%/thumbnailator-0.4.11.jar

And lib directory also have needed jar files. So, How to solve this error.

Upvotes: 1

Views: 3044

Answers (1)

Pasindu Thejan
Pasindu Thejan

Reputation: 37

I found the solution. This error from pom.xml . In pom there was

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> 

and

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>appassembler-maven-plugin</artifactId>
    <version>1.10</version>
    <configuration>
    ...

both plugins. But only need plugin is appassembler-maven-plugin. So, after remove spring-boot-maven-plugin it's working.

As a conclusion, this error occur because of spring-boot-maven-plugin replace jar file which is generated by appassembler-maven-plugin.

Upvotes: 2

Related Questions