Forums

Home » Liferay Portal » English » 2. Using Liferay » General »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
j p d
[RESOLVED] newbie: Deploy to Glassfish error: element type "web-app" mu
June 18, 2008 4:06 AM
Answer

j p d

Rank: New Member

Posts: 15

Join Date: May 30, 2008

Recent Posts

Hello Forum...

I can deploy a basic jst 168 portlet to the tomcat-liferay bundle but it fails on glassfish (9.1 update 1 with mySQL, with LR deployed as a war). The server.log reports:

Error loading deployment descriptors for module [justatest_03] Line 27 Column 11 --
Deployment descriptor file WEB-INF/web.xml in archive [justatest_03].
The content of element type "web-app" must match
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,
servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,
resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".


I've seen an earlier report of this where the > spotted by _raju which also seems to be the problem in my case. However when I remove that > and update the .war with the new web.xml, the file redeploys still with the same error. I've confirmed that the > no longer exists in the newly deployed .war.

Has anyone had any similar experience?

thanks
/j-p.
Raju Uppalapati
RE: newbie: Deploy to Glassfish error: element type "web-app"
June 17, 2008 7:29 AM
Answer

Raju Uppalapati

Rank: Junior Member

Posts: 66

Join Date: October 24, 2007

Recent Posts

If its a small portlet WAR file can you please attach it to this email thread.
If the file is large can you please attach the web.xml files inside the WAR file, before and after it was hotdeployed into Liferay.

Also what version of Liferay are you using.

_raju
j p d
RE: newbie: Deploy to Glassfish error: element type "web-app"
June 17, 2008 9:03 AM
Answer

j p d

Rank: New Member

Posts: 15

Join Date: May 30, 2008

Recent Posts

Thanks again Raju...

Here's the file, I hope I've attached it alright (I just appended the .zip). LR version is 5.0.1RC

Kind regards
/j-p.
Attachments: PortletTest.war.zip (2.7k)
Raju Uppalapati
RE: newbie: Deploy to Glassfish error: element type "web-app"
June 17, 2008 11:56 AM
Answer

Raju Uppalapati

Rank: Junior Member

Posts: 66

Join Date: October 24, 2007

Recent Posts

The content of your Portlets WAR file web.xml is not well formed. This is the root cause of your deployment failure.
The following is your web.xml content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet-name>JustatestPortlet</servlet-name>
<display-name>A Simple Portlet (JSR 168) Test</display-name>
<servlet-class>com.justatest.portlet.JustatestPortlet</servlet-class>

</web-app>

In your development env. Take the red content out the web.xml and deploy it and it should work using the old workaround

_raju
j p d
[RESOLVED] RE: newbie: Deploy to Glassfish error: element type "web-app"
June 18, 2008 4:05 AM
Answer

j p d

Rank: New Member

Posts: 15

Join Date: May 30, 2008

Recent Posts

Bravo. I emptied the web.xml as you suggested and it works fine. The earlier mentioned "&gt;" bug doesn't seem to have occurred either!

Many thanks Raju.

regards
/j-p.