Featured post
reflection - WebSphere wsadmin ClassNotFound Exceptions -
i'm trying use wsadmin jython deploy ear file. before actual deployment, need run db update using java class. i'm running classnotfoundexception isn't making sense me.
background: ear file exploded. wsadmin tool started following options:
-wsadmin_classpath %cp% -javaoption -dpython.path=%cp%
both of point same classpath, contains necessary jars.
the jython script gets connection database, , calls utility class create database script. utility class uses reflection load other classes classpath (that hard-and-fast requirement of library using, can't changed). looks this:
from liquibase import liquibase def main(args): conn = getconnection(args) updater = liquibase(conn) updater.update()
during update() method, liquibase uses reflection instantiate java classes. classnotfoundexception, example classnotfoundexception: com.foo.customupdate
in script, can import com.foo.customupdate class , no errors:
from com.foo import customupdate c = customupdate("select 1") print c.getupdate()
so know class on classpath. idea has reflection aspect of library using. has else run against this?
my other idea, if above unfixable, split things out shell script , use java run db update , wsadmin deploy ear.
- Get link
- X
- Other Apps
Comments
Post a Comment