Unable to use apache-ldap-api with grails 2.2 - ldap

I am trying to use apache-ldap-api with grails 2.2 . The latest version of the api on their website is 1.0.0-M15 , but maven repo has upto 1.0.0-M13 . So I decided to use M13 first by adding a dependency to BuildConfig.groovy:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
runtime(
[group: 'org.apache.directory.shared', name: 'apache-ldap-api', version: '1.0.0-M13']
)
// runtime 'mysql:mysql-connector-java:5.1.20'
}
Grails downloaded the dependency alright, but when I try to use the API in the code such as:
import org.apache.directory.groovyldap.LDAP
LDAP.newInstance(...)
I get a compile error :
LdapController.groovy: 2: unable to resolve class org.apache.directory.groovyldap.LDAP
# line 2, column 1.
import org.apache.directory.groovyldap.LDAP
^
1 error
The compiler lets me import 'org.apache.directory.groovyldap.*' but then again, the call to 'LDAP.newInstance()' throws an exception.
I also tried manually dropping the 1.0.0-M15 version in my /lib folder and running 'grails compile --refresh-dependencies' without any luck. Any ideas if I am doing something wrong here?
Thanks!

1 run this grails compile --refresh-dependencies
2 change LDAP.newInstance(...) into new LDAP
This is how it works for me

Related

Unable to build Spartacus 4.3 after installation

Unable to build Spartacus 4.3 after installation. Got lot of this errors:
node_modules/#spartacus/asm/asm.module.d.ts:6:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
6 static ɵfac: i0.ɵɵFactoryDeclaration<AsmModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/#spartacus/asm/asm.module.d.ts:7:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
7 static ɵmod: i0.ɵɵNgModuleDeclaration<AsmModule, never, [typeof i1.AsmComponentsModule, typeof i2.AsmCoreModule, typeof i3.AsmOccModule], never>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/#spartacus/asm/asm.module.d.ts:8:21 - error TS2694: Namespace '"C:/Users/john.doe/Projects/siko-spartacus/js-storefront/standard-store/node_modules/#angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
8 static ɵinj: i0.ɵɵInjectorDeclaration<AsmModule>;
~~~~~~~~~~~~~~~~~~~~~
Recommended way to install Spartacus is to use Schematics. Spartacus schematics allow you to install Spartacus libraries in your project.
But before, please ensure that yours Angular project meets with specific prerequisites (Angular CLI, Node.js and Yarn version):
https://sap.github.io/spartacus-docs/schematics/#prerequisites
You can also try to remove node_modules folder and install all dependencies once again.

Instant app with multivariant base module

I've started to implement instant app feature in my application. I managed to transition to base module and properly build an installable app. The base module has 3 build types:
buildTypes {
release {...}
acceptance {...}
debug {...}
When I try to build instant app as a separate module that has build.gradle file:
apply plugin: 'com.android.instantapp'
dependencies {
implementation project(':base')
}
I'm getting below error message:
Cannot choose between the following variants of project :app:
- inchargeAcceptanceBundleElements
- inchargeAcceptanceRuntime
- inchargeAcceptanceUnitTestCompile
...
(much much longer I can give full stacktrace if needed)
I tried to change instantapp/build.gradle:
implementation project(path: ':base', configuration: 'default')
but then I get:
Unable to resolve dependency for ':instantapp#debug/compileClasspath': Failed to transform file 'base-release.aar' to match attributes {artifactType=processed-aar} using transform IdentityTransform
Then the app module itself has 4 product flavors but it shouldn't matter I believe.
Any advice how to run instantapp module ?

Error using mismatched PostCSS dependencies

Anyone know how to get composes working in gatsby css modules.
I've tried using.
.dog {
composes: dog from "styles/common.scss"
}
I get this error.
Your current PostCSS version is 5.2.18, but postcss-nesting uses
6.0.23. Perhaps this is the source of the error below.
I've tried installing postcss-nesting
But that doesn't seem to stop the above error in gatsby
Your current PostCSS version is 5.2.18, but postcss-nesting uses 6.0.23. Perhaps this is the source of the error you're running into.
Try upgrading PostCSS to at least 6.0

PixiJS for Haxe won't import - Type Not Found error in IntelliJ

I'm trying to run the most basic PixiJS for Haxe sample program, but IntelliJ gives a Type Not Found error.
The failing code:
package ;
import pixi.core.Application;
The error message:
Main.hx:3: characters 7-28 : Type not found : pixi.core.Application
I think the issue is PixiJS-specific, as when I follow the same install-and-import steps for other Haxe modules (eg flambe, flixel) they behave as expected. I've tried with both 4.7.1 and 4.5.5, and as both global and project-specific libraries (separately).
(I hybridized several screenshots to save space)
When running from the console, using:
> haxe -main Main -lib pixijs -js output.js
Everything seems to compile (running the compiled code results in a PIXI is not defined error which is a seperate issue).
UPDATE 1, how I'm adding the dependency:
After executing haxelib install pixijs, I follow these steps:
UDPATE 2, the config being run:
If you can't get it working in the dependencies section you could try adding the haxelibs pixijs externs src/ folder as an additional sources root in Project Structure -> Modules -> (module name) -> Sources. That's how it worked for me:

Kotlin - Error: Could not find or load main class _DefaultPackage

I followed the Kotlin tutorial for eclipse here : Getting Started With Eclipse Luna
However, I'm running into this error:
Error: Could not find or load main class _DefaultPackage
Anyone who knows to get around this?
This was a severe bug (KT-10221) in automatic generation of Launch Configuration in plugin version 0.4.0. It was fixed in 0.5.0 so the recommendend way to workaround is to update plugin.
The source of the problem was that the plugin used an old pattern for generating name of the class for main function that had been abandoned by Kotlin compiler.
It's possible to workaround it by editing launch configuration (Eclipse Menu -> Run -> Run Configurations...) by hand and changing Main class field in Java Application group. If the file is named hello.kt with no package directive, as it is described in tutorial, than corrected string should be HelloKt.
If file has name other.kt with package my.tutorial than the Main Class should contain my.tutorial.HelloKt. You can read more about it in the section Package-Level Functions of Calling Kotlin From Java page.
I have been getting the same issue. And after putting the right compiler output path, it got resolved.
Go to Project -> Project Compiler output :
In the text box, fill this:
[Absolute Path]/{Project Name}/out
In my case I was having this problem while trying to run the program using the Application Gradle plugin. The problem was in the mainClassName property using single quotes instead of double ones
This didn't work:
mainClassName = 'demo.HelloWorldKt'
With double quotes, it works:
mainClassName = "demo.HelloWorldKt"
For me it worked after I installed the correct JDK. I first had JDK 11 but the tutorial I did was with JDK 8 so after I installed this and set it in the "installed JREs" options it found the main class without having any "mainClassName" or any other option in the build.gradle file.
For me, it worked in a fresh eclipse workspace. Possibly, the Kotlin eclipse plugin is not playing well with other plugins (in my case, PyDev).
I'm creating a Kotlin Application with JavaFX and I had this issue until I went to:
Run > Run Configurations > Java Application > Common
I unticked "Allocate console" and it fixed the issue.