<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Jython Console for my projects</title><link>https://answers.axonivy.com/questions/1054/jython-console-for-my-projects</link><description>&lt;p&gt;Is there a way to use the jython standalone console application with my Project classes?
My Project classes can be used unless they have some kind of Ivy-context. When I try to create an instance of a 'Dao', it tells me that Ivy could not be initialized... (Ivy.persistence().get...)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: Could not initialize class ch.ivyteam.ivy.environment.Ivy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is there a way to setup this correctly?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1054/jython-console-for-my-projects" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 01 Dec 2014 12:30:43 -0500</lastBuildDate><item><title>Answer by Reto Weiss</title><link>https://answers.axonivy.com/questions/1054/jython-console-for-my-projects/1072</link><description>&lt;p&gt;The Ivy.persistence() method does only work in a Axon.ivy context. In a Jython context it will not be available or will not work correctly because the whole Axon.ivy runtime is not available. &lt;/p&gt;
&lt;p&gt;If you want to use your ivy project DAO's you have to provide your own implementation for the EntityManager in Jython. E.g. provide an implemention of Ivy.persistence() by yourself and any other ivy specific function you use in your DAO's.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reto Weiss</dc:creator><pubDate>Mon, 01 Dec 2014 12:30:43 -0500</pubDate><guid>https://answers.axonivy.com/questions/1054/jython-console-for-my-projects/1072</guid></item><item><title>Answer by beatjost</title><link>https://answers.axonivy.com/questions/1054/jython-console-for-my-projects/1058</link><description>&lt;p&gt;You'll find the download for the 'Jython standalone' here:
&lt;a href="http://www.jython.org/downloads.html"&gt;Jython download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I created a 'bat' file to run it (because of classpath sSettings).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java -jar jython-standalone-2.5.4-rc1.jar -Dpython.path=MyClasspathDir's
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I try to instanciate a DataAccessObject (fails at Ivy.persistence().get...)&lt;/p&gt;
&lt;p&gt;Hope this helps. The idea was to have a interactive application console...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">beatjost</dc:creator><pubDate>Wed, 26 Nov 2014 17:03:22 -0500</pubDate><guid>https://answers.axonivy.com/questions/1054/jython-console-for-my-projects/1058</guid></item></channel></rss>