Closed genazenko closed 3 months ago
This PR https://github.com/googleads/googleads-java-lib/pull/278 will solve the issue
Instead of using javax/jakarta inject API we could use google.inject API and it works for both guice 5.0.1 and guice 7.0.0 versions
We are facing a similar issue trying to use the adManager v202405 on Java 17.
The Exception happens on this code line:
AdManagerServices adManagerServices = new AdManagerServices();
This is our Exception: ` Invocation of static Method 'getOrderId(java.lang.String,java.lang.String,java.lang.String,java.lang.String)' from Class 'admanager.axis.v202405.ApproveOrders' with arguments [java.lang.String orderId, java.lang.String networkCode, java.lang.String applicationName, java.lang.String filePath] resulted in an error. Expected arguments are [java.lang.String orderId, java.lang.String networkCode, java.lang.String applicationName, java.lang.String filePath]. Cause: com.google.inject.CreationException - Unable to create injector, see the following errors:
1) [Guice/ErrorInjectingConstructor]: ExceptionInInitializerError
at AdsAxisEngineConfigurationFactory.
Learn more: https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR
1 error
Full classname legend:
AdManagerAxisModule: "com.google.api.ads.admanager.axis.AdManagerAxisModule" AdsAxisEngineConfigurationFactory: "com.google.api.ads.common.lib.soap.axis.conf.AdsAxisEngineConfigurationFactory" AxisHandler: "com.google.api.ads.common.lib.soap.axis.AxisHandler" AxisModule: "com.google.api.ads.common.lib.soap.axis.AxisModule" SoapClientHandlerInterface: "com.google.api.ads.common.lib.soap.SoapClientHandlerInterface"
End of classname legend:
`
Could your PR resolve this issue?
Hi @ChrisBafaro ! Not sure if it's the same issue. But my original issue was fixed with the new release version (5.6.0). So I'm closing this issue. Feel free to open new one if it's still the case
Hi! We have a problem when trying to use java library in the application with the latest guice version (7.0.0). In that case we are getting an error when trying to initialize AdManagerServices
Current version of java library is using 5.0.1 version of guice with an
javax.inject.Inject
annotation. But the latest version of guice is usingjakarta.inject.Inject
annotation.Could you please upgrade java library in order to support jakarta API and the latest guice version?
We are using
com.google.api-ads:ads-lib:5.0.0
andcom.google.api-ads:dfp-axis:5.0.0
libraries with guice 7.0.0.