Error when trying to connect to Azure Eventhub: AzureTokenCredentials / IllegalArgumentException: name - java

I am following a tutorial on how to setup a connection to Azure EventHub in Spring Boot: [1]
When starting the spring boot app, I get the following error:
2021-01-07 13:37:25.447 WARN 16444 --- [ main] ConfigServletWebServerApplicationContext :
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
'resourceManagerProvider' defined in class path resource
[com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Unsatisfied
dependency expressed through method 'resourceManagerProvider' parameter 0; nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'azure'
defined in class path resource
[com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Unsatisfied
dependency expressed through method 'azure' parameter 0; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'credentials'
defined in class path resource
[com/microsoft/azure/spring/cloud/autoconfigure/context/AzureContextAutoConfiguration.class]: Bean
instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[com.microsoft.azure.credentials.AzureTokenCredentials]: Factory method 'credentials' threw exception;
nested exception is java.lang.IllegalArgumentException: name
my.azureauth looks like analogous to the on in [1].
I am using Java 11. Here is the relevant part of my pom:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-cloud-azure-eventhubs-stream-binder</artifactId>
<version>1.2.7</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus-jms-spring-boot-starter</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Workaround. -->
<!-- Apparently com.microsoft.azure:spring-cloud-azure-eventhubs-stream-binder:1.2.7 has a transitive -->
<!-- dependency to the following package. However, it seems that the version is not pinned correctly, so -->
<!-- we have to pin the version to a compatible one as a workaround. -->
<!-- 7.5 is apparently the latest version in which com.nimbusds.oauth2.sdk.http.CommonContentTypes is available. -->
<!-- For a similar (but different) issue see also https://github.com/microsoft/azure-spring-boot/issues/650 -->
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
<version>7.5</version>
</dependency>
Note the workaround regarding the dependency com.nimbusds.
I tried navigating to the relevant code. However, for some reason the code of AzureContextAutoConfiguration.credentials
is not available in the disassembled code of my IDE.
Is the version I used in the workaround in my pom.xml appropriate?
Does anyone have an idea what the error means and how to fix it?
Can anyone report, that this tutorial still works?
[1] https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-cloud-stream-binder-java-app-azure-event-hub

So here the root issue is
"Failed to instantiate
[com.microsoft.azure.credentials.AzureTokenCredentials]: Factory method 'credentials' threw exception;
nested exception is java.lang.IllegalArgumentException: name"
I would suggest you to verify your my.azureauth and application.properties files again against the guide.
Also, as the guide suggests, if you're using JDK version 9 or greater (you are using 11 here), add the following dependencies
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.1</version>
<scope>runtime</scope>
</dependency>

Related

Failed to determine a suitable driver class in CMD

Im developing spring boot Rest API, application,
In my VS code application is running without any runtime errors and working with postman too,
VS code runtime output
enter image description here
however, when i export the JAR file via VS code, and try to run cmd, that file pop up run time error,
ERROR
Blockquote
enter image description here
Blockquote
Error Msg in cmd
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
My POM XML
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
application.properties
## Server Properties
server.port= 8083
server.servlet.context-path= /TEST-API
spring.datasource.url= jdbc:mysql://localhost:3306/TEST?useSSL=false&useLegacyDatetimeCode=false&zerodatetimebehavior=Converttonull
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username= root
spring.datasource.password= 1234
spring.datasource.testWhileIdle = true
spring.datasource.timeBetweenEvictionRunsMillis = 60000
spring.datasource.validationQuery = SELECT 1
Could you please help me on this?
Option 1
Try use
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
instead of
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
in your properties file, if you are using mysql version < 8
Option 2
Check if your driver of mysql (JAR file) was included in the library of WAR --> WEB-INF/lib.
Option 3
If you are not fix it yet, and you have other database in your machine like a postgres:
change this connection to this another database.
test inside of your editor/ide
export to war
if the problem happens the same way, you can be right that your export process is the problem. So try use the plugin of maven to generate the war: https://maven.apache.org/plugins/maven-war-plugin/usage.html
Thanks for your support
one of my friends help me to fix the issue
what they did is,
delete mvnw file from the project path.
Then paste apache-maven-3.6.0 in to C driver and then
did the maven install and package the project in vs code.
After that project jar generated.

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured //Cant find application.properties

Error Logs
I saw some solves, but I dont have an application.properties file to change the 'url'
2022-04-19 22:26:58.653 WARN 18764 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
2022-04-19 22:26:58.655 INFO 18764 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-04-19 22:26:58.682 INFO 18764 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-04-19 22:26:58.704 ERROR 18764 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
I cant understand, why have i got problems with Date Base, when I havent used it yet?
My code java
Maybe i didnt initialize url in pom.xml
package springClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class SpringClient {
public static void main(String[] argv){
SpringApplication.run(SpringClient.class);
}
}
And pom.xml dependencies:
I m using PostgreSQL
Cant understand Maven
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
</dependencies>
</project>
Pls help me to fix this error.
Or if you will find my mistake, pls write how to correct it:)
Need to create an application.properties file on the way 'src/main/resources'
And there write
spring.datasource.url=jdbc:\\link\\
spring.datasource.username=\*of your DB*\
spring.datasource.password=\*of your DB*\
spring.datasource.driver-class-name=org.\*your DB*\.Driver
spring.datasource.hikari.maximumPoolSize=2
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
remote.server.api=http://localhost:8080/api/

Correct the classpath of your application so that it contains a single compatible version of org.springframework.data.redis.connection.RedisConnection

I'd like to work with Redis for manipulating sessions.But I get failure when running the spring boot app.So I guess that this error is coming from maven dependencies especially version conflicts.
I am getting exception after upgrading spring boot version to 2.5.0 from 1.5.9.Release.
Below are maven dependecies:
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
<version>2.5.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
When I run the spring boot app, I get the belowed error:
2021-07-14 16:47:52,711 [localhost-startStop-1] WARN (AbstractApplicationContext.java:591) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'enableRedisKeyspaceNotificationsInitializer' defined in class path resource [org/springframework/session/data/redis/config/annotation/web/http/RedisHttpSessionConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.data.redis.connection.RedisConnection.getConfig(Ljava/lang/String;)Ljava/util/List;
2021-07-14 16:47:52,824 [localhost-startStop-1] INFO (ConditionEvaluationReportLoggingListener.java:136) -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-07-14 16:47:52,841 [localhost-startStop-1] ERROR (LoggingFailureAnalysisReporter.java:40) -
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.session.data.redis.config.ConfigureNotifyKeyspaceEventsAction.getNotifyOptions(ConfigureNotifyKeyspaceEventsAction.java:74)
The following method did not exist:
org.springframework.data.redis.connection.RedisConnection.getConfig(Ljava/lang/String;)Ljava/util/List;
The method's class, org.springframework.data.redis.connection.RedisConnection, is available from the following locations:
jar:file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-data-redis-2.5.1.jar!/org/springframework/data/redis/connection/RedisConnection.class
The class hierarchy was loaded from the following locations:
org.springframework.data.redis.connection.RedisConnection: file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-data-redis-2.5.1.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.redis.connection.RedisConnection
Any help would be really appericiated, let me know if required more information from my side.
EDIT:
Removed version for dependencies from pox.xml
so updated dependencies looks like below:
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.3.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
I am getting below error message:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-07-14 18:41:22,473 [localhost-startStop-1] ERROR (LoggingFailureAnalysisReporter.java:40) -
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.gupshup.blockedno.BlockNoSession.sessionRepository(BlockNoSession.java:120)
The following method did not exist:
org.springframework.session.data.redis.RedisOperationsSessionRepository.<init>(Lorg/springframework/data/redis/connection/RedisConnectionFactory;)V
The method's class, org.springframework.session.data.redis.RedisOperationsSessionRepository, is available from the following locations:
jar:file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-session-data-redis-2.5.0.jar!/org/springframework/session/data/redis/RedisOperationsSessionRepository.class
jar:file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-session-1.3.5.RELEASE.jar!/org/springframework/session/data/redis/RedisOperationsSessionRepository.class
The class hierarchy was loaded from the following locations:
org.springframework.session.data.redis.RedisOperationsSessionRepository: file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-session-data-redis-2.5.0.jar
org.springframework.session.data.redis.RedisIndexedSessionRepository: file:/home/bhanu/tomcat/tomcat8/webapps/BlockedNo-blockno/WEB-INF/lib/spring-session-data-redis-2.5.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.session.data.redis.RedisOperationsSessionRepository

Spring with MongoTemplate: java.lang.String com.mongodb.connection.ClusterSettings.getDescription()

I am trying to create a simple application that handles MongoDB database with MongoTemplate. However, this method:
#Bean
public MongoTemplate mongoTemplate() throws Exception {
MongoTemplate template = new MongoTemplate(mongoClient(), this.mongodbName);
return template;
}
fails with this exception:
Error creating bean with name 'mongoTemplate' defined in class path resource [com/myapp/tryout/repository/config/MongoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.MongoTemplate]: Factory method 'mongoTemplate' threw exception; nested exception is java.lang.NoSuchMethodError: 'java.lang.String com.mongodb.connection.ClusterSettings.getDescription()'
pom.xml has these dependencies:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.12.5</version>
</dependency>
Spring version is 5.2.6.
Documentation of this com.mongodb.connection.ClusterSettings tells that the method in question is indeed deprecated. Moreover by looking in ClusterSettings class I cannot find this method.
My question is: Is it about mismatch in current releases of Spring and mongo-java-driver? If yes, can you please point out a correct combination of packages to use?
Please ask, if you need more information. I will gladly provide it.
ADDED: Ah, irony...
I found this
private static Cluster createCluster(final MongoClientSettings settings,
#Nullable final MongoDriverInformation mongoDriverInformation) {
notNull("settings", settings);
List<MongoCredential> credentialList = settings.getCredential() != null ? singletonList(settings.getCredential())
: Collections.<MongoCredential>emptyList();
return new DefaultClusterFactory().createCluster(settings.getClusterSettings(), settings.getServerSettings(),
settings.getConnectionPoolSettings(), getStreamFactory(settings, false), getStreamFactory(settings, true), credentialList,
getCommandListener(settings.getCommandListeners()), settings.getApplicationName(), mongoDriverInformation,
settings.getCompressorList());
}
in com.mongodb.client.internal.MongoClientImpl.
And this
public Cluster createCluster(final ClusterSettings clusterSettings, final ServerSettings serverSettings,
final ConnectionPoolSettings connectionPoolSettings, final StreamFactory streamFactory,
final StreamFactory heartbeatStreamFactory, final List<MongoCredential> credentialList,
final CommandListener commandListener, final String applicationName,
final MongoDriverInformation mongoDriverInformation,
final List<MongoCompressor> compressorList) {
ClusterId clusterId = new ClusterId(clusterSettings.getDescription());
in com.mongodb.connection.DefaultClusterFactory, which is deprecated.
Spring 3.x supports mongodb java version 4.x. The mongo-java-driver and mongodb-driver “uber-jars” are no longer published as noted in the linked page. Between 3.x and 4.x mongo driver java version the uber jar dependencies have been split to core and sync/reactive streams dependencies. I was able to reproduce the issue with 3.x version. Once I updated to correct 4.x dependencies issue disappeared.
So the correct dependencies are in the below order
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>4.0.4</version>
</dependency>
https://mongodb.github.io/mongo-java-driver/4.0/upgrading/#upgrading-from-the-3-12-java-driver
https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#upgrading.2-3
Seems like I was correct about versions mismatch.
Changing versions of the mentioned packages to these ones:
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>2.2.8.RELEASE</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>3.11.2</version>
</dependency>
will workaround the issue. I cannot mark this post as an answer to the issue. Seems like version 3.0.* of spring-data-mongodb is not compatible with the latest mongo-java-driver or vice versa. I can be wrong.

No implementation defined for org.apache.commons.logging.LogFactory - Eclipse

I know that there are other questions in stackoverflow talking about similar issue but here the problem is different. I am working on a spring boot project to create a service. The service exposes some APIs, also it retrieves data from another SOAP based service. I added following code to my main method
System.setProperty("org.apache.commons.logging.LogFactory", "org.apache.commons.logging.impl.LogFactoryImpl");
and the application is working just fine when I run it from eclipse and access exposed APIs. However, when I access APIs by executing FatJAR created using maven then I get following error
ERROR [http-nio-8090-exec-7] org.apache.juli.logging.DirectJDKLog: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.getClassLoader(Ljava/lang/Class;)Ljava/lang/ClassLoader;] with root cause
java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.getClassLoader(Ljava/lang/Class;)Ljava/lang/ClassLoader;
at org.apache.commons.logging.impl.LogFactoryImpl.getClassLoader(LogFactoryImpl.java:447)
at org.apache.commons.logging.impl.LogFactoryImpl.initDiagnostics(LogFactoryImpl.java:476)
at org.apache.commons.logging.impl.LogFactoryImpl.<init>(LogFactoryImpl.java:95)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:166)
at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:404)
at java.base/java.lang.Class.newInstance(Class.java:590)
at org.apache.commons.discovery.tools.ClassUtils.newInstance(ClassUtils.java:153)
If I remove the following line from my main method and create FatJAR
System.setProperty("org.apache.commons.logging.LogFactory", "org.apache.commons.logging.impl.LogFactoryImpl");
and start the service from fatJAR and access APIs then it runs fine. But running application form eclipse and accessing APIs gives the following error
ERROR[0;39m [[34mhttp-nio-8090-exec-4[0;39m] [33morg.apache.juli.logging.DirectJDKLog[0;39m: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
org.apache.commons.discovery.DiscoveryException: No implementation defined for org.apache.commons.logging.LogFactory
at org.apache.commons.discovery.tools.DiscoverClass.find(DiscoverClass.java:404)
at org.apache.commons.discovery.tools.DiscoverClass.newInstance(DiscoverClass.java:579)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:418)
at org.apache.commons.discovery.tools.DiscoverSingleton.find(DiscoverSingleton.java:378)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:310)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
following is the snippet from my POM.
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
The project builds, install, deploy without any issue. The error occurs only when I access the API after running the application. I search other resources they all are saying that there might be some Logging JAR conflict so I removed some dependency and added different dependencies but all the time it ends up in error either in eclipse or FatJAR.
Any help or reference for other resources are welcome.

Categories