integrating spring and wso2 identity server remote client - spring-boot

I am trying to integrate spring and wso2 identity server remote client
but I am facing some dependency issues
My POM
<dependency>
<groupId>org.wso2.carbon.identity.user.ws</groupId>
<artifactId>org.wso2.carbon.um.ws.api.stub</artifactId>
<version>5.1.3</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.user.ws</groupId>
<artifactId>org.wso2.carbon.um.ws.api</artifactId>
<version>5.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.axis2.wso2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.1.wso2v12</version>
</dependency>
While running I am getting below exception:
Caused by: java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(Unknown Source)
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipIn
at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
at sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.io.InputStreamReader.read(Unknown Source)
at java.io.BufferedReader.fill(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.io.BufferedReader.readLine(Unknown Source)
at java.util.ServiceLoader.parseLine(Unknown Source)
... 52 common frames omitted
And while building thorugh maven I am getting below error:
error reading repository \org\wso2\securev
ault\org.wso2.securevault\1.0.0-wso2v2\org.wso2.securevault-1.0.0-wso2v2

Related

Gatling using JDBC feeder connecting to SQL Server with Windows Authentication throws error "java.lang.NoSuchMethodError"

Learning from this documentation , I tried to use Gatling JDBC feeder to grab data from our SQL Server with Windows Authentication.
I add this dependency in my POM.xml
<!-- https://mvnrepository.com/artifact/dev.code-n-roll.gatling/jdbc-gatling -->
<dependency>
<groupId>dev.code-n-roll.gatling</groupId>
<artifactId>jdbc-gatling_2.12</artifactId>
<version>2.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.gatling/gatling-jdbc -->
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-jdbc</artifactId>
<version>3.4.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1.jre8</version>
</dependency>
My connection string looks like this
import io.gatling.jdbc.Predef._
val databaseUrl = "jdbc:sqlserver://CentralSQLServer:1433;databaseName=CustomerDB;integratedSecurity=true"
I added integratedSecurity=true because the access method to the SQL server is using Windows Authentication, not using username & password. This works fine when I use vanilla Java with JDBC.
Then I define the JDBC Feeder
val mySQLFeeder = jdbcFeeder(databaseUrl, "", "", "SELECT * FROM [CustomerDB].[dbo].[Users]")
I put empty String in username and password sections , since I don't have it.
Running the Gatling test using mvn gatling:test , I see this error is thrown by Gatling
02:05:29.920 [ERROR] i.g.a.Gatling$ - Run crashed
java.lang.NoSuchMethodError: io.gatling.core.feeder.SourceFeederBuilder$.apply(Lio/gatling/core/feeder/FeederSource;Lio/gatling/core/config/GatlingConfiguration;)Lio/gatling/core/feeder/SourceFeederBuilder;
at io.gatling.jdbc.Predef$.jdbcFeeder(Predef.scala:26)
at testCases.Delete.<init>(Delete.scala:49)
... 16 common frames omitted
Wrapped by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:74)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.gatling.mojo.MainWithArgsInFile.runMain(MainWithArgsInFile.java:50)
at io.gatling.mojo.MainWithArgsInFile.main(MainWithArgsInFile.java:33)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at io.gatling.app.Runner.run0(Runner.scala:74)
at io.gatling.app.Runner.run(Runner.scala:60)
at io.gatling.app.Gatling$.start(Gatling.scala:80)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:46)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
... 6 more
Caused by: java.lang.NoSuchMethodError: io.gatling.core.feeder.SourceFeederBuilder$.apply(Lio/gatling/core/feeder/FeederSource;Lio/gatling/core/config/GatlingConfiguration;)Lio/gatling/core/feeder/SourceFeederBuilder;
at io.gatling.jdbc.Predef$.jdbcFeeder(Predef.scala:26)
at testCases.Delete.<init>(Delete.scala:49)
... 16 more
It looks like Gatling JDBCFeeder method complains about my connection string using integratedSecurity=true since in the documentation we should use username and password. The thing is there are no username and password in my case.
Is there any way to solve this issue?
Thanks.
Thanks #GeorgeLeung and #StephaneLandelle .
The issue is caused by dependency version conflict.
The gatling-jdbc version must align with the gatling-core version.
Change the dependencies in POM.xml to this below does solve the issue.
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<encoding>UTF-8</encoding>
<gatling.version>3.3.1</gatling.version>
<gatling-maven-plugin.version>3.0.5</gatling-maven-plugin.version>
<scala-maven-plugin.version>4.3.1</scala-maven-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<scala.version>2.12.10</scala.version>
</properties>
<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-app</artifactId>
<version>${gatling.version}</version>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-recorder</artifactId>
<version>${gatling.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1.jre8</version>
</dependency>
</dependencies>
The gatling-app does include the gatling-jdbc , so we don't need to extra add it.

Spring Boot Property Launcher + EhCache Failed to read schema document

I am working on a Spring Boot(2.3.0.RELEASE) project where there is a need to use a external loader to load few proprietary libraries. Hence we are using Spring's Property Launcher as follows,
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<layout>ZIP</layout>
<mainClass>com.app.Application</mainClass>
</configuration>
</plugin>
We also use Ehcache version 3.8.1 along with Spring's CacheAutoConfiguration.
The problem we are facing is, for some reason the ehcache schema xsd file is not visible to the classloader and it is failing with the below exception.
I have verified the xsd is present in the exact path that its failing on.
Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jar:file:/C:/workspace/poc/external-loader-poc/target/external-loader-poc.jar!/BOOT-INF/lib/ehcache-3.8.1.jar!/ehcache-core.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source) ~[na:1.8.0_251]
at javax.xml.validation.SchemaFactory.newSchema(Unknown Source) ~[na:1.8.0_251]
at javax.xml.validation.SchemaFactory.newSchema(Unknown Source) ~[na:1.8.0_251]
at org.ehcache.xml.ResourceConfigurationParser.<clinit>(ResourceConfigurationParser.java:67) ~[ehcache-3.8.1.jar!/:na]
... 58 common frames omitted
Caused by: java.io.FileNotFoundException: JAR entry BOOT-INF/lib/ehcache-3.8.1.jar!/ehcache-core.xsd not found in C:\workspace\poc\external-loader-poc\target\external-loader-poc.jar
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source) ~[na:1.8.0_251]
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source) ~[na:1.8.0_251]
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source) ~[na:1.8.0_251]
However this issue doesn't happen when using the JarLauncher or WarLauncher. It only happens with the PropertyLauncher.
Any suggestions would be of great help.
I had the same issue. I was using SpringBoot 2.3.0.RELEASE with ehcache 3. Just upgraded to Spring boot 2.3.2.RELEASE. The issue resolved. If possible try upgrading the SpringBoot.
I was facing the same issue. I was using SpringBoot 2.5.13 with ehcache 3.9.7.
It seems that as per ehcache 3.x release, either only the new version should be used or the javax.cache API as defined in the JSR-107 specification (more details on https://www.ehcache.org/#using_jsr107_api).
Removing the following from my pom.xml helped resolve the issue
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.0</version>
</dependency>

How to fix the "Unsatisfied dependency expressed through field 'sessionFactory'" error in spring

I am new to spring Hibernate doing the first project and got stuck with the following error. Why is the following error is coming? Tried to search the error but could not resolve.
Caused by: java.lang.NoClassDefFoundError: net/bytebuddy/NamingStrategy$SuffixingRandom$BaseNameResolver
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:345)
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:337)
at org.hibernate.cfg.Environment.<clinit>(Environment.java:230)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:78)
at org.hibernate.boot.registry.StandardServiceRegistryBuilder.<init>(StandardServiceRegistryBuilder.java:67)
at org.hibernate.cfg.Configuration.reset(Configuration.java:158)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:130)
at org.springframework.orm.hibernate5.LocalSessionFactoryBuilder.<init>(LocalSessionFactoryBuilder.java:158)
at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:495)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
... 24 more
Caused by: java.lang.ClassNotFoundException: net.bytebuddy.NamingStrategy$SuffixingRandom$BaseNameResolver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 35 more
As you can see in the Github Bytebuddy repo the BaseNameResolver is an interface in NamingStrategy.
Most probably you do not have this dependency on your classpath:
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-dep</artifactId>
<version>1.9.12</version>
</dependency>

Issues with Neo4j and Elasticsearch in Maven project

Is it possible to use Neo4j and Elasticsearch(both use Lucene internaly) on the same classpath in Maven project ?
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.1.7</version>
</dependency>
and I have following exception:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.neo4j.graphdb.GraphDatabaseService]: Circular reference involving containing bean 'neo4jTestConfig' - consider declaring the factory method as static for independence from its containing instance. Factory method 'graphDatabaseService' threw exception; nested exception is java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, domain\target\test-neo4j-db
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.1.5.RELEASE.jar:4.1.5.RELEASE]
... 54 common frames omitted
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, domain\target\test-neo4j-db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:366) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:91) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:181) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:71) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at com.example.domain.configuration.Neo4jTestConfig.graphDatabaseService(Neo4jTestConfig.java:36) ~[test-classes/:na]
at com.example.domain.configuration.Neo4jTestConfig$$EnhancerBySpringCGLIB$$333d76d.CGLIB$graphDatabaseService$0(<generated>) ~[spring-core-4.1.5.RELEASE.jar:na]
at com.example.domain.configuration.Neo4jTestConfig$$EnhancerBySpringCGLIB$$333d76d$$FastClassBySpringCGLIB$$aa2eee7d.invoke(<generated>) ~[spring-core-4.1.5.RELEASE.jar:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) ~[spring-context-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at com.example.domain.configuration.Neo4jTestConfig$$EnhancerBySpringCGLIB$$333d76d.graphDatabaseService(<generated>) ~[spring-core-4.1.5.RELEASE.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_25]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_25]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.1.5.RELEASE.jar:4.1.5.RELEASE]
... 55 common frames omitted
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions#222eb8aa' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:106) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:343) ~[neo4j-kernel-2.1.7.jar:2.1.7]
... 70 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/document/Fieldable
at org.neo4j.kernel.api.impl.index.NodeRangeDocumentLabelScanStorageStrategy.<init>(NodeRangeDocumentLabelScanStorageStrategy.java:70) ~[neo4j-lucene-index-2.1.7.jar:2.1.7]
at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:73) ~[neo4j-lucene-index-2.1.7.jar:2.1.7]
at org.neo4j.kernel.api.impl.index.LuceneLabelScanStoreExtension.newKernelExtension(LuceneLabelScanStoreExtension.java:39) ~[neo4j-lucene-index-2.1.7.jar:2.1.7]
at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:104) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483) ~[neo4j-kernel-2.1.7.jar:2.1.7]
... 73 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.document.Fieldable
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_25]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
... 78 common frames omitted
When I trying to exclude neo4j-lucene-index
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j</artifactId>
<version>2.1.7</version>
<exclusions>
<exclusion>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-lucene-index</artifactId>
</exclusion>
</exclusions>
</dependency>
I get an exception:
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#4ae33a11' was successfully initialized, but failed to start. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:513) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.impl.transaction.XaDataSourceManager.start(XaDataSourceManager.java:164) ~[neo4j-kernel-2.1.7.jar:2.1.7]
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:507) ~[neo4j-kernel-2.1.7.jar:2.1.7]
... 72 common frames omitted
Caused by: java.lang.IllegalArgumentException: No schema index provider org.neo4j.kernel.api.index.SchemaIndexProvider found. Kernel extensions available on classpath:
I don't want to use Neo4j Legacy Indexing and would like to implement fuzzy-search in my application based on Elasticsearch engine. Is it possible to use both of these systems together on the same classpath ?
As lucene didn't change their package names from 3.x to 4.x the classes of the 2 versions will clash.
If you are adventourous you might try to build this Lucene 4.x branch for Neo4j.
You might be better off though integrating external ES with Neo4j.

java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet

I am migrating my web application from Jboss 4.2 to tomcat 7 . After using the tomcat 7 i am facing the following exception.
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:855)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1883)
at org.apache.catalina.startup.ContextConfig.getDefaultWebXmlFragment(ContextConfig.java:1469)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1246)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have tried to remove the catalina.jar (according to the solution given for the same exception)from the lib to solve the issue but it didn't worked.I am not getting any way to solve this issue can anyone please help on this issue.
In your pom.xml
if you have included dependencies like tomcat-catalina,
put the scope as provided
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.47</version>
<scope>provided</scope>
</dependency>
The container ( here tomcat ) itself provides some dependencies ( like tomcat-catalina jar ) when you deploy your app. So you don't need to include them in your application. But the jars are needed for compilation. This is achieved by setting the scope as 'provided'
I believe, this error is about the deployment assembly. You do not need the catalina.jar in the deployment assembly.
For the ones like me facing this issue with Spring Boot, adding this dependency solved it :
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
For me, this error was being produced because my derived implementation of ServletContextListener had a CONCTRUCTOR PARAMETER. Apparently Spring/Java/Whatever can't load it up if you have ctor params, even though the params have values in the Application Context.
Hope this helps others.
I had this problem today, and it was because my executable spring boot jar had /BOOT-INF/lib/tomcat-embed-core-9.0.62.jar and my deployed WAR also had ../ROOT/WEB-INF/lib/tomcat-embed-core-9.0.62.jar. The jars were identical, but the tomcat webapp classloader creates a ProtectionDomain for the jars provided from BOOT-INF, and my deployed WAR was attempting to load the class from ROOT/WEB-INF/lib.
The fix is to make sure my deployed WAR uses jars from BOOT-INF ... I just have to figure out how to make that happen.
add <scope>provided</scope> into pom.xml :
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.27</version>
<scope>provided</scope>
</dependency>
There is another solution when you do need the catalina.jar, add
<Loader delegate="true"/>
to
<Context />
element in %TOMCAT_HOME%/conf/context.xml

Resources