Hi folks I am getting the below build error when I try to deploy a java function
Task :compileJava FAILED /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Main.java:5: error: package io.appwrite does not exist import io.appwrite.Client; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:9: error: package jakarta.mail does not exist import jakarta.mail.MessagingException; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:10: error: package jakarta.mail does not exist import jakarta.mail.Session; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:11: error: package jakarta.mail does not exist import jakarta.mail.Transport; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:12: error: package jakarta.mail.internet does not exist import jakarta.mail.internet.InternetAddress; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:13: error: package jakarta.mail.internet does not exist import jakarta.mail.internet.MimeMessage;
My deps.gradle file
dependencies { implementation 'io.appwrite:sdk-for-kotlin:2.0.0' implementation 'com.sun.mail:jakarta.mail:2.0.0' }
I am using self hosted appwrite instance v1.4.3
java runtime 17
Hi @Steven can you please help
Hi @Danish can you help here please
Hello @palani please, avoid pinging people if it's not really needed 😅
Seems like it was not possible to get the packages located at such directories
How are you deploying the functions?
Sorry
Via Console
Given the entry point as main
[Solved] Build Error on Java Functions
Sooo... What's the solution?
Deploying throght any alternative method?
Yeah deployed it via cli
I see, glad to hear you managed to solve it 😄 . Sorry for not replying before, I lost the post between many others😓
No problem.i get it..
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...