Question

Error NoClassDefFound for Exception Handling in Constructor

this is Constructor in Java Code

public Class MyBook{
    String name;
    public MyBook(){
        try{
            name = "BookName";
        } catch(javax.xml.rpc.ServiceException se){}
    }
}

this is how i call MyBook in RPG

DBookObj   S   O   Class(*java:'com.abc.MyBook')
DMyBook   PR   O   ExtProc(*Java:'com.abc.MyBook':*Constructor)
C        EVAL  BookObj = MyBook()

.

  EVAL BookObj = MyBook() 

give me error

NoClassDefFound: javax.xml.rpc.ServiceException

any solution ? should i create a procedure specifically for this Exception Handler ?

Was it helpful?

Solution

need to download jar containing javax.xml.rpc.ServiceException download jar from here and set your classpath

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top