I’m faced with an error I can’t seem to explain. I’m attempting to run a batch from an ant script.
I have a class which imports and uses another class, however, my issue is that I cannot create an instance of the imported class. I know this seems trivial, but let me explain a little more. I’m able to declare the object, but not instantiate it. Here’s an example of what it looks like:
package craPackage;
import craPackage.objectClass;
public class mainClass {
public void executeMethod(){
System.out.println(“Test1”);
objectClass obj;
System.out.println(“Test2”);
obj = new objectClass();
System.out.println(“Test3”);
obj.objectMethod();
System.out.println(“Test4”);
}
}
So what’s happening, in relation to my example, is that execution is stopping after instantiating the obj Object (obj = new objectClass();). So my console will have printed Test1 and Test2, but not Test3 or Test4. I’ve already done some toying around, I’ve attempted to declare that class outside of the method, I’ve put a println in the objectClass constructor (which doesn’t show up, which means it’s not even getting to the constructor). I’ve also tried putting it all into a try, catch block, but no exception is caught, it just stops executing. Also, I know the class is deployed with the EAR file, because I’ve seen it in there, and I don’t think it would matter with the import anyway