somewhere in here I'm using java.rmi.server.UID
which is upsetting GAE.
After :only'ing my dependencies to the bone I'm at an impasse.
(ns helloworld.core
(:use ;[hiccup.core]
[hiccup.page-helpers :only (html5 include-css)]
[clojure.contrib.string :only (split)]
[compojure.core :only (defroutes GET)]
[hiccup.middleware :only (wrap-base-url)])
(:require [appengine-magic.core :as ae]
[compojure.route :as route
:only (resources not-found) ]
[compojure.handler :as handler :only (site)])
(:gen-class :extends javax.servlet.http.HttpServlet))
(defn index-page
([name]
(html5
[:head
[:title (str "Hello " name)]
(include-css "/css/style.css")]
[:body
[:h1 (str "Hello " name)]]))
([] (index-page "World")))
(def match-opperator
{ "add" +
"subtract" -
"multiply" *
"divide" /})
(defroutes hello-routes
(GET "/:f/*" [f & x]
(index-page (apply (match-opperator f)
(map #(Integer/parseInt %)
(split #" " (:* x))))))
(GET "/" [] (index-page))
(route/resources "/")
(route/not-found "Page not found"))
(def app
(-> (handler/site hello-routes)
(wrap-base-url)))
(ae/def-appengine-app helloworld-app #'app)
I can load it up in jetty and it works fine, after loading it into the dev-appserver i get this:
HTTP ERROR 500 Problem accessing /multiply/1%202%204%208. Reason: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details. Caused by: java.lang.NoClassDefFoundError: java.rmi.server.UID is a restricted class. Please see the Google App Engine developer's guide for more details. at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:51) at org.apache.commons.fileupload.disk.DiskFileItem.(DiskFileItem.java:103) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at ring.middleware.multipart_params$loading__4414__auto__.invoke(multipart_params.clj:1) at ring.middleware.multipart_params__init.load(Unknown Source) at ring.middleware.multipart_params__init.(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at clojure.lang.RT.loadClassForName(RT.java:1578) at clojure.lang.RT.load(RT.java:399) at clojure.lang.RT.load(RT.java:381) at clojure.core$load$fn__4519.invoke(core.clj:4915)
ps: here is my project.clj incase this helps:
(defproject helloworld "1.0.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[org.clojure/clojure "1.2.1"] [org.clojure/clojure-contrib "1.2.0"] [compojure "0.6.2"] [hiccup "0.3.4"]] :dev-dependencies [[appengine-magic "0.4.1"] [swank-clojure "1.2.1"]])