IntelliVault icon indicating copy to clipboard operation
IntelliVault copied to clipboard

Plugin doesn't work with IJ 2020.1 (was: Always Receive NullPointerException)

Open ecooperman opened this issue 4 years ago • 22 comments

Every time I try to use IntelliVault to push or pull from the CRX, I get the following error:

[ERROR] checkout: java.lang.NullPointerException: null

I'm able to run the vlt checkout command from the terminal without an issue. I just updated to the latest version of IntelliJ to ensure that this wasn't an issue. I'm a recent convert from Eclipse, and while I've gotten almost everything working as I want in IntelliJ this is a huge one that I need to be able to use to be effective in IntelliJ.

I've tried at least 6 different versions of VLT ranging from 3.1.16 to 3.4.4 and none of them work with IntelliVault. I've tried using both the bin folder as well as the folder above the bin folder, and I get the same error either way.

In case it helps, I actually do get an NPE when attempting to run the vlt export command in my terminal for versions after 3.1.24, but I'm always able to run the checkout command from the terminal. VLT versions 3.1.16 and 3.1.24 both work flawlessly in the terminal (including all vlt commands like export/import) but neither work in IntelliVault...though there is a main difference here...when using either of these 2 versions, the error I get from IntelliVault is

[ERROR] checkout: java.lang.IllegalArgumentException: org.apache.jackrabbit.vault.fs.api.RepositoryFactory is not an ImageIO SPI class

Rather than the NPE. I've tried Java versions 1.8.0_181 as well as 1.8.0_241, in addition to Java 11.0.4 and 11.0.6, and nothing seems to help...though I'm not even sure exactly how IntelliVault determines which version of Java to use. Is it the project version? The version that's configured in terminal? Something else?

Please let me know what else I can provide to help diagnose/debug the issue, and thanks in advance!

Update: I'm running IntelliJ 2020.1 ultimate with IntelliVault 0.10.0

ecooperman avatar Apr 09 '20 22:04 ecooperman

It works fine with 2019.3, the newest IntelliJ causes NPE.

lukasz-wieczorek avatar Apr 10 '20 08:04 lukasz-wieczorek

@lukasz-wieczorek is right

can't seem to isolate why it's only happening in 2020.1 with any certainty but I am curious if the fact they finally upgraded the underlying IntelliJ runtime to Java 11 has anything to do with it? I have 2019.3.4 and and 2020.1 running side-by-side with the same IntelliVault configuration and the 2019.X version works, 2020.1 does not.

mraumer-icrossing avatar Apr 10 '20 14:04 mraumer-icrossing

I get this on pulling content: Connecting via JCR remoting to http://crx [ERROR] checkout: org.apache.jackrabbit.vault.vlt.VltException: Unable to mount filesystem caused by: javax.jcr.RepositoryException: java.net.UnknownHostException: crx: nodename nor servname provided, or not known caused by: java.net.UnknownHostException: crx: nodename nor servname provided, or not known

And NullPointer when I push: Connecting via JCR remoting to http://localhost:4502/crx/server [ERROR] import: java.lang.NullPointerException: null

I read in previous issues that upgrading version of vault-cli helped, but no dice after I tried this: Latest version as of today (11 April 2020) is vault-cli-3.4.4. I also tried without success vault-cli-3.2.8 and vault-cli-3.1.16, versions that used to work with Intellij 2019.X

jmanuelbr avatar Apr 11 '20 07:04 jmanuelbr

I have not yet tried with 2020.1 (it's on my list, but hasn't really been a high priority, global pandemic and all). There were previously reported issues with vlt <3.2, with IDEA 2019.* which results in the ImageIO SPI class error you reported. But for everyone I've talked to about, upgrading vlt to 3.2 or greater resolves it.

My recommendation for now would be to stick to IDEA 2019.3 and vlt 3.4.x, as that seems to work for most folks. I will try to determine what the issues are with 2020.1 and see if I can release a fix sooner rather than later.

shsteimer avatar Apr 12 '20 18:04 shsteimer

I have the same error on 2020.1 and using vlt-3.4.4

TetrisBlack avatar Apr 23 '20 12:04 TetrisBlack

Wanted to provide an update. Short version: I don't have a fix yet but am working on it.

I'm working on a new release at https://github.com/shsteimer/IntelliVault/tree/release/0.11.0, and can reproduce it with that (as well as the current release with 2020.1). The odd thing is that when I use gradle runIde from that branch, I don't get any errors. When I build the plugin and install in my IDE from disk and then run a vault op, it fails. So that makes it especially difficult to debug.

shsteimer avatar Apr 27 '20 17:04 shsteimer

@shsteimer thank you very much

for both the plugin itself and your willingness to continue maintaining it

mraumer-icrossing avatar Apr 27 '20 17:04 mraumer-icrossing

@shsteimer, as @mraumer-icrossing said, thank you so much for continuing to work on this - it's very much appreciated!

ecooperman avatar Apr 27 '20 17:04 ecooperman

@shsteimer Also looking forward to have this up and running again. To me, it is a huge productivity boost when working with AEM!

Strat1987 avatar May 27 '20 09:05 Strat1987

FYI, still having issues getting this working. For me personally, I've switched to using repo (https://github.com/Adobe-Marketing-Cloud/tools/tree/master/repo#integration-into-intellij) which provides basically all the same functionality, and honestly is faster, except for multi repository support.

Still hoping to eventually get it to work, but that is at least a viable work-around, and for most users maybe even better overall, if your primary use case is interacting with a single aem repository.

shsteimer avatar May 27 '20 15:05 shsteimer

Thanks @shsteimer, I'm somewhat new to IntelliJ and hadn't seen that plugin yet but it seems that will fit my needs just fine. And thanks for continuing to work on this plugin that you don't even use yourself, that's serious dedication! We appreciate you!

ecooperman avatar May 27 '20 22:05 ecooperman

Even I have the same issue with IntelliJ IDEA 2020.1.2 (Community Edition) and vault-cli-3.4.4. @shsteimer Did you get a chance to fix the issue ? Error log: 2020-06-16 16:39:07,654 [ 177707] ERROR - s.impl.IntelliVaultServiceImpl - [ERROR] import: java.lang.NullPointerException: null java.lang.Throwable: [ERROR] import: java.lang.NullPointerException: null at com.intellij.openapi.diagnostic.Logger.error(Logger.java:146) at com.razorfish.platforms.intellivault.services.impl.IntelliVaultServiceImpl$1.run(IntelliVaultServiceImpl.java:320)

rohitreddy0109 avatar Jun 16 '20 23:06 rohitreddy0109

@rohitreddy0109 https://github.com/shsteimer/IntelliVault/issues/31#issuecomment-634759733 works really well as an interim solution. It takes a little bit to set up but has been running smoothly.

kisonay avatar Jun 22 '20 22:06 kisonay

I also used @shsteimer 's solution and is working fine for my usecase. I prefer GUI so I'll switch back to IntelliVault when this get fixed.

lbineau avatar Jun 30 '20 16:06 lbineau

Possible solution - I went to https://repo1.maven.org/maven2/org/apache/jackrabbit/vault/vault-cli/3.4.4/ and downloaded 3.4.4 version for Vault-cli. Post this, navigate to intelli j and (ctrl + alt+ s) > navigate to intellivault plugin > update the cli version to 3.4.4.

This issue was caused by Java 9 prohibiting javax.imageio.spi.ServiceRegistry checks and replacing them with 'java.util.ServiceLoader'. Intellivault has started working post this fix.

ehimsi avatar Jul 04 '20 10:07 ehimsi

Update - the last comment I made was on IntelliJ2019 but today I had success with idea 2020 too.

ehimsi avatar Jul 05 '20 12:07 ehimsi

Update - the last comment I made was on IntelliJ2019 but today I had success with idea 2020 too.

@ehimsi So Intelli vault plugin is working with Intellij2020 now ? which vault cli version are you using ? 3.4.4 ?

rohitreddy0109 avatar Jul 08 '20 19:07 rohitreddy0109

Update - the last comment I made was on IntelliJ2019 but today I had success with idea 2020 too.

@ehimsi So Intelli vault plugin is working with Intellij2020 now ? which vault cli version are you using ? 3.4.4 ?

Yes intelliJ2020 commnercial +vault-cli 3.4.4 - this is tested and confirmed working.

ehimsi avatar Jul 09 '20 01:07 ehimsi

Tried with both vault-cli 3.4.4 and 3.4.6 with IntelliJ 2020.2 and still hitting the NPE:

[ERROR] checkout: java.lang.NullPointerException: null

chriskief avatar Aug 24 '20 19:08 chriskief

IntelliJ 2020.2 and vault-cli 3.4.4, I am getting the following NPE.

java.lang.Throwable: [ERROR] checkout: java.lang.NullPointerException: null at com.intellij.openapi.diagnostic.Logger.error(Logger.java:143) at com.razorfish.platforms.intellivault.services.impl.IntelliVaultServiceImpl$1.run(IntelliVaultServiceImpl.java:320)

udayinit avatar Sep 28 '20 18:09 udayinit

I've installed the version 2019.3.5 and worked like a charm. Some colleagues have told me the version 2020.1/2 works but:

  • Performance degradation might be noticeable.

The IDE needs to be open specifically as follows (thanks to Viorel Lupu):

cd '/Applications/IntelliJ IDEA.app/Contents/bin'
../MacOS/idea
# you might want to append & at the end and also add disown on a new line in order to free the console

davidpelayo avatar Nov 18 '20 10:11 davidpelayo

The latest alpha version listed at https://plugins.jetbrains.com/plugin/7328-intellivault/versions/alpha in the ALPHA section (click the Alpha button to see) works with the current version of Intellij at the time of writing (e.g. 2021.2) 

BUT 

you need to manually modify the META-INF/plugin.xml file inside the JAR file and remove the upper version cap:

BEFORE:

<idea-version since-build="184" until-build="201.*"/>

AFTER:

<idea-version since-build="184"/>

NOTE: For this version to work you STILL need to use the NPE workaround as explained by davidpelayo

! EXPERIMENTAL !

:boom: :bomb: :warning:   Patched plugin. USE AT YOUR OWN RISK!   :warning: :bomb: :boom: :paperclip:    IntelliVault-0.11.20200414160404-SNAPSHOT_MOD.zip

ncautotest avatar Jun 04 '21 12:06 ncautotest