
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
- API preflight request not working on .f...
When I am calling a function on my APP through the domain is failing. Because the preflight request (OPTIONS HTTP request) times out. this only occurs with fu...
- No Headers
Hi I have 2 appwrite functions, one is working fine on localhost, second is not even working on prod with https, i inspected the api call, no headers are being ...
- Cloud Function Deployment crashing
My golang cloud function crashes on deployment and its a bit non-descript. Here is the error message. It says "Document already exists". This is a general probl...
