issue when migrated from 1.4.7 to (1.5.0 or 1.5.1)

Hi,

When I migrated from 1.4.7 to 1.5.1 am getting the following error:

java.lang.ExceptionInInitializerError
at com.excilys.ebi.gatling.http.Predef$.httpConfig(Predef.scala:40)
at tests.helper.genericProperties$.(testPropertiesHelper.scala:94)
at tests.helper.genericProperties$.(testPropertiesHelper.scala)
at tests.main.Engine$.main(Engine.scala:38)
at tests.main.Engine.main(Engine.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Caused by: java.lang.NullPointerException
at com.excilys.ebi.gatling.http.config.HttpProtocolConfigurationBuilder$.(HttpProtocolConfigurationBuilder.scala:33)
at com.excilys.ebi.gatling.http.config.HttpProtocolConfigurationBuilder$.(HttpProtocolConfigurationBuilder.scala)
at com.excilys.ebi.gatling.http.Predef$.httpConfig(Predef.scala:40)
at tests.helper.genericProperties$.(testPropertiesHelper.scala:94)
at tests.helper.genericProperties$.(testPropertiesHelper.scala)
at tests.main.Engine$.main(Engine.scala:38)
at tests.main.Engine.main(Engine.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

The part of the code where I am getting this error is:

var httpConf: HttpProtocolConfigurationBuilder = httpConfig.baseURL(“some http url”)

The some code is working in 1.4.5, 1.4.6, 1.4.7. When I use 1.5.0 or 1.5.1 am getting the above error. Please suggest me if there is any other way to resolve the issue.

Thanks,
Pradeep

What are tests.main.Engine and tests.helper.genericProperties? Looks like custom code.

If you go to the line where the NPE happens (HttpProtocolConfigurationBuilder line 33), you’ll see it’s most likely that configuration is null (has not been set up).
If your Engine class is a fork of the one generated by the Recorder, please have a look at the class that’s generated in 1.5.1 (can’t help more as I don’t know what your code looks like).

Cheers,

Stéphane