Comments (2)
Try http://localhost:3000/hello
or http://localhost:3000/hello-atom
The reason it fails is that there is no route for /
and there is no handler defined for the case where no route matches. IIRC you can actually do this in bidi by providing a catch-all true
- but make sure you use the 'vector-of-vectors' form rather than the map-form, because it's important the true
is matched last (maps in clojure are unordered)
["/" [["hello" (yada "hello world" {:id :hello})]
["hello-atom" (yada (atom "hello world"))]
[true (yada nil)]]]
Closing for now but please re-open if you want.
from yada.
hmm, I use the same routes definition above and I got another error :
backend.yada.core=> Dec 31, 2015 6:21:23 PM io.netty.channel.DefaultChannelPipeline$TailContext exceptionCaught
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.channel.ChannelPipelineException: io.netty.handler.codec.http.HttpServerCodec.handlerAdded() has thrown an exception; removed.
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:501)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded(DefaultChannelPipeline.java:482)
at io.netty.channel.DefaultChannelPipeline.addLast0(DefaultChannelPipeline.java:146)
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:129)
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:120)
at aleph.http.server$pipeline_builder$fn__25246.invoke(server.clj:385)
at aleph.netty$pipeline_initializer$reify__24879.channelRegistered(netty.clj:478)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRegistered(AbstractChannelHandlerContext.java:162)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRegistered(AbstractChannelHandlerContext.java:148)
at io.netty.channel.DefaultChannelPipeline.fireChannelRegistered(DefaultChannelPipeline.java:734)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register0(AbstractChannel.java:450)
at io.netty.channel.AbstractChannel$AbstractUnsafe.access$100(AbstractChannel.java:378)
at io.netty.channel.AbstractChannel$AbstractUnsafe$1.run(AbstractChannel.java:424)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:357)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalAccessError: tried to access method io.netty.channel.DefaultChannelPipeline.generateName(Lio/netty/channel/ChannelHandler;)Ljava/lang/String; from class io.netty.channel.ChannelHandlerAppender
at io.netty.channel.ChannelHandlerAppender.handlerAdded(ChannelHandlerAppender.java:190)
at io.netty.channel.DefaultChannelPipeline.callHandlerAdded0(DefaultChannelPipeline.java:488)
... 17 more
// note, @malcolmsparks I cannot reopen this issue so I reference you instead.
from yada.
Related Issues (20)
- Authentication schemes cannot be configured per request method HOT 3
- Request Body not present in ctx in case plumatic schema validation failure, defined in resource. HOT 2
- Yada manual edge example out of date HOT 3
- More reflection warnings HOT 1
- Incorrect multipart header processing
- Unable to access content-type in authorization
- Multipart throws "Malformed boundary" error when sent an empty submission
- is CI broken? HOT 1
- yada.swagger-parameters & yada.parameters are almost the same code. HOT 1
- :x-frame-options DENY is not a valid value
- Assumes clj-time will come in through ring-core (aka incompatible with ring-core 1.8.1)
- Plans for PATCH support
- Impossible to pretty-print response bodies by using `pretty=true` media type parameter
- Is it possible to determine if a path/href string is part of my system? HOT 1
- Yada may give out of memory exception (java.lang.OutOfMemoryError, OOM) when put under load
- Unsetting cookies: expires vs max-age
- `content-length` is incorrectly set to 0 when responding with HTTP 304 to GET requests
- Cannot use aleph 0.5.0 with yada HOT 6
- Test failure on master
- 404 for docs link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yada.