I’m working on an app that is being used in preparing the merger of two databases. One of the screens in this app is used to modify and create new organization profiles for the security part of the system being converted.

I handed over the functionality last week and this week they started using it. The end user immediately get the error below, when they moved one item from the left to the right, in the department shuttle.

When moving one department unit from the left side to the right side of the shuttle, they immediately get the above error message.

I log on and I don’t get the error. I check my code to see if I have accidently used plain “listagg” somewhere.

SELECT RTRIM(
         XMLCAST(
           XMLAGG(
             XMLELEMENT(e, UNITGID, ':') ORDER BY UNITGID
           ) AS CLOB
         ), 
       ':')
INTO :P35_AVDELING
FROM HNZ_DWACCESSPROFILEUNIT au
WHERE EXISTS (
    SELECT 1
    FROM dipscoredb.dwavdeling@source a
    WHERE
      a.enhetgid = au.unitgid
      and au.accessprofilegid=:P35_ORG_PROFIL
);

The code block above is the code to select all the right side values already selected in the shuttle for department. I have used xmlagg to avoid having issues like the error the user experienced. Xmlagg returns a clob and it should be big enough to hold “The Big, enormous, beautiful bill” and the total ego of the “Orange Man” in America, without running out of space. So the error is not from this part of the code.

Below is the code to save the right side values to the table containing these values. Table(apex_string.split…) should also be no problem.

insert into HNZ_DWACCESSPROFILEUNIT (ACCESSPROFILEGID, UNITGID)
select :P35_ORG_PROFIL,
       s.column_value
from   table(apex_string.split(:P35_AVDELING, ':')) s
where  not exists (
       select 1
       from   HNZ_DWACCESSPROFILEUNIT t
       where  t.ACCESSPROFILEGID = :P35_ORG_PROFIL
       and    t.UNITGID = s.column_value
);

Well, it works on my computer. What now!

We start comparing what browser is in use. For one of the user the environment is slightly different, but for another we are on the exact same server running this app through the same browser.

So I try to login with one of the other users apex account. The I also get the same error immediately. So that leads me to check the user register in apex. I’m logged in with a developer account and they as regular end users in apex, plain apex login.

The screen show the screen for selecting departments, sections, wards and locations in to a organization profile. The four shuttle lists have some custom JavaScript to color the departments, sections, wards and locations that is not in use any more. The section, ward and location shuttle are all connected to the department shuttle, and updates according to the selected departments. I also tried comment out that part to see if it could have something to do with the problem. But no, it was not a part of the problem.

I tried making the other user a developer user and logged in again with that account. Still the same problem. I compared my account to his account. I input the missing first name and last name for this user. Still the same problem. The only part left, different is that he has an email as user name and i have a short username with no at sign (@).

I remove the at sign and the rest of the email part, keeping only the name as username. I try logging in again. Now the error is gone!!!!

So this innocent, one of the most used signs in the world: @, caused this problem in the shuttle list. Anyone else who has experienced this?

Please leave a comment if you have any questions!

Leave a Reply


Oppdag mer fra Standal.blog

Abonner for å få de siste innleggene sendt til din e-post.

Håvard Standal avatar

Published by

Discover more from Standal.blog

Subscribe now to keep reading and get access to the full archive.

Continue reading