You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Zahid Rahman <za...@gmail.com> on 2020/08/18 17:27:03 UTC
latest production.
Hi,
Could you please give me links to latest production software which works
without any errors.
*I followed the steps in the tomee-master/examples/struts/READM.txt
outlined.*
*Step 4.*
* mvn clean install war:exploded tomcat:deploy*
*I got two errors.*
INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 9.756 s
[INFO] Finished at: 2020-08-18T18:09:38+01:00
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project
struts: Cannot invoke Tomcat manager: Server returned HTTP response code:
405 for URL: http://localhost:8080/manager/deploy?path=%2Fstruts&war= ->
[Help 1]
*I resolved the first error by deploying struts.war using Tomcat Manager
App.*
*Step 7. Then when I tried to add user I got this error.*
*Cannot instantiate class:
org.apache.openejb.core.LocalInitialContextFactory*
*Struts README.txt*
A simple web-app showing how to use maven, struts2, site-mesh,
mysql/hsqldb,openejb with tomcat
This application allows you to insert, find and findAll users. It uses one
@Entity named User
and uses a @Local @Stateless session bean to insert, find and find all
User's.
To run this example, perform the following steps:-
1. Install latest Tomcat
2. Deploy OpenEJB WAR in tomcat
3. Open <<tomcat-install>>/conf/tomcat-users.xml and add the following user
<user username="admin" password="" roles="manager"/>
4. Run the following command while in the struts directory
mvn clean install war:exploded tomcat:deploy
5. The above will deploy this web application to tomcat.
6. To test the application, open a web browser and navigate to
http://localhost:8080/struts
7. Use the links on the homepage to add, find and list users
By default this example uses hsqldb database whose data should be stored
under
<<tomcat-install>>/data
If you want to use mysql, then open persistence.xml (its under
src/main/resources/META-INF) and
comment out the <persistence-unit> section for hsqldb and uncomment the one
for mysql. Read the
comments in persistence.xml for further instructions
Once you make the change, you would need to redeploy the application. Run
the following command
mvn clean install war:exploded tomcat:redeploy
https://www.backbutton.co.uk/ <http://Backbutton.co.uk>
¯\_(ツ)_/¯
♡۶Java♡۶RMI ♡۶
<http://www.backbutton.co.uk>