The XE version has some restrictions on the number of processes.
Log into the database as SYS and run the command
where SomeValue is something higher than 100, try 200.
You'd need to restart the database after running that command.
And yes, don't repeat yourself in the code. Create reusable classes/methods.