aspose file tools*
The moose likes Tomcat and the fly likes jpa2web with tomcat problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "jpa2web with tomcat problem" Watch "jpa2web with tomcat problem" New topic
Author

jpa2web with tomcat problem

Jpa Lover
Greenhorn

Joined: Nov 20, 2010
Posts: 1
Hi everybody. I'm trying to make jpa2web ( http://jpa2web.sourceforge.net/ ) work with tomcat 7.04 but I'm having some issues.
I have followed the tutorial here ( http://www.ibm.com/developerworks/web/library/wa-aj-jpa2web/ ) step by step and i ended up having a war folder in my c:\tomcat\webapps folder.

However, when I try to access it, i get an 404 error : The requested resource () is not available.

I tried to start it using Tomcat manager but after i pressed start it gave me the following error:

FAIL - Application at context path /msmihai.war could not be started

In the tomcat error log i found this:

INFO: Deploying web application directory msmihai.war
Nov 21, 2010 12:21:54 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

I have no idea what is wrong with this, as I configured everything EXACTLY as the tutorial said.

My msmihai.war folder has a lot of zul files in it ( probably because jpa2web uses ZK).

The web.xml file :


<?xml version="1.0" encoding="UTF-8"?>

<!-- web.xml
Purpose:

Description:

History:
Wed Dec 29 12:13:00 2004, Created by tomyeh@potix.com

Copyright (C) 2004 Potix Corporation. All Rights Reserved.
-->

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<description>
<![CDATA[My ZK Application]]>
</description>
<display-name>eCelerus</display-name>
<!--
<icon>
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
-->

<!-- //// -->
<!-- ZK -->
<listener>
<description>
Used to cleanup when a session is destroyed
</description>
<display-name>ZK Session Cleaner</display-name>
<listener-class>
org.zkoss.zk.ui.http.HttpSessionListener
</listener-class>
</listener>


<listener>
<listener-class>com.ecelerus.generator.persistence.HibernateListener</listener-class>
</listener>

<servlet>
<description>ZK loader for ZUML pages</description>
<servlet-name>zkLoader</servlet-name>
<servlet-class>
org.zkoss.zk.ui.http.DHtmlLayoutServlet
</servlet-class>
<!-- Must. Specifies URI of the update engine (DHtmlUpdateServlet).
It must be the same as <url-pattern> for the update engine.
-->
<init-param>
<param-name>update-uri</param-name>
<param-value>/zkau</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zul</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>zkLoader</servlet-name>
<url-pattern>*.zhtml</url-pattern>
</servlet-mapping>
<servlet>
<description>The asynchronous update engine for ZK</description>
<servlet-name>auEngine</servlet-name>
<servlet-class>
org.zkoss.zk.au.http.DHtmlUpdateServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>auEngine</servlet-name>
<url-pattern>/zkau/*</url-pattern>
</servlet-mapping>
<!-- //// -->

<!-- /////////// -->
<!-- Miscellaneous -->
<session-config>
<session-timeout>120</session-timeout>
</session-config>

<filter>
<filter-name>BeanShellFilter</filter-name>
<filter-class>com.ecelerus.generator.ui.BeanShellFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>BeanShellFilter</filter-name>
<url-pattern>*.bs</url-pattern>
</filter-mapping>



<!-- MIME mapping -->
<mime-mapping>
<extension>doc</extension>
<mime-type>application/vnd.ms-word</mime-type>
</mime-mapping>
<mime-mapping>
<extension>gif</extension>
<mime-type>image/gif</mime-type>
</mime-mapping>
<mime-mapping>
<extension>htm</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpeg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jpg</extension>
<mime-type>image/jpeg</mime-type>
</mime-mapping>
<mime-mapping>
<extension>js</extension>
<mime-type>application/x-javascript</mime-type>
</mime-mapping>
<mime-mapping>
<extension>pdf</extension>
<mime-type>application/pdf</mime-type>
</mime-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xml</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>xul</extension>
<mime-type>application/vnd.mozilla.xul-xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zhtml</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/x-zip</mime-type>
</mime-mapping>
<mime-mapping>
<extension>zul</extension>
<mime-type>text/html</mime-type>
</mime-mapping>

<welcome-file-list>
<welcome-file>index.zul</welcome-file>
<welcome-file>index.zhtml</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>

</web-app>


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jpa2web with tomcat problem