Dear all,
I need to migrate my java application from mysql to oracle 11g.
First of all I changed connection string and application now links correctly to oracle.
I've an issue with criteria working.
I've a criteria
Code:
Criteria foldersCriteria = createCriteria(BCKFolder.class);
foldersCriteria.add(Restrictions.ne("status", BackupFolderStatuses.CLOSE));
foldersCriteria.addOrder(Order.asc("status"));
foldersCriteria.addOrder(Order.asc("order"));
List<BCKFolder> folders = foldersCriteria.list();
where "BackupFolderStatuses" is an enum field.
This is how enum is defined
Code:
public enum BackupFolderStatuses
{
READY, IN_USE, CLOSE;
public String toString()
{
return ResourcesHelper.getString(EnumHelper.toStringFormatter(this));
};
}
At criteria creation moment debug shows me
Code:
com.sun.jdi.InvocationException occurred invoking method.
but when criteria is executed (" foldersCriteria.list()"), my application throws exception
Code:
2017-04-06 14:37:12,486 [ERROR] it.nexera.web.services.PathCheckerService java.lang.NullPointerException at it.nexera.common.helpers.LogHelper.log(LogHelper.java:28)
2017-04-06 14:37:12,486 [ERROR] it.nexera.web.services.PathCheckerService java.lang.NullPointerException
at it.nexera.web.services.PathCheckerService.createMessage(PathCheckerService.java:209)
at it.nexera.web.services.PathCheckerService.checkFolder(PathCheckerService.java:148)
at it.nexera.web.services.PathCheckerService.checkPath(PathCheckerService.java:85)
at it.nexera.web.services.PathCheckerService.routineFuncInternal(PathCheckerService.java:68)
at it.nexera.web.services.base.BaseService.routineFunc(BaseService.java:188)
at it.nexera.web.services.base.BaseDBService.runInternal(BaseDBService.java:59)
at it.nexera.web.services.base.BaseService.run(BaseService.java:99)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
at it.nexera.common.helpers.LogHelper.log(LogHelper.java:29)
Please consider that the same code works like a charm with MySql.
Can you help me please?
Thanks,
Best Regards