I ran into a Strange Problem. I'm currently working on a project with the following configuration:
Spring Framwork for data services
JSF and Vaadin as web Framwork (2 seperated subcontexts)
Tomcat 7 as application Container
Spring EL resolver
When I deploy this application to my Tomcat Server everything works fine. When I build the application as a war-file with maven and deploy this war file on my Tomcat (the same tomcat!) the Vaadin frontend works fine, but in the JSF all Tags with values from beans stay empty. Tags with just plain text in it are processed correctly.
My biggest Problem is, that I don't get any exception. I'm also a bit confused that I also don't get an exception, when I try to access non-existing beans in my eclipse-deployed environment no error occurs, just no output is produced at that point.
I raised all Log Levels to max, but in the logs everything seems to be fine.
So, has anybody an idea, how to get JSF to display errors, when beans are not accessable and why there are difference when I deploy directly from eclipse or from a war file?
Thanks in advance!
nclaasen
Related
I have decided to use Liferay for my next project and I'm trying to somehow get an old non-Liferay web application deployed on tomcat 8 that was bundled with Liferay. The application uses servlets.
After some googling I got the impression that it should be possible to simply deploy the application on tomcat which I did. Liferay does pick it up from the /deploy folder but there is an error while deploying it saying web.xml needs to be upgraded to 2.4. My web.xml is almost empty because I use #WebServlet annotatations for servlet mapping.
So my question is, is it possible to deploy a non-Liferay application to tomcat that comes with Liferay without making any changes to it?
You should only place Portlet-WARs into LIFERAY/deploy, as Liferay will try to convert such WARs into a Liferay specific Portlet-WAR, before deploying them in Tomcat.
If you need to deploy a legacy WAR you should place that into LIFERAY\tomcat...\webapps\ and Tomcat will start it without any modification.
One of the most important non-functional requirements of any project is the build process in my opinion and that's where I kinda get stuck in my java project, which has just one external dependency, a jdbc compatible database. All the tutorials about spring and deployment out there; I've read them all, but they either say:
run it with gradle bootRun applications.properties (yes works but on a webserver I'm not going to have any properties-files, but JNDI resource for example) or
build a deployable war file with JNDI resources (yes it works on the webserver, but not in my embedded webserver or I'm doing it wrong, but I cannot find any doc about how an embedded tomcat loads a context.xml from outside the jar file).
Now I tried to use the same setup as my server and installed tomcat7 and the #Asyc #Scheduled services run, but no servlets, like a simple /status page should return "OK" just for checking. catalina.out does not show any errors. My /manager from tomcat7-admin says deployment ok, and when I click start: "FAIL - Application at context path /xyz-0.1.0 could not be started
FAIL - Encountered exception org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/xyz-0.1.0]]"
And now I want to make a cut here and throw every "bootstrap" stuff away and start from zero.
So my question is, am I wrong when I say, that the big deal of my deployment is a jdbc JNDI resource provided from the web container, which is called 'jdbc/xyz' and everyone who wants to deploy my war needs that JNDI. That means so matter if you're using wildfly, jboss, tomcat, glassfish or any embedded server: your server impl has to provide that web container and jndi resource to make it run. And I don't want to configure any tomcat, glassfish or whatever implementation in my war.
Is that wrong?
It would be great, if you could help me. I'm playing around with that many weeks now :( and if A works B does not and vice versa. Would it be easier to use JEE?
Thank you.
I'm fairly new with Spring Framework and struggling to get this simple example to work on a Tomcat 6 instance. The example is here http://spring.io/guides/gs/rest-service/ .
It works fine when i run it within Eclipse but when i convert it to a WAR file and deploy, the directory in Tomcat is created but the service/tomcat responds with a 404.
I suspect i need to create a web.xml file (not sure the annotated way will work with tomcat 6 because it supports only servlet 2.5) but not sure where to start.
Any help would be much appreciated.
I am attempting to embed tomcat in my existing Jersey web application.
I am able to get Tomcat running no problem, and even loading my JSP's from the webapp dir. The issue is getting it to see my WebApplicationInitializer class like it does in the full container. I'm fairly certain this is a class path issue, if I add a VirtualDirResource and set the context to it, my Jersey app loads. The issue there is, Jersey can no longer load my JSP Viewables. It returns 404. Again, I have no web.xml anywhere. Not sure what code would be helpful, so ask for code samples if you think you have an answer.
I have a Spring Roo app that is deploying to Tomcat with no issues. I'm trying to deploy it to JBoss 6, but I'm finding it impossible to do so.
I've exhausted all resources from Google and I simply receive errors everywhere. Unfortunately, they do not seem specific enough to start narrowing them down to list here.
What can information could I provide to help resolve this situation?
Essentially, I need to know what I need to change from a standard Spring Roo app, using Hibernate and Mysql to work with JBoss 6.
EDIT:
This is the error that I am getting
[ClassLoaderManager] Unexpected error during load of:org.apache.commons.collections.DoubleOrderedMap$1$1: java.lang.IllegalAccessError: class org.apache.commons.collections.DoubleOrderedMap$1$1 cannot access its superclass org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator
Impossible to tell, since you posted no errors.
I'm guessing that it's a problem with the configuration difference between JBOSS and Tomcat.
You set up JDBC data source connection pools differently. Tomcat has the context.xml in the server /conf folder. JBOSS has other XML config files in its server/default/deploy folder. Did you create those correctly?
I assume that you're using JNDI names for injected data sources.
Your JDBC driver JAR for MySQL goes in the Tomcat /lib folder and the JBOSS server/default/deploy/lib folder, not the wAR WEB-INF/lib.
But you should be able to take a WAR with all the Spring Roo stuff, put it into an EAR with jboss-web.xml configuration, and start it up.