Home > Mobile >  Getting org.jpos.core.ConfigurationException: Port value not set Error
Getting org.jpos.core.ConfigurationException: Port value not set Error

Time:10-08

Below is the log in the console generated while running from springboot..

error starting service Port value not set org.jpos.core.ConfigurationException: Port value not set at org.jpos.q2.iso.QServer.initServer(QServer.java:92) at org.jpos.q2.iso.QServer.startService(QServer.java:155) at org.jpos.q2.QBeanSupport.start(QBeanSupport.java:118) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262) at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814) at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) at org.jpos.q2.QFactory.startQBean(QFactory.java:187) at org.jpos.q2.Q2.start(Q2.java:576) at org.jpos.q2.Q2.deploy(Q2.java:360) at org.jpos.q2.Q2.run(Q2.java:220) at java.base/java.lang.Thread.run(Thread.java:833)

How to fix this?

Below is my code to start q2 server and deploy xml configuration file.. @SpringBootApplication public class JposApplication implements CommandLineRunner {

public static void main(String[] args) {
    SpringApplication.run(JposApplication.class, args);
}
@Override
public void run(String...args) 
{
    Q2 q2 =new Q2();
    q2.start();
}

}

CodePudding user response:

Your QServer is probably missing the attribute to set the port in which it must listen, you need to add something like this in the QServer deploy file:

<qserver ...>
    <attr name="port" type="java.lang.Integer">5555</attr>
    ....
</qserver>

CodePudding user response:

It might be saying to specify the port number.

You can always specify or change the port numbers of application as below

  • Go to your_project->application.properties

Add below line in that file.

# port number can be like 8081, 9090, 9091. replace XXXX with it.
server.port=XXXX 
  • Related