Nginx with Java library

Jennie Jia Jennie.Jia at
Fri May 24 19:32:29 UTC 2019

Thank you, Patrick!   I am trying figure out  how to port the ONAP crypto config to the nginx-clojure app.  But no luck so far... 

Here is what  did:

1)  I added the dependency in the pom.xml  here
2) Build jar  and put it under the jar/lib folder of nginx-clojure-0.4.5.   
3) Start nginx
4) Send HTTP request (with cookie)  to nginx,  My java code  is triggered, but got NoClassDefFoundError

2019-05-24 13:41:56[error][16860][main]server unhandled exception!
java.lang.NoClassDefFoundError: org/onap/portalsdk/core/onboarding/util/CipherUtil
	at example.MyHandler.invoke(
	at nginx.clojure.NginxSimpleHandler.handleRequest(
	at nginx.clojure.NginxSimpleHandler.execute(
	at nginx.clojure.NginxClojureRT.eval(
Caused by: java.lang.ClassNotFoundException: org.onap.portalsdk.core.onboarding.util.CipherUtil
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(

-----Original Message-----
From: nginx <nginx-bounces at> On Behalf Of Patrick
Sent: Thursday, May 23, 2019 10:03 PM
To: nginx at
Subject: Re: Nginx with Java library

On 2019-05-23 21:29, Jennie Jia wrote:
> Here is my code to do the logic, but I checking the java library 
> provided by this nginx-clojure 
> I can not figure out how to get  "cookie" header value from the http 
> request ( it use here.  Any help are 
> appreciated.!

> 	public Object[] invoke(Map<String, Object> request) throws 
> IOException {
> 		NginxJavaRequest req = ((NginxJavaRequest)request);
> 		// TODO  Need Figure out how to get Cookie from the request
 		//String encryptedCookie = req.getVariable("cookie");
 		String encryptedCookie = (String) ((Map)request.get(HEADERS)).get("cookie");

If all that is needed is the decrypted cookie contents, and the backend is written in another language, consider porting the cookie decryption code to that language as ONAP uses the SunJCE flavor of AES/CBC/NoPadding

Note that to decrypt the cookie, the ONAP crypto config needs to be ported to the nginx-clojure app as well.

nginx mailing list
nginx at
This email and the information contained herein is proprietary and confidential and subject to the Amdocs Email Terms of Service, which you may review at <>

More information about the nginx mailing list