file APACHE poi / MAVEN

5 years 1 month ago #3104 by gmistral
Hi,

I work with a commercial licence, and I need to use APACHE poi.
But I think I have a problem of dependency between my version of Poi and your for the module Extract/Import (information given by one people of your Team).

Best regards

All my dependencies are loaded during the build but you can't access to the library !
java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook
	at net.atos./..../.actionPerformed(Export.java:38)
	at com.modeliosoft.modelio.api.mdac.contrib.MdacActionDelegatingHandler.execute(MdacActionDelegatingHandler.java:48)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
	at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at com.modeliosoft.modelio.app.enterprise.intro.Application.start(Application.java:88)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3111 by pan
Hi gmistral,

What is the module extract/import?
Are you developing a module?
What version of Modelio are you using?

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3116 by gmistral
Hi,

I don't use your Extract/Import
I'm trying to create one, and I need to use APACHE POI
The version of Modelio : 2.2

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3118 by pan
In the module.xml file you should add the APACHE POI to the classpath. You can see an example here: Java module.xml (The classpath is defined at line 2 inside the classpath tags).

Let us know if it helps.

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3119 by jmfavre
Bonsoir,
just for the information of who can be interested, I've finally found a way to use jar files (and in particular POI, this was one of my target) from the jython engine (with extending jython class loader), so that both java and python libraries can be used from python. I'm working on building a small framework for developing light weight plugins in python (and java), rather than heavy weight java component. I hope to be able to release a first version in the coming weeks.

With respect to POI I also managed to wrote some connection to google spreadsheet. My goal is to have a component that can read/write both in xls, etc, but also on the cloud. Will be one of the plugin.

Cheese,
Jean-marie

Please Log in or Create an account to join the conversation.

5 years 1 month ago #3120 by gmistral
hello,
thanks for all. first I try with success (not finish but I hope :-)) to create an Export tool and after ... I use the solution given by Pan.

Good luck for your work Jean-Marie

Please Log in or Create an account to join the conversation.

Moderators: tmachmaab
Time to create page: 0.037 seconds
^ Back to Top