
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
- Appwrite CLI
I try to deploy a function using Appwrite CLI but it says: `appwrite functions createDeployment ^ --functionId=xyz^ --code="." ^ --activate error: u...
- Cloud Functions Executions partially dow...
Yesterday we reported a wide Function-Downtime. Today we have the same - just not wide-spread across all functions. DEV is down - Prod still working. Its the s...
- Appwrite Functions Generally Down?
We are getting customer support requests, that our service is down. We tried to pinpoint it, and we can't see any logs of any appwrite cloud function in the pas...
