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

IDEA IntelliJ plugin silently fails #1143

Open
RockyMM opened this issue Oct 1, 2024 · 4 comments
Open

IDEA IntelliJ plugin silently fails #1143

RockyMM opened this issue Oct 1, 2024 · 4 comments

Comments

@RockyMM
Copy link

RockyMM commented Oct 1, 2024

It seems that palantir-java-format is silently failing in my installation of IDEA IntelliJ.

I would intentionally mess up the formatting of a source file, and press Cmd-Option-L. I would observe in the task area of IntelliJ that "Running palantir-java-format", but I would observe no change in the format of the source file.

Is there some log I could look at to check what's wrong?

@dintz
Copy link

dintz commented Nov 21, 2024

Same problem for here on macOS with IntelliJ IDEA 2024.3 (Ultimate Edition).

@jordanms
Copy link

jordanms commented Jan 9, 2025

I have the same issue. Latest plugin version and IntelliJ 2024.1.2.

@kristof-taveirne
Copy link

Same issue here ...

This is the stacktrace:

java.lang.RuntimeException: Error running formatter command
	at com.palantir.javaformat.bootstrap.BootstrappingFormatterService.getFormatReplacements(BootstrappingFormatterService.java:59)
	at com.palantir.javaformat.intellij.PalantirJavaFormatFormattingService$PalantirJavaFormatFormattingTask.run(PalantirJavaFormatFormattingService.java:94)
	at com.intellij.formatting.service.AsyncDocumentFormattingService$FormattingRequestImpl.runTask(AsyncDocumentFormattingService.java:261)
	at com.intellij.formatting.service.AsyncDocumentFormattingService.runAsyncFormat(AsyncDocumentFormattingService.java:106)
	at com.intellij.formatting.service.AsyncDocumentFormattingService$FormattingProgressTask.run(AsyncDocumentFormattingService.java:380)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:491)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$7(CoreProgressManager.java:542)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:223)
	at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:45)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:222)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:674)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:749)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:673)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:203)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:502)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:467)
	at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
	at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
	at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
	at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:463)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.io.IOException: Command terminated with exit value 1
Command: /Users/kristof/.sdkman/candidates/java/21.0.5-jbr/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -cp /Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/guava-33.0.0-jre.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/j2objc-annotations-2.8.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-datatype-guava-2.17.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-core-2.17.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/failureaccess-1.0.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-databind-2.17.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-annotations-2.17.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/palantir-java-format-spi-2.50.0.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/functionaljava-4.8.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-datatype-jdk8-2.17.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/palantir-java-format-2.50.0.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/checker-qual-3.42.0.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jsr305-3.0.2.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/error_prone_annotations-2.24.1.jar:/Users/kristof/Library/Application Support/JetBrains/IntelliJIdea2024.3/plugins/palantir-java-format/impl/jackson-module-parameter-names-2.17.2.jar com.palantir.javaformat.java.Main --character-ranges 7259:7412 --output-replacements --palantir -
Stdout:

Stderr:
<stdin>:error: error: invalid length 154, offset + length (7412) is outside the file

	at com.palantir.javaformat.bootstrap.FormatterCommandRunner.runWithStdin(FormatterCommandRunner.java:53)
	at com.palantir.javaformat.bootstrap.BootstrappingFormatterService.getFormatReplacementsInternal(BootstrappingFormatterService.java:93)
	at com.palantir.javaformat.bootstrap.BootstrappingFormatterService.getFormatReplacements(BootstrappingFormatterService.java:57)
	... 34 more

Hope it helps

Kind regards,
Kristof

@austek
Copy link

austek commented Jan 14, 2025

Same problem on IntelliJ IDEA 2024.3.1.1 (Ultimate Edition)

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

5 participants