Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

exception when running the main #1

Open
wei888 opened this issue Mar 30, 2016 · 1 comment
Open

exception when running the main #1

wei888 opened this issue Mar 30, 2016 · 1 comment

Comments

@wei888
Copy link

wei888 commented Mar 30, 2016

Hi, I imported this project in Eclipse,updated the channel info in config.edn, and tried to run the Main.java under sample-java/src/main/java/net/reborg/sample:

import clojure.lang.Keyword;
import net.reborg.AppleNews;
import java.util.Map;
import static net.reborg.AppleNews.*;

public class Main {
private static Map<Keyword, Object> resp;

public static void main(String[] args) {
    resp = AppleNews.createArticle(loadSampleBundle());
    printResponse("createArticle 1-arg", resp);
    String id = getId(resp);
    resp = getArticle(id);
    printResponse("getArticle 1-arg", resp);
}

}

and run it as java app:
I got
Reflection warning, net/reborg/applenews_api/image.clj:41:25 - call to static method read on javax.imageio.ImageIO can't be resolved (argument types: unknown).
Reflection warning, net/reborg/applenews_api/image.clj:42:25 - reference to field getWidth can't be resolved.
Reflection warning, net/reborg/applenews_api/image.clj:43:26 - reference to field getHeight can't be resolved.
Reflection warning, net/reborg/applenews_api/image.clj:45:21 - call to static method resize on org.imgscalr.Scalr can't be resolved (argument types: unknown, org.imgscalr.Scalr$Mode, unknown, unknown, unknown).
Reflection warning, net/reborg/applenews_api/image.clj:47:19 - call to static method write on javax.imageio.ImageIO can't be resolved (argument types: unknown, unknown, unknown).
Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:554)
at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69)
at clojure.java.io$reader.doInvoke(io.clj:102)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.core$apply.invoke(core.clj:632)
at clojure.core$slurp.doInvoke(core.clj:6653)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at net.reborg.applenews_api.bundle$load_edn.invoke(bundle.clj:8)
at clojure.lang.Var.invoke(Var.java:379)
at net.reborg.AppleNews.withConfig(AppleNews.java:32)
at net.reborg.AppleNews.createArticle(AppleNews.java:78)
at net.reborg.sample.Main.main(Main.java:16)

Is anything I need to config more?

Thanks,
Wei

@reborg
Copy link
Owner

reborg commented Apr 2, 2016

Hey Wei,

can I see your configuration please? Just replace the actual keys with empty strings, but leave all the rest as it is. Thanks.

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

No branches or pull requests

2 participants