How to connect IntelliJ IDEA with a free Jira instance? - intellij-idea

My team has a Jira project on Atlassian servers. How can I connect that project with IntelliJ IDEA IDE?
When creating a connection from IntelliJ to Atlassian, I need the server name and username with credentials.
What is in this case the value of the Server URL?
Here is my error log:
com.atlassian.theplugin.commons.remoteapi.RemoteApiException: my_username:[password XX chars]#https://instance.atlassian.net
Login failed
at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.wrapWithRemoteApiException(JiraRestSessionImpl.java:800)
at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.login(JiraRestSessionImpl.java:180)
at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.testConnection(JiraRestSessionImpl.java:762)
at com.atlassian.connector.commons.jira.JiraRESTFacade2Impl.testServerConnection(JiraRESTFacade2Impl.java:329)
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 com.atlassian.connector.commons.jira.JIRAServerFacade2Impl$1.invoke(JIRAServerFacade2Impl.java:91)
at com.sun.proxy.$Proxy40.testServerConnection(Unknown Source)
at com.atlassian.connector.commons.jira.JIRAServerFacade2Impl.testServerConnection(JIRAServerFacade2Impl.java:268)
at com.atlassian.theplugin.commons.jira.IntelliJJiraServerFacade.testServerConnection(IntelliJJiraServerFacade.java:473)
at com.atlassian.theplugin.idea.config.serverconfig.ProductConnector.connect(ProductConnector.java:35)
at com.atlassian.theplugin.ConnectionWrapper.run(ConnectionWrapper.java:63)
Caused by: com.atlassian.jira.rest.client.RestClientException: Login failed
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:82)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.postAndParse(AbstractJerseyRestClient.java:140)
at com.atlassian.jira.rest.client.internal.jersey.JerseySessionRestClient.login(JerseySessionRestClient.java:54)
at com.atlassian.connector.commons.jira.rest.JiraRestSessionImpl.wrapWithRemoteApiException(JiraRestSessionImpl.java:797)
... 13 more
Caused by: com.sun.jersey.api.client.UniformInterfaceException: Client response status: 401
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:607)
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:507)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient$4.call(AbstractJerseyRestClient.java:144)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:68)
... 16 more

For everyone looking how to connect JIRA without the Atlassian Connector, there is already a simple build-in solution in IntelliJ IDEA:
Normally you don't have to edit the "Search".
And it's also available via the top menu "Tools" -> "Tasks & Contexts" -> "Configure Servers..."

You can get the url by login into your Jira account via a browser; the Server URL is the the first section of the URL before the '/'.
Example:
https://example.atlassian.net/secure/Dashboard.jspa
Server URL = https://example.atlassian.net
Update:
Also note that Atlassian has stopped support for IDE Connectors since 20 April 2015, developer.atlassian.com/blog/2015/06/… ,so I would consider rather connecting your IntelliJ to Jira thorugh other means, such as GitHub via WebHooks

Server url is something like: https://aleksandar.atlassian.net

Related

SonarQube v5.6.6 Rest API - insufficient privileges

I'm trying to connect the SonarQube Community Plugin (from IntellIJ IDEA) to a local SonarQube instance, but looks like my users lack privileges to access the API. While trying to connect I get:
Cannot fetch SonarQube project and modules from SonarQube at mobilex.intra
org.sonarqube.ws.client.HttpException: Error 403 on https://qube.my.local/api/components/search?qualifiers=TRK : {"errors":[{"msg":"Insufficient privileges"}]}
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
at org.sonarqube.ws.client.BaseService.call(BaseService.java:55)
at org.sonarqube.ws.client.BaseService.call(BaseService.java:50)
at org.sonarqube.ws.client.component.ComponentsService.search(ComponentsService.java:58)
at org.intellij.sonar.sonarserver.SonarServer.getAllProjects(SonarServer.java:137)
at org.intellij.sonar.sonarserver.SonarServer.getAllProjectsAndModules(SonarServer.java:110)
at org.intellij.sonar.configuration.ResourcesSelectionConfigurable$DownloadResourcesRunnable.run(ResourcesSelectionConfigurable.java:120)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:247)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:750)
at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:434)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:565)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Works fine while using an administrative account - but I don't want that. What privilege is needed to allow a common user to access the API and how do I apply it?

Dbfit: Login failed for user 'dev\abc'. Client connectionId:a12f7cab

I am trying to connect sqlserver from dbfit, and getting below error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user
'DEV\abc'. ClientConnectionId:a12f7cab-7261-4fa7-8064-ea355f03f883 at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:254)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:84)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2908)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at java.sql.DriverManager.getConnection(DriverManager.java:664) at
java.sql.DriverManager.getConnection(DriverManager.java:208) at
dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:51)
at
dbfit.environment.SqlServerEnvironment.connect(SqlServerEnvironment.java:53)
at
dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:78)
at
dbfit.fixture.DatabaseEnvironment.connect(DatabaseEnvironment.java:52)
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:497) at
fitlibrary.closure.MethodClosure.invoke(MethodClosure.java:35) at
fitlibrary.closure.MethodClosure.invokeTyped(MethodClosure.java:28)
at
fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:77)
at
fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:95)
at
fitlibrary.closure.CalledMethodTarget.invokeAndWrap(CalledMethodTarget.java:358)
at
fitlibrary.traverse.workflow.caller.ActionCaller.run(ActionCaller.java:37)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretRow(DoTraverseInterpreter.java:176)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretAfterFirstRow(DoTraverseInterpreter.java:66)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretInFlow(DoTraverseInterpreter.java:151)
at fitlibrary.DoFixture.interpretAfterFirstRow(DoFixture.java:47) at
fitlibrary.FitLibraryFixture.doTable(FitLibraryFixture.java:83) at
dbfit.fixture.DatabaseEnvironment.doTable(DatabaseEnvironment.java:22)
at fit.Fixture.interpretFollowingTables(Fixture.java:121) at
fit.Fixture.interpretTables(Fixture.java:107) at
fit.Fixture.doTables(Fixture.java:81) at
fit.FitServer.process(FitServer.java:81) at
fit.FitServer.run(FitServer.java:56) at
fit.FitServer.main(FitServer.java:41)
Is anyone facing similar issue?
Appreciate your help.
Thanks
I missed below step:
(http://dbfit.github.io/dbfit/docs/database-specific-information.html#microsoft-sql-server)
Microsoft SQL Server
Deploying the JDBC Driver
Download MS SQL Server JDBC driver from their site (It is not open source and cannot be distributed with DbFit.)
Deploy sqljdbc4.jar in DbFit’s lib folder - the same folder as dbfit-XXX.jar.
Deploy auth\x86\sqljdbc_auth.dll in %programfiles(x86)%\Java\jre7\bin folder to allow integrated windows authentication
Then use connetion as
!|DatabaseEnvironment|sqlserver|
|Connect|jdbc:sqlserver://myhost;integratedSecurity=true|
and it worked.

Exception while using Apache Commons Mail API from IBM Worklight Studio 5.0.5

I have been trying to make use of Apache Commons API with in a Java class to send out an email. I invoke this Java function from a worklight adapter in order to send the email.
I'm making use of Worklight Studio on a Mac, version of the studio is: 5.0.5.20131003
Here is the piece of Java Code:
package com.customclass.helper;
import org.apache.commons.mail.HtmlEmail;
public class EmailHelper{
public static void sendHTMLMail (String serverHostName, String serverPort, String isSSLEnabledOnServer, String isTLSEnabledOnServer, String fromAddress, String toAddress, String cc, String bcc, String subject, String body){
HtmlEmail email = new HtmlEmail();
email.setHostName(serverHostName);
email.setSmtpPort(serverPort);
email.setSSLOnConnect(isSSLEnabledOnServer);
email.setStartTLSEnabled(isTLSEnabledOnServer);
email.addTo(toAddressArray);
email.addCc(ccArray);
email.addBcc(bcc);
email.setSubject(subject);
email.setMsg(body);
email.send();}}
This is how in invoke it from the Adapter:
com.customclass.helper.EmailHelper.sendHTMLMail(SMTP_SERVER_HOST, SMTP_SERVER_PORT, SMTP_SERVER_SSL_ENABLED, SMTP_SERVER_TLS_ENABLED, fromMailAddress, toAddress, cc, bcc, subject, body);
The SMTP server that I'm making use of does not require any authentication and does not work on SSL or TLS and are set to false.
When I run the Java class as a stand alone Java application it works fine, but when its utilised from with in the Worklight server using the adapter it throws an exception. The exception does not have enough information in it for me to debug the issue.
Here is the stack trace:
Exception while sending email:Sending the email to the following server failed : my.smtp.server.com:25
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:676)
javax.mail.Transport.send0(Transport.java:189)
javax.mail.Transport.send(Transport.java:118)
org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
org.apache.commons.mail.Email.send(Email.java:1437)
com.customclass.helper.EmailHelper.sendHTMLMail(EmailHelper.java:131)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593._c_sendEmail_1(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js:91)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593.call(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593.call(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js)
com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:180)
com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:156)
com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:101)
com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
com.worklight.integration.model.Procedure.invoke(Procedure.java:165)
com.worklight.integration.model.InvocationContext.call(InvocationContext.java:150)
com.worklight.integration.model.InvocationContext.call(InvocationContext.java:34)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:695)
Is there some thing that I'm missing to do on the Worklight studios embedded Jetty server?
I had got around this issue by making use of Java's Mail API instead of Apache's mail API. Looks like some of the JARs/Java Classes that Apache is dependant on does not seem to work well with the Worklight server both the embedded server with the IDE and also the server deployed on WAS

glassfish server admin console stalls saying: The admin console application is loaded

I am having some trouble getting into my glassfish server admin console (although I think it may actually be a symptom of a larger problem)
What I am seeing is that when I go to: http://localhost:4848/ I get a page that says: Welcome to glassfish server open source edition 3.1 (build 43) and then a status section below that. The status makes it to "The admin console application is loaded" but seems to stall there. If I refresh the page, it is just a blank page. I have to reboot the glassfish server from eclipse in order to get back to that "welcome to glassfish" page.
I looked in my server logs and found a ton of "SEVERE" problems, all of which seem to relate to this one:
[#|2011-10-06T18:03:10.869-0500|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=100;_ThreadName=Thread-1;|Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Error reading configuration file
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:130)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:286)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:364)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
|#]
Has anyone have any thoughts on what might be going on here? I'm very new to glassfish and rather confused! Thanks in advance.
Avtar
I think I had similar problem when running on Open JDK, check which JDK are you using, if its' openjdk then dowload and set as your default sun-jdk

NullPointerException while raise an embedded ldap server using spring

I'm trying to raise the Spring Embedded Ldap Server using:
But I'm keep on getting this exception:
2010-06-10 14:33:35,559 ERROR main ApacheDSContainer start - Server startup failed
java.lang.NullPointerException
at org.apache.directory.server.core.schema.DefaultSchemaService.initialize(DefaultSchemaService.java:382)
at org.apache.directory.server.core.DefaultDirectoryService.initialize(DefaultDirectoryService.java:1425)
at org.apache.directory.server.core.DefaultDirectoryService.startup(DefaultDirectoryService.java:907)
at org.springframework.security.ldap.server.ApacheDSContainer.start(ApacheDSContainer.java:160)
at org.springframework.security.ldap.server.ApacheDSContainer.afterPropertiesSet(ApacheDSContainer.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4212)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
I'm using spring 3.0.2 and added the following jars for the ldap:
spring-security-ldap-3.0.2.RELEASE.jar
spring-ldap-1.3.0.RELEASE-all.jar
apacheds-all-1.5.6.jar
shared-ldap-0.9.15.jar
slf4j-api-1.5.6.jar
slf4j-simple-1.5.6.jar
Help please....
#Zorkus: I'm not sure exactly what kind of problem you came across with Apache Directory, and what is the root cause of that, but if all you need is a working embedded java LDAP server for integration testing with Spring Security then you might want to consider some alternatives.
I've recently started to investigate for alternatives, because I couldn't achieve with Apache Directory what I wanted despite a lot of time and effort invested. (I basically wanted to replicate the schema and the user database of an Active Directory instance into an embedded server.)
What I found is that the UnboundID LDAP SDK is a nice replacement. Integrating with it requires a bit more effort than a one-liner in your spring context (like <security:ldap-server/>), but not much more. Starting up an LDAP server requires just a few lines of code:
InMemoryDirectoryServerConfig config =
new InMemoryDirectoryServerConfig("dc=example, dc=com");
// schema config only necessary if the standard
// schema provided by the library doesn't suit your needs
config.setSchema(Schema.getSchema("your-custom-schema.schema"));
// listener config only necessary if you want to make sure that the
// server listens on port 33389, otherwise a free random port will
// be picked at runtime - which might be even better for tests btw.
config.setListenerConfigs(
new InMemoryListenerConfig("myListener", null, 33389, null, null, null));
InMemoryDirectoryServer ds = new InMemoryDirectoryServer(config);
ds.startListening();
// import your test data from ldif files
ds.importFromLDIF(true,"content.ldif");
The only dependency you will need for this to work is:
<dependency>
<groupId>com.unboundid</groupId>
<artifactId>unboundid-ldapsdk</artifactId>
<version>2.3.1</version>
</dependency>
It would be pretty easy to wrap the above code in a class that you can instantiate and configure from your Spring context.
For documentation and code examples on the UnboundID LDAP SDK see: https://www.unboundid.com/products/ldap-sdk/docs/
(I'm not affiliated with UnboundID in any way.)
Check whether the authorization state used by the LDAP client has access to the schema.