Jeffery Painter
2017-12-13 15:42:32 UTC
Hi Georg,
A couple things I have noticed and these updates are in my sample
turbine-flux app on github.
When creating a new project from the archetype (using the Maven wizard
in eclipse), I have seen this issue pop up, and I have been fixing it
manually for my projects. Just wondering if this is something we can
address in the archetype itself if you agree.
By default, the web.xml definition throws an error in Eclipse:
*Referenced file contains errors
(http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_2_5.xsd).
*
I had updated my web.xml with this version instead (and it works with
Tomcat 8.5.x as my local server runtime environment).
Java EE 7 Schema (April 30, 2013)
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
The next issue I had was with Tomcat and getting JNDI to initialize. I
created a META-INF/context.xml with the following definition:
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resource name="jdbc/turbine" global="jdbc/turbine"
auth="Container" type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/turbine"
username="db_user" password="db_password"
maxTotal="100" maxIdle="20" minIdle="5" maxWaitMillis="10000"/>
</Context>
And that seems to clear that up so it starts immediately within
Eclipse/Tomcat configuration. Otherwise, out of the box, the user gets
the following exception:
Horrible Exception: org.apache.turbine.services.InstantiationException: Service AvalonComponentService failed to initialize
If you agree with these changes, I am happy to commit them to the
Turbine webapp archetype.
--
Jeffery
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@turbine.apache.org
For additional commands, e-mail: dev-***@turbine.apache.org
A couple things I have noticed and these updates are in my sample
turbine-flux app on github.
When creating a new project from the archetype (using the Maven wizard
in eclipse), I have seen this issue pop up, and I have been fixing it
manually for my projects. Just wondering if this is something we can
address in the archetype itself if you agree.
By default, the web.xml definition throws an error in Eclipse:
*Referenced file contains errors
(http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_2_5.xsd).
*
I had updated my web.xml with this version instead (and it works with
Tomcat 8.5.x as my local server runtime environment).
Java EE 7 Schema (April 30, 2013)
http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"
metadata-complete="true">
The next issue I had was with Tomcat and getting JNDI to initialize. I
created a META-INF/context.xml with the following definition:
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resource name="jdbc/turbine" global="jdbc/turbine"
auth="Container" type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/turbine"
username="db_user" password="db_password"
maxTotal="100" maxIdle="20" minIdle="5" maxWaitMillis="10000"/>
</Context>
And that seems to clear that up so it starts immediately within
Eclipse/Tomcat configuration. Otherwise, out of the box, the user gets
the following exception:
Horrible Exception: org.apache.turbine.services.InstantiationException: Service AvalonComponentService failed to initialize
If you agree with these changes, I am happy to commit them to the
Turbine webapp archetype.
--
Jeffery
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-***@turbine.apache.org
For additional commands, e-mail: dev-***@turbine.apache.org