googleads-java-lib icon indicating copy to clipboard operation
googleads-java-lib copied to clipboard

Issue while initializing AdManagerServices

Open ChrisBafaro opened this issue 5 months ago • 0 comments

We are currently facing an issue while using the java classes in our applications. The error is raised on this code line: AdManagerServices adManagerServices = new AdManagerServices();

The error raised is the following:

"Invocation of static Method 'getIdCreative(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)' from Class 'admanager.axis.v202408.createcreativesfromtemplates' with arguments [java.lang.String contentType, java.lang.String advertiserId, java.lang.String orderId, java.lang.String creativeTemplateId, java.lang.String name, java.lang.Integer height, java.lang.Integer width, java.lang.String destinationUrl, java.lang.String imageURL, java.lang.String networkCode, java.lang.String applicationName, java.lang.String filePath] resulted in an error.
Expected arguments are [java.lang.String contentType, java.lang.String advertiserId, java.lang.String orderId, java.lang.String creativeTemplateId, java.lang.String name, int height, int width, java.lang.String destinationUrl, java.lang.String imageURL, 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.<init>(AdsAxisEngineConfigurationFactory.java:34)
  while locating AdsAxisEngineConfigurationFactory
  at AxisHandler.<init>(AxisHandler.java:56)
      \_ for 1st parameter
  while locating AxisHandler
  at AxisModule.configure(AxisModule.java:59)
      \_ installed by: AdManagerAxisModule -> AxisModule
  while locating SoapClientHandlerInterface

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:
========================
 [Not accessible. Value obtained from method: getDetailedDescription()]"

With DEBUG we find this two logs as well:

DEBUG 2024-09-11 17:40:01,434 [[MuleRuntime].uber.12: [m4-large-account-api].creazioneOrdineGamFlow.BLOCKING @783a3df1] [processor: createCreatives/processors/1/processors/0; event: 1b370890-7054-11ef-8e40-28c5d2951078] com.google.api.ads.common.lib.utils.logging.AdsServiceLoggers.ads_api_lib: Could not load optional configuration: ConfigurationInfo{location=ads.properties, isOptional=true}
DEBUG 2024-09-11 17:40:01,821 [[MuleRuntime].uber.12: [m4-large-account-api].creazioneOrdineGamFlow.BLOCKING @783a3df1] [processor: createCreatives/processors/1/processors/0; event: 1b370890-7054-11ef-8e40-28c5d2951078] com.google.api.ads.common.lib.utils.logging.AdsServiceLoggers.ads_api_lib: Could not load optional configuration: ConfigurationInfo{location=ads.properties, isOptional=true}

We are currently working on Mulesoft 4.6.7 and JDK 17. (both on local and cloudhub) Everything used to work fine with JDK 8.

ChrisBafaro avatar Sep 11 '24 15:09 ChrisBafaro