it is unknown if he ever served in the austrian military, however he was almost certainly in the local landwehr battalions raised by the austrian government in 1808. during the 1809 campaign, a gottscheer battalion was stationed on the italian front and after austria's military collapse they returned to their home region. when the french advanced into carniola and towards gottschee in july, 900 gottscheer landwehr soldiers assembled to resist the advance. they were quickly dispersed by the french columns, however it would be very likely that johann erker was one of those men. he may also have played a role in the riots of september 10 in the city square, where the french district commissioner resorted to calling in a battalion to disband the 600 rioters trapping him in the city.