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...)

java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: Could not initialize class ch.ivyteam.ivy.environment.Ivy

Is there a way to setup this correctly?

asked 26.11.2014 at 10:41

beatjost's gravatar image

accept rate: 0%

Can you provide more information how you call the jython standalone console application and what kind script you execute in it?

(26.11.2014 at 16:50) Reto Weiss ♦♦ Reto%20Weiss's gravatar image

@Reto: did this post cover your expectations? Or do you need more info?

(01.12.2014 at 10:38) beatjost beatjost's gravatar image

You'll find the download for the 'Jython standalone' here: Jython download

I created a 'bat' file to run it (because of classpath sSettings).

java -jar jython-standalone-2.5.4-rc1.jar -Dpython.path=MyClasspathDir's

Then I try to instanciate a DataAccessObject (fails at Ivy.persistence().get...)

Hope this helps. The idea was to have a interactive application console...


answered 26.11.2014 at 17:03

beatjost's gravatar image

accept rate: 0%

edited 27.11.2014 at 07:42

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.

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.


answered 01.12.2014 at 12:30

Reto%20Weiss's gravatar image

Reto Weiss ♦♦
accept rate: 74%

Actually I created a 'standalone' project to refer first in classpath... with some classes this was working (JPA-EM). Thanks.

(12.01.2015 at 13:27) beatjost beatjost's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 26.11.2014 at 10:41

Seen: 1,602 times

Last updated: 12.01.2015 at 13:27