WebSphere class exceptions wsadmin ClassNotFound

I am trying to use wsadmin with Jython to deploy an EAR file. Before actually deploying, I need to run a database update using the Java class. I am throwing a ClassNotFoundException, which makes no sense to me.

Background: EAR file exploded. The wsadmin tool starts with the following parameters:

-wsadmin_classpath %CP%
-javaoption -Dpython.path=%CP%

Both of them point to the same path to the class that contains all the necessary JARs.

The jython script gets the database connection and calls the utility class to create the database script. The utility class uses reflection to load other classes from the class path (which is a strict requirement of the library that we use, it cannot be changed). It basically looks like this:

from liquibase import Liquibase

def main(args):
    conn = getConnection(args)
    updater = Liquibase(conn)
    updater.update()

update() Liquibase Java. ClassNotFoundException, ClassNotFoundException: com.foo.CustomUpdate

script com.foo.CustomUpdate :

from com.foo import CustomUpdate
c = CustomUpdate("select 1")
print c.getUpdate()

, , . , - , . - - ?

, , , script Java , wsadmin EAR.

+3

Source: https://habr.com/ru/post/1781270/


All Articles