org.kuali.rice.core.api.config.ConfigurationException: SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead.

Kuali JIRA | Gayathri Athreya | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Some of our lookups are throwing the following STE {code} Area of Research look up: ******************Stack Trace-Only shown when not in production***************** org.kuali.rice.core.api.config.ConfigurationException: SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead. at org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.nextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:52) at org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.getNextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:98) at org.kuali.rice.krad.service.impl.SequenceAccessorServiceImpl.getNextAvailableSequenceNumber(SequenceAccessorServiceImpl.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) {code} This is because the KualiMultivalueLookupAction.java does this {code} multipleValueLookupForm.jumpToFirstPage(resultTable.size(), maxRowsPerPage); SequenceAccessorService sas = KNSServiceLocator.getSequenceAccessorService(); Long nextSeq = sas.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE); String lookupResultsSequenceNumber = nextSeq.toString(); {code} if you trace that call into the getNextAvailableSequenceNumber method, you will eventually get to this code block {code:title=SequenceAccessorDaoJdbc.java} public Long getNextAvailableSequenceNumber(String sequenceName) { // Use DocumentHeader to get the dataSourceName associated with KNS return nextAvailableSequenceNumber(sequenceName, DocumentHeader.class); } {code} As you can see, this line passes the DocumentHeader.java class to get the next available sequence number. However, DocumentHeader.java is managed by JPA so the following lines throws a STE {code:title=SequenceAccessorDaoJdbc.java} if (!LegacyUtils.useLegacy(clazz)) { throw new ConfigurationException("SequenceAccessorService should not be used with new data framework! Use " + MaxValueIncrementerFactory.class.getName() + " instead."); } {code} Everywhere Rice code passes the DocumentHeader.java into the SequenceAccessorService needs to be modified to use the MaxValueIncrementerFactory.java. I am not sure what the intention of keeping that code the same but then throwing an exception in the Dao class was.

    Kuali JIRA | 3 years ago | Gayathri Athreya
    org.kuali.rice.core.api.config.ConfigurationException: SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead.
  2. 0

    Some of our lookups are throwing the following STE {code} Area of Research look up: ******************Stack Trace-Only shown when not in production***************** org.kuali.rice.core.api.config.ConfigurationException: SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead. at org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.nextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:52) at org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.getNextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:98) at org.kuali.rice.krad.service.impl.SequenceAccessorServiceImpl.getNextAvailableSequenceNumber(SequenceAccessorServiceImpl.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) {code} This is because the KualiMultivalueLookupAction.java does this {code} multipleValueLookupForm.jumpToFirstPage(resultTable.size(), maxRowsPerPage); SequenceAccessorService sas = KNSServiceLocator.getSequenceAccessorService(); Long nextSeq = sas.getNextAvailableSequenceNumber(KRADConstants.LOOKUP_RESULTS_SEQUENCE); String lookupResultsSequenceNumber = nextSeq.toString(); {code} if you trace that call into the getNextAvailableSequenceNumber method, you will eventually get to this code block {code:title=SequenceAccessorDaoJdbc.java} public Long getNextAvailableSequenceNumber(String sequenceName) { // Use DocumentHeader to get the dataSourceName associated with KNS return nextAvailableSequenceNumber(sequenceName, DocumentHeader.class); } {code} As you can see, this line passes the DocumentHeader.java class to get the next available sequence number. However, DocumentHeader.java is managed by JPA so the following lines throws a STE {code:title=SequenceAccessorDaoJdbc.java} if (!LegacyUtils.useLegacy(clazz)) { throw new ConfigurationException("SequenceAccessorService should not be used with new data framework! Use " + MaxValueIncrementerFactory.class.getName() + " instead."); } {code} Everywhere Rice code passes the DocumentHeader.java into the SequenceAccessorService needs to be modified to use the MaxValueIncrementerFactory.java. I am not sure what the intention of keeping that code the same but then throwing an exception in the Dao class was.

    Kuali JIRA | 3 years ago | Gayathri Athreya
    org.kuali.rice.core.api.config.ConfigurationException: SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead.

    Root Cause Analysis

    1. org.kuali.rice.core.api.config.ConfigurationException

      SequenceAccessorService should not be used with new data framework! Use org.kuali.rice.krad.data.platform.MaxValueIncrementerFactory instead.

      at org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.nextAvailableSequenceNumber()
    2. org.kuali.rice
      SequenceAccessorServiceImpl.getNextAvailableSequenceNumber
      1. org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.nextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:52)
      2. org.kuali.rice.krad.dao.jdbc.SequenceAccessorDaoJdbc.getNextAvailableSequenceNumber(SequenceAccessorDaoJdbc.java:98)
      3. org.kuali.rice.krad.service.impl.SequenceAccessorServiceImpl.getNextAvailableSequenceNumber(SequenceAccessorServiceImpl.java:43)
      3 frames
    3. Java RT
      NativeMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      2 frames