so im using the getRollBackOnly method located under EjbComponent class that implements org.jboss.logging.BasicLogger interface :
public boolean getRollbackOnly() throws IllegalStateException {
if (isBeanManagedTransaction())
throw EjbLogger.ROOT_LOGGER.failToCallgetRollbackOnly();
try {
TransactionManager tm = getTransactionManager();
if (tm.getTransaction() == null)
throw EjbLogger.ROOT_LOGGER.failToCallgetRollbackOnlyOnNoneTransaction();
int status = tm.getStatus();
EjbLogger.ROOT_LOGGER.tracef("Current transaction status is %d", status); //this ligne is causing the error
switch (status) {
case 3:
case 4:
throw EjbLogger.ROOT_LOGGER.failToCallgetRollbackOnlyAfterTxcompleted();
case 1:
case 9:
return true;
}
return false;
} catch (SystemException se) {
EjbLogger.ROOT_LOGGER.getTxManagerStatusFailed((Throwable)se);
return true;
}
EJBLogger interface target line :
public static final EjbLogger ROOT_LOGGER = (EjbLogger)Logger.getMessageLogger(EjbLogger.class, "org.jboss.as.ejb3");
the exception that i had :
Caused by: java.lang.NoSuchMethodError: org.jboss.as.ejb3.logging.EjbLogger.tracef(Ljava/lang/String;I)V at org.jboss.as.ejb3.component.EJBComponent.getRollbackOnly(EJBComponent.java:358) at org.jboss.as.ejb3.component.session.SessionBeanComponent.getRollbackOnly(SessionBeanComponent.java:100) at org.jboss.as.ejb3.context.EJBContextImpl.getRollbackOnly(EJBContextImpl.java:90) at org.jboss.as.ejb3.context.SessionContextImpl.getRollbackOnly(SessionContextImpl.java:133)
does anyone know why I'm getting this error? ps:i have already jboss-logging jar
thanks .
for whom who got the exception, i have fixed the problem by using the latest version of jboss-logging library ( jboss-logging-3.4.1.Final)