Vraptor4 in Websphere Liberty Profile (WLP) 8.5.5.6

60 views
Skip to first unread message

brt...@gmail.com

unread,
Aug 11, 2015, 4:58:52 PM8/11/15
to caelum-vraptor-en
We are currently evaluating Vraptor for a fairly straight-forward business web application.

IBM's latest release of its Liberty Profile product is JavaEE 7 compliant. I believe the version of Weld that WLP uses is 2.2.10.

If I create a simple Vraptor application that uses the same JSP names under different paths I don't see the 2nd - nth page rendered in the browser even though the Vraptor logging seems to indicate that the proper controller method and proper JSP is being executed. It's as if the JSP is being cached somehow by filename and ignoring the different path.

For example:

@Controller
public class IndexController {
@Get("/")
public void index() {
}
}

@Controller
public class FooController {
@Get("/foo")
public void index() {
}
}

@Controller
public class BarController {
@Get("/bar")
public void index() {
}
}

And

WEB-INF/jsp/index:

index.jsp

WEB-INF/jsp/foo:

index.jsp

WEB-INF/jsp/bar:

index.jsp




You will only ever see the contents of WEB-INF/jsp/index/index.jsp even though the URL will change in the browser and the logs will say that the other controller and path executed.

Note that this same layout will work properly in Tomcat 7 and this *exact* same WAR deployed in Wildfly 8 also works properly.

Any ideas on how to troubleshoot?

I've attached the log files from the application server (WLP) and from the application itself.

vraptor-wlp-index-test-appserver-log.txt
vraptor-wlp-index-test-log.txt

Rodrigo Turini

unread,
Aug 12, 2015, 8:53:02 AM8/12/15
to caelum-vraptor-en
Hi brtrvn, 

this is a very unexpected behavior, i'll try to reproduce it debugging vraptor code.
could you please provide all of your environment informations? i.e:

operational system (mac, windows, linux, etc)
java version (1.8?)
vraptor version

and anything else you think that can be usefull for reproducing this weird behavior :) 

kind regards

--
You received this message because you are subscribed to the Google Groups "caelum-vraptor-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caelum-vraptor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

brt...@gmail.com

unread,
Aug 12, 2015, 2:07:19 PM8/12/15
to caelum-vraptor-en, rodrigo...@caelum.com.br
Very weird indeed! Like I said, it works as expected in Wildfly (with all JavaEE dependencies provided) and in Tomcat (with all JavaEE dependencies bundled with the WAR).

Here is some environment info (cheat sheet - CentOS 6, Oracle Java 7, WLP 8.5.5.6):

[alg@localhost ~]$ cat /etc/redhat-release 
CentOS release 6.6 (Final)

[alg@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[alg@localhost ~]$ java -version
java version "1.7.0_76"
Java(TM) SE Runtime Environment (build 1.7.0_76-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode

[alg@localhost ~]$ sudo /opt/ibm/was/liberty/wlp/bin/productInfo version
Product name: WebSphere Application Server
Product version: 8.5.5.6
Product edition: BASE_ILAN

[alg@localhost ~]$ sudo /opt/ibm/was/liberty/wlp/bin/productInfo featureInfo | sort
appClientSupport-1.0 [1.0.0]
appSecurity-2.0 [1.0.0]
appSecurityClient-1.0 [1.0.0]
batch-1.0 [1.0.0]
beanValidation-1.1 [1.0.0]
cdi-1.2 [1.0.0]
collectiveMember-1.0 [1.0.0]
concurrent-1.0 [1.0.0]
distributedMap-1.0 [1.0.0]
ejb-3.2 [1.0.0]
ejbHome-3.2 [1.0.0]
ejbLite-3.2 [1.0.0]
ejbPersistentTimer-3.2 [1.0.0]
ejbRemote-3.2 [1.0.0]
el-3.0 [3.0.0]
j2eeManagement-1.1 [1.1.0]
jacc-1.5 [1.0.0]
jaspic-1.1 [1.0.0]
javaee-7.0 [7.0.0]
javaeeClient-7.0 [1.0.0]
javaMail-1.5 [1.5.0]
jaxb-2.2 [1.0.0]
jaxrs-2.0 [1.0.0]
jaxrsClient-2.0 [1.0.0]
jaxws-2.2 [1.0.0]
jca-1.6 [1.0.0]
jca-1.7 [1.0.0]
jcaInboundSecurity-1.0 [1.0.0]
jdbc-4.1 [1.0.0]
jndi-1.0 [1.0.0]
jpa-2.1 [1.0.0]
jsf-2.2 [1.0.0]
json-1.0 [1.0.0]
jsonp-1.0 [1.0.0]
jsp-2.3 [1.0.0]
ldapRegistry-3.0 [1.0.0]
localConnector-1.0 [1.0.0]
managedBeans-1.0 [1.0.0]
mdb-3.2 [1.0.0]
monitor-1.0 [1.0.0]
requestTiming-1.0 [1.0.0]
restConnector-1.0 [1.0.0]
servlet-3.1 [1.0.0]
sessionDatabase-1.0 [1.0.0]
ssl-1.0 [1.0.0]
wasJmsClient-2.0 [1.0.0]
wasJmsSecurity-1.0 [1.0.0]
wasJmsServer-1.0 [1.0.0]
webCache-1.0 [1.0.0]
webProfile-7.0 [7.0.0]
websocket-1.1 [1.0.0]

There are some WARN messages from Weld when the WAR deploys that I don't see when it deploys in Wildfly 8 (see the logs attached to my original post).

If you don't already have WLP, you can download it from here: https://developer.ibm.com/wasdev/downloads/#asset/runtimes-8.5.5-wlp-javaee7

It runs fine on OS X too... just unzip it, create a default server (like a domain in JBoss) and throw the WAR in the dropins folder.

I've attached the simplified project that exposes the issue (this won't work in Tomcat 7, but will in Wildfly and WLP). I can also attach a version that will deploy in Tomcat 7 if you need.

Thanks!
Michael
vraptor-index-test.tar.gz

Rodrigo Turini

unread,
Aug 14, 2015, 5:01:54 PM8/14/15
to brt...@gmail.com, caelum-vraptor-en
Hi, Micheal! I couldn't debug this code yet, but I'll asap.
I've just opened an issue to track this out; https://github.com/caelum/vraptor4/issues/1000
Cheers

brt...@gmail.com

unread,
Aug 17, 2015, 4:20:13 PM8/17/15
to caelum-vraptor-en
Thanks Rodrigo!

Let me know what else I can do to help

brt...@gmail.com

unread,
Sep 3, 2015, 5:44:57 PM9/3/15
to caelum-vraptor-en
Hey Rodrigo,

Any news on this? Is there something else I can help provide? We are closing in on our decision deadline. I'd like to be able to push for Vraptor, but we may have to go to Spring Web MVC if we can't figure out what craziness is going on.

Thanks,
Michael

Rodrigo Turini

unread,
Sep 4, 2015, 8:28:40 AM9/4/15
to caelum-vraptor-en
Hey Michael,

I'm downloading WLP just now, to take a deeper look on this. 
Sorry, it has been a very busy month.
I'll send you an e-mail in a few minutes if I get any problems reproducing it, ok?

Kind regards

Rodrigo Turini

unread,
Sep 4, 2015, 9:11:59 AM9/4/15
to caelum-vraptor-en
Ok, I'm running your code and it's always rendering /index/index.jsp, as you said.
I'm trying to debug vraptor's code, to check it out. 

Rodrigo Turini

unread,
Sep 4, 2015, 9:29:18 AM9/4/15
to caelum-vraptor-en
Hi Michael, I've good and bad news about this weird behaviour
The good news is that VRaptor is working correctly 
It's processing the request and forwarding to /WEB-INF/jsp/bar/index.jsp

Screen Shot 2015-09-04 at 10.20.14.png
you know the bad news ;) 
somehow WLP is ignoring it, rendering always the same index/index.jsp.
I'm trying to dig deeper on this, but I'm not very confident

Chico Sokol

unread,
Sep 4, 2015, 10:55:58 AM9/4/15
to caelum-vraptor-en
What happens if you create a simple web filter that executes a forward to a jsp? Does that work?

brt...@gmail.com

unread,
Sep 9, 2015, 12:40:29 PM9/9/15
to caelum-vraptor-en
Thanks for digging deeper Rodrigo. I had a feeling it wasn't vraptor.

Francisco, I'm happy to try, but what would I be filtering for/on?

Chico Sokol

unread,
Sep 15, 2015, 9:14:58 AM9/15/15
to caelum-vraptor-en

My idea was to create a WebFilter that just executes a forward to a .jsp.

Just to make sure that this is a WebSphere issue and not VRaptor's.


Em qua, 9 de set de 2015 13:40, <brt...@gmail.com> escreveu:
Thanks for digging deeper Rodrigo. I had a feeling it wasn't vraptor.

Francisco, I'm happy to try, but what would I be filtering for/on?

Reply all
Reply to author
Forward
0 new messages