On Dec 28, 2003, at 6:40 PM, Frank Danner wrote:
Thanks Matt!
1. First of all there was a misunderstanding: Relying on 2.3+ features is
completely fine to me as Resin 3 supports them -)
2. Besides the already mentioned empty "<filter-name></filter-name>" Resin 3
does not support the <description> tag in <user-data-constraint>...
It looks like Resin 3.x does not support the 2.3 DTD correctly. This is an allowed element according to the DTD (copied and pasted below):
<!--
The description element is used to provide text describing the parent
element. The description element should include any information that
the web application war file producer wants to provide to the consumer of
the web application war file (i.e., to the Deployer). Typically, the tools
used by the web application war file consumer will display the description
when processing the parent element that contains the description.
Used in: auth-constraint, context-param, ejb-local-ref, ejb-ref, env-entry, filter, init-param, resource-env-ref, resource-ref, run-as, security-role, security-role-ref, servlet, user-data-constraint, web-app, web-resource-collection --> <!ELEMENT description (#PCDATA)>
3. I was able to get the JNDI/JDBC config right in resin.conf: Both
jdbc/appfuse and driver setup were missing. On startup of the servline
engine and initializing appfuse they're now a few DEBUG lines displayed but
only one warning: [appfuse] WARN [main]
SessionFactoryObjectFactory.addInstance(101) InitialContext did not
implement EventContext.
This is normal - I see it on Tomcat. What config are you using? My appfuse.conf is attached, but I get the following error on startup:
[appfuse] FATAL [main] DatasourceConnectionProvider.configure(47) | Could not find datasource: java:comp/env/jdbc/appfuse
javax.naming.NameNotFoundException: java:comp/env/jdbc/appfuse
at com.caucho.naming.ContextImpl.lookupImpl(ContextImpl.java:214)
at com.caucho.naming.ContextImpl.lookup(ContextImpl.java:172)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
appfuse.conf
Description: application/text
For some reason, it appears that Resin doesn't like that loginForm.jsp is included in welcome.jsp. I tried using <% include file="/WEB-INF/pages/loginForm.jsp" %> and <c:import url="/WEB-INF/pages/loginForm.jsp"/> and neither worked. The only solution I found was to copy and paste loginForm.jsp directly into welcome.jsp. The next problem I found was that I had to remove the signup link:
4. After invoking http://localhost/appfuse/ the page starts loading but then
"Yikes!" followed by a stack trace is displayed:
java.lang.IllegalStateException: "forward() not allowed after buffer has
committed. at
com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatche rImpl
.java:144) at
com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherI mpl.j
ava:118) at
com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java :893)
at _security._login__jsp._jspService(_login__jsp.java:51)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75"
...
In the Resin logfile there is another exception listed:
"java.io.FileNotFoundException: /appfuse/WEB-INF/pages/loginForm.jsp..." But
this file is definitely there and can be edited!?
<fmt:message key="login.signup">
<fmt:param><c:url value="/signup.jsp"/></fmt:param>
</fmt:message>Or I'd get the following error:
java.lang.IllegalStateException: forward() not allowed after buffer has committed.
at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:144)
at com.caucho.server.webapp.RequestDispatcherImpl.error(RequestDispatcherIm pl.java:118)
at com.caucho.jsp.PageContextImpl.handlePageException(PageContextImpl.java: 868)
at _security._login__jsp._jspService(_login__jsp.java:50)
My guess is that Resin's JSTL support is not up to par. If you can tell me how you configured your database connection in appfuse.conf - hopefully I'll be able to login.
Matt
You see, even after a plain-vanilla re-installation I cannot get it working
:-( Hence, it would be really cool if you could spent some 10 minutes to get
it working with the latest 3.0 snapshot on your machine first and sort the
problems out. If it isn't reproducible on your machine you really cannot
help me ;-)
Frank
----- Original Message ----- From: "Matt Raible" <[EMAIL PROTECTED]> To: "Frank Danner" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, December 29, 2003 12:51 AM Subject: Re: Just a Comment
Frank,
Please see comments below...
On Dec 28, 2003, at 2:57 PM, Frank Danner wrote:
Hi there:
I have just downloaded your latest appfuse 1.2 stuff and encountered a
few
problems with the servlet containers I use on Windows 2000:
http://www.caucho.com/download/ (the difference between ee and the ordinary edition are 2 jars: ejb-20.jar and resin-ejb.jar in Resin's lib directory). I tested with the latest 3.0 snapshot.
http://www.newatlanta.com/c/products/servletexec/download/home. I use
ServletExec 5.0/AS (not /ISAPI 5.0!). The evaluation is restricted to 3
concurrent requests - not enough for stress testing but fine for now...
1. The latter one fails by not supporting <resource-ref> in web.xml which shows a common problem of your stuff: I don't complain about relying on a 2.3+ servlet engine and featuring listeners etc. whereas Struts 1.1 only requires a 2.2+ compatible container but don't you rely too much on other J2EE-stuff beyond the JSP/Servlet scope :-(
I prefer servlet 2.3 because of Filters and the ability to reference URIs in JARs for tag libraries. The main reason I actively maintain AppFuse is to help me on future projects - to basically minimize the time needed to start a new project. To be honest, if a client uses a 2.2 container (and I can't talk them into upgrading) I believe it's in my best interest to pass on the project and look for another one. Therefore, I do not have any plans to support Servlet 2.2, and I don't see any reason why I should.
Most of my projects in the last year have been on 2.3 compliant containers, so this hasn't been a problem for me.
2. There is a redundant filter defined in web.xml with an empty <filter-name>. I just commented it out...
I saw that and I still can't figure out why it's happening. It doesn't
seem to cause a problem, so I haven't been too concerned with it. If
you are able to figure out why XDoclet is generating this, please let
me know.
3. Both containers complain on startup: [appfuse] FATAL [main] DatasourceConnectionProvider.configure(47) | and datasource: java:comp/env/jdbc/appfuse javax.naming.NameNotFoundException: java:comp/env/jdbc/appfuse.
You need to have a JNDI resource named "jdbc/appfuse" configured for a database connection pool. I recently configured this for Resin 3.0 if you'd like instructions on how to do this.
4. Changed the listenPort_http to 80 and listenPort_https to 443
respectively in web.xml in accordance to my servlet engine's setting. I
still have no clue what they are good for...
The main reason for these settings is for SSL switching - I code the
ports so that non-standard HTTP and HTTPS ports can be used (mainly for
development purposes).
MySQL 4.0.17 has been setup properly (localhost) according to your
description (appfuse.sql) and the 3.0.9 JDBC driver has been copied to
both
container lib directories...
Since Tomcat/Catalina or a fullblown EJB-container is not an option for me I feel pity I couldn't make appfuse 1.2 work on my machine since I really like your basic idea (Struts 1.1 + best-of-breed extensions and concepts combined) - just the f... EE dependencies or am I wrong?
The ejb classes are only needed by XDoclet to generate ActionForms from
POJOs. AppFuse works fine on Tomcat with only the JDBC Driver added to
$CATALINA_HOME/common/lib. I believe it would be fairly simple to get
it working on Resin - if I was a Resin Expert. Last time I tried to
get Roller (http://rollerweblogger.org) working on Resin 3.0.x, I found
that the documentation was inaccurate and it took me quite some time to
figure out how to properly setup the app.conf file.
Since I am not a Resin Expert, and none of my clients want to pay for a
servlet container, I have not spent any time trying to get it working.
In fact, I've been developing AppFuse for over a year, and you're the
first to try it on Resin! ;-) Keep trying, I'd like to get it working
on Resin and Orion, I just haven't been motivated since my clients are
happy with Tomcat.
Matt
