Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ecooperman opened this issue Apr 9, 2020 · 22 comments

Comments

@ecooperman
Copy link

ecooperman commented Apr 9, 2020

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 ecooperman changed the title Getting Nullpointer Exception Always Receive NullPointerException Apr 9, 2020
@lukasz-wieczorek
Copy link

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

@mraumer-icrossing
Copy link

@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.

@jmanuelbr
Copy link

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

@shsteimer
Copy link
Owner

shsteimer commented Apr 12, 2020

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.

@TetrisBlack
Copy link

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

@shsteimer shsteimer changed the title Always Receive NullPointerException Plugin doesn't work with IJ 2020.1 (was: Always Receive NullPointerException) Apr 27, 2020
@shsteimer
Copy link
Owner

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.

@mraumer-icrossing
Copy link

@shsteimer thank you very much

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

@ecooperman
Copy link
Author

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

@Strat1987
Copy link

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

@shsteimer
Copy link
Owner

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.

@ecooperman
Copy link
Author

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!

@rohitreddy0109
Copy link

rohitreddy0109 commented Jun 16, 2020

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)

@kisonay
Copy link

kisonay commented Jun 22, 2020

@rohitreddy0109 #31 (comment) works really well as an interim solution. It takes a little bit to set up but has been running smoothly.

@lbineau
Copy link

lbineau commented Jun 30, 2020

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.

@ehimsi
Copy link

ehimsi commented Jul 4, 2020

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
Copy link

ehimsi commented Jul 5, 2020

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

@rohitreddy0109
Copy link

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 ?

@ehimsi
Copy link

ehimsi commented Jul 9, 2020

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.

@chriskief
Copy link

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

@udayinit
Copy link

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)

@davidpelayo
Copy link

davidpelayo commented Nov 18, 2020

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

@ncautotest
Copy link

ncautotest commented Jun 4, 2021

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 !

💥 💣 ⚠️   Patched plugin. USE AT YOUR OWN RISK!   ⚠️ 💣 💥
📎    IntelliVault-0.11.20200414160404-SNAPSHOT_MOD.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests