Fork me on GitHub
#hoplon
<
2018-08-26
>
nuclear_tech_support18:08:21

I'm using the hoplon-castra template to walk through the tutorial on castra, but I am trying to connect to a localhost oracle xe database. I was able to do this in lein by installing the ojdbc jar to my maven repo and including a dep like [local/ojdbc "12.x.x.x"]. Boot can't seem to find the ojdbc jar.

nuclear_tech_support18:08:40

What do I have to do to make boot aware of the jar in my maven repo?

flyboarder19:08:54

@nuclear_tech_support add it to your dependencies

nuclear_tech_support19:08:52

@flyboarder I added [local/ojdbc8 "12.2.0.1"] to my :dependecies in build.boot, but boot doesn't seem to find it on my class path.

flyboarder19:08:21

is that the correct group?

nuclear_tech_support19:08:09

Well, I installed Oracles ojdbc.jar in my maven repo, and that is how I add it using lein.

flyboarder19:08:14

try without local/

nuclear_tech_support19:08:02

Could not find artifact ojdbc8:ojdbc8:jar:12.2.0.1 in clojars (https://repo.clojars.org/)

flyboarder19:08:34

Could you post your dependencies vector? Also what is the path you have the package installed at?

flyboarder19:08:22

That would suggest it cannot be found in the local repo so it is looking at clojars

nuclear_tech_support19:08:16

:dependencies '[[adzerk/boot-cljs          "1.7.228-2"]
                  [adzerk/boot-reload        "0.5.1"]
                  [compojure                 "1.6.0-beta3"]
                  [hoplon/castra             "3.0.0-alpha7"]
                  [hoplon/hoplon             "6.0.0-alpha17"]
                  [org.clojure/clojure       "1.8.0"]
                  [org.clojure/clojurescript "1.9.495"]
                  [pandeiro/boot-http        "0.7.6"]
                  [ring                      "1.5.1"]
                  [ring/ring-defaults        "0.2.3"]
                  [adzerk/boot-cljs-repl     "0.3.3"]
                  [com.cemerick/piggieback   "0.2.1"  :scope "test"]
                  [weasel                    "0.7.0"      :scope "test"]
                  [org.clojure/tools.nrepl   "0.2.12" :scope "test"]
                  [ojdbc8 "12.2.0.1"]]

nuclear_tech_support19:08:01

C:\Users\xb0g\.m2\repository\org\oracle\ojdbc8\12.2.0.1

flyboarder19:08:57

oh then try this org.oracle/ojdbc8

nuclear_tech_support19:08:15

actually, I found the jar file here: C:\Users\xb0g\.m2\repository\com\oracle\ojdbc8\12.2.0.1``

flyboarder19:08:42

ok so try com.oracle/ojdbc8

nuclear_tech_support19:08:24

That seems to have got it, but I still can't seem to get data from the database to the page. I just get "Server Error" as the error message. Is there a way I can see what's going on in the castra server?

flyboarder20:08:10

@nuclear_tech_support some well placed prn’s should do it 😉

flyboarder20:08:47

You should also be able to extract the error from the javelin cell, but I dont use castra myself

nuclear_tech_support20:08:39

So... What do you use for your server?

nuclear_tech_support20:08:17

Is there an example of using hoplon with regular REST calls?

flyboarder20:08:41

Hoplon is unrelated to the transport system

flyboarder20:08:47

you can use anything

flyboarder20:08:05

I myself use websockets

flyboarder20:08:30

via feathersJS

flyboarder20:08:18

Since Hoplon uses jquery by default you could use that for your rest calls

nuclear_tech_support20:08:10

Okay, so I can just set up some storage cells, use those in some calculation cells, and deref those in my UI. Then fire off some jquery getJson and give them a callback that mutates the storage cell.

flyboarder20:08:12

@nuclear_tech_support once you figure out how that process works, everything in hoplon gets easier