On version 2.1, it's commenting the following definition in applicationContent.xml:
<bean id="terminalConnectionFactory"
class="org.openlegacy.terminal.mock.MockStateMachineTerminalConnectionFactory"
p:verifySend="true" p:root="/trails" p:trailName="demo_session.trail"
p:exactCursor="false" p:exactFields="false" p:exactCommand="true" />
Make sure pom.xml has tn5250j or h3270 dependency
Also make sure host.properties has the right host settings.
On 2.2, refer to previous thread.