Apache POI Workbook class not found
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
First, I want let you know what I'm using:
- Eclipse IDE 2018-09 (4.9.0) Java-SE 10
- Apache POI 4.0.0-20180907
I don't mixing any JARs files with other version and I add to my project all the JARs in the folder except "poi-examples-4.0.0".
Let take a look of this code:
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new HSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
And if I'm trying this code:
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new XSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Can someone can explain me what I'm doing wrong?
java apache-poi
add a comment |
First, I want let you know what I'm using:
- Eclipse IDE 2018-09 (4.9.0) Java-SE 10
- Apache POI 4.0.0-20180907
I don't mixing any JARs files with other version and I add to my project all the JARs in the folder except "poi-examples-4.0.0".
Let take a look of this code:
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new HSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
And if I'm trying this code:
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new XSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Can someone can explain me what I'm doing wrong?
java apache-poi
Maven dependency to use:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
1
NoClassDefFoundError
is a run time error. So while compile time the classHSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for usingXSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.
– Axel Richter
Nov 16 '18 at 15:04
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34
add a comment |
First, I want let you know what I'm using:
- Eclipse IDE 2018-09 (4.9.0) Java-SE 10
- Apache POI 4.0.0-20180907
I don't mixing any JARs files with other version and I add to my project all the JARs in the folder except "poi-examples-4.0.0".
Let take a look of this code:
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new HSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
And if I'm trying this code:
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new XSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Can someone can explain me what I'm doing wrong?
java apache-poi
First, I want let you know what I'm using:
- Eclipse IDE 2018-09 (4.9.0) Java-SE 10
- Apache POI 4.0.0-20180907
I don't mixing any JARs files with other version and I add to my project all the JARs in the folder except "poi-examples-4.0.0".
Let take a look of this code:
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new HSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
And if I'm trying this code:
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Program
{
public static void main(String args)
{
Workbook workbook = new XSSFWorkbook();
}
}
I getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook
at Program.main(Program.java:8)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbook
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 1 more
Can someone can explain me what I'm doing wrong?
java apache-poi
java apache-poi
asked Nov 16 '18 at 13:29
HazanHazan
12
12
Maven dependency to use:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
1
NoClassDefFoundError
is a run time error. So while compile time the classHSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for usingXSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.
– Axel Richter
Nov 16 '18 at 15:04
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34
add a comment |
Maven dependency to use:<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
1
NoClassDefFoundError
is a run time error. So while compile time the classHSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for usingXSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.
– Axel Richter
Nov 16 '18 at 15:04
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34
Maven dependency to use:
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
Maven dependency to use:
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
1
1
NoClassDefFoundError
is a run time error. So while compile time the class HSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for using XSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.– Axel Richter
Nov 16 '18 at 15:04
NoClassDefFoundError
is a run time error. So while compile time the class HSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for using XSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.– Axel Richter
Nov 16 '18 at 15:04
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338866%2fapache-poi-workbook-class-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53338866%2fapache-poi-workbook-class-not-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Maven dependency to use:
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>4.0.0</version> </dependency>
– XtremeBaumer
Nov 16 '18 at 13:38
1
NoClassDefFoundError
is a run time error. So while compile time the classHSSFWorkbook
was found. But on run time the same class was not found. So there must be a discrepancy between class path settings compile time vs. run time. Check your IDE settings for that. But for usingXSSFWorkbook
please read: Can Apache POI be compiled/used with Java 10 or newer?.– Axel Richter
Nov 16 '18 at 15:04
@AxelRichter thank you very much, do you have any suggestion for alternative project that support java 10?
– Hazan
Nov 16 '18 at 15:10
Apache POI does support Java 10, just not with modules, see the FAQ which Axel linked to!
– Gagravarr
Nov 16 '18 at 16:34