Profile picture for user BPMap

Hello Aris Experts,

I try to migrate a script from Aris 7.2 to Aris 9.6. This script uses a jar file (imported in the script category, and imported in the script).

To explain you the problem, I made a simple test with the following code :



java class in the imported jar :

 

package bpmap.test;
import org.jdom.Element;


public class SimpleTest {
    Element elt;
    public Element test(){
        elt = new Element("test");
        return elt;
    }
}





My code in the script :

 

var simpleTest = new Packages.bpmap.test.SimpleTest();
var result = simpleTest.test();



When I run the script on Aris BA 7.2, it works correctly and creates an instance of my java class. The Method test() return the jdom.Element object. --> OK



I do exactly the same in Aris BA 9.6.

When I run the script on Aris BA 9.6, I have the message : java.lang.NoClassDefFoundError : org/jdom/Element.



The both examples use the same jar file.

I tried with other java classes and I get always the same message.



How can I do with ABA 9.6 to use a jar file ?



Thank you in advance for your help.



Best Regards.

by Torsten Haase
Posted on Mon, 06/16/2014 - 10:41

Hi,

the import of jars from a script is unchanged in ARIS 9. The error message identifies the error: your class (SimpleTest) has been loaded quite well while org.jdom.element has not been loaded.

JDom is used inside ARIS so the reference to jdom should be possible (for example in a script try Context.getXMLParser). But maybe your jar is linked to another version of JDom than the one that is used/provided by ARIS (JDom 1.1)?



BR, Torsten

0
by Tricarico Romain Author
Posted on Mon, 06/16/2014 - 13:36

In reply to by thaase

Hi Torsten,

Thank you for your response.

So I identified exactly what package is used by report :

In the Aris 9.6 script editor, I obtain the following information (in the variable watcher) for a jdom Document :

jdomDoc.getClass().getPackage()   -->  package org.jdom, JDOM Classes, version 1.0    

jdomDoc.getClass().getName()        ---> org.jdom.Document    

jdomDoc.getClass().getResource("")  -->   jar:file:/C:/SoftwareAG/ARIS9.6/server/bin/work/work_abs_s/base/webapps/abs/WEB-INF/lib/jdom-1.1.jar!/org/jdom/

Then in eclipse, I import exactly this pakage (eg. image attached) and only this one in my build path to create the following java class :

package bpmap.testjar;

import org.jdom.Element;

public class Test {
	public Test(){
		 
	};
	
	public static Element getTest(){
		return new Element("coucou");
	};
};



When I import and try to use this class I have again the same problem : java.lang.NoClassDefFoundError: org/jdom/Element.

I don't understand why, I use exactly the same package that is used by report.

Have you try this kind of code on Aris 9.6 by your side? I never had a problem with 7.2.

My example used jdom librairie, but it is the same problem using another one.

In fact, I would like to use libraries located in the pakage : y-aris-server-bl-core-96.0.1.1.jar

<ARIS9.6>\server\bin\work\work_abs_s\base\webapps\abs\WEB-INF\lib

Do you have an input? Is there a bug? Or I do something wrong? but what?

Thank you for your help.

 

BR,



 

File attachments
0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock