You must perform some data processing before writing to the tables. Created a trigger, tried on a simple Java class - everything works. But when I downloaded the "combat" class, difficulties arose.


... byte[] initialBytesArray = bigIntegerID.toByteArray(); ArrayList<Byte> bytesList = new ArrayList<>(); for (byte b : initialBytesArray) { bytesList.add(new Byte(b)); } ... 

Swears as follows:

java.sql.SQLException: ORA-29536: incorrectly generated source: Encountered ">" at line

That is, he doesn’t like ArrayList<Byte> and we can’t do without it. Is there any solution to such problems?

    1 answer 1

    I have 2 options:

    1. Oarcle does not support the seventh Java chips, so you need to write ArrayList<Byte> bytesList = new ArrayList<Byte>(); i.e. fully generic declaration.
    2. Oracle does not support fifth Java chips, so generic should not be used at all. In this case, the code will look like ArrayList bytesList = new ArrayList(); , and when extracting elements from bytesList to manually cast them in Byte .
    • Thank you Worked option 1. - VorobyevEvgeniy