Jump to content

Deploying under Glassfish / SJAS 9.0


mzukowski

Recommended Posts

I'm trying to deploy the jasperserver.war under Glassfish (a.k.a. Sun's JAS 9.0) but I'm getting a whole lot of errors during deployment.

 

First it complained that the web.xml descriptor had invalid data, and indeed it looks like the web.xml that ships with 1.0.0 violates the web-app 2.4 schema (there's <description> and <display-name> tags where there shouldn't be).

 

I got all that cleaned up, but now it's complaining about the taglib tags being invalid:

 

Code:

Deploying application in domain failed; Error loading
deployment descriptors for module [jasperserver] Line
297 Column 13 -- Deployment descriptor file
WEB-INF/web.xml in archive [jasperserver].
cvc-complex-type.2.4.a: Invalid content was found
starting with element 'taglib'. One of
'{"http://java.sun.com/xml/ns/j2ee":description,
"http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon,
"http://java.sun.com/xml/ns/j2ee":distributable,
"http://java.sun.com/xml/ns/j2ee":context-param,
"http://java.sun.com/xml/ns/j2ee":filter,
"http://java.sun.com/xml/ns/j2ee":filter-mapping,
"http://java.sun.com/xml/ns/j2ee":listener,
"http://java.sun.com/xml/ns/j2ee":«»servlet,
"http://java.sun.com/xml/ns/j2ee":«»servlet-mapping,
"http://java.sun.com/xml/ns/j2ee":«»session-config,
"http://java.sun.com/xml/ns/j2ee":mime-mapping,
"http://java.sun.com/xml/ns/j2ee":welcome-file-list,
"http://java.sun.com/xml/ns/j2ee":error-page,
"http://java.sun.com/xml/ns/j2ee":jsp-config,
"http://java.sun.com/xml/ns/j2ee":«»security-constraint,
"http://java.sun.com/xml/ns/j2ee":login-config,
"http://java.sun.com/xml/ns/j2ee":«»security-role,
"http://java.sun.com/xml/ns/j2ee":env-entry,
"http://java.sun.com/xml/ns/j2ee":ejb-ref,
"http://java.sun.com/xml/ns/j2ee":ejb-local-ref,
"http://java.sun.com/xml/ns/j2ee":«»service-ref,
"http://java.sun.com/xml/ns/j2ee":resource-ref,
"http://java.sun.com/xml/ns/j2ee":resource-env-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination,
"http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}'
is expected. Error loading deployment descriptors for
module [jasperserver] Line 297 Column 13 -- Deployment
descriptor file WEB-INF/web.xml in archive
[jasperserver]. cvc-complex-type.2.4.a: Invalid
content was found starting with element 'taglib'. One
of '{"http://java.sun.com/xml/ns/j2ee":description,
"http://java.sun.com/xml/ns/j2ee":display-name,
"http://java.sun.com/xml/ns/j2ee":icon,
"http://java.sun.com/xml/ns/j2ee":distributable,
"http://java.sun.com/xml/ns/j2ee":context-param,
"http://java.sun.com/xml/ns/j2ee":filter,
"http://java.sun.com/xml/ns/j2ee":filter-mapping,
"http://java.sun.com/xml/ns/j2ee":listener,
"http://java.sun.com/xml/ns/j2ee":«»servlet,
"http://java.sun.com/xml/ns/j2ee":«»servlet-mapping,
"http://java.sun.com/xml/ns/j2ee":«»session-config,
"http://java.sun.com/xml/ns/j2ee":mime-mapping,
"http://java.sun.com/xml/ns/j2ee":welcome-file-list,
"http://java.sun.com/xml/ns/j2ee":error-page,
"http://java.sun.com/xml/ns/j2ee":jsp-config,
"http://java.sun.com/xml/ns/j2ee":«»security-constraint,
"http://java.sun.com/xml/ns/j2ee":login-config,
"http://java.sun.com/xml/ns/j2ee":«»security-role,
"http://java.sun.com/xml/ns/j2ee":env-entry,
"http://java.sun.com/xml/ns/j2ee":ejb-ref,
"http://java.sun.com/xml/ns/j2ee":ejb-local-ref,
"http://java.sun.com/xml/ns/j2ee":«»service-ref,
"http://java.sun.com/xml/ns/j2ee":resource-ref,
"http://java.sun.com/xml/ns/j2ee":resource-env-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination-ref,
"http://java.sun.com/xml/ns/j2ee":message-destination,
"http://java.sun.com/xml/ns/j2ee":locale-encoding-mapping-list}'
is expected.

 

This is a bit out of my league, so I'm wondering if someone could take a look at the web.xml file and see what's wrong with it. I suspect that it was written to work with Tomcat, which is perhaps more lax with parsing a non-web-app-2.4-compliant descriptor...

Post edited by: mzukowski, at: 2006/09/05 21:45

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 months later...

Hello. After searching the forums, I've not been able to find a solution to this. I'm attempting to deploy on Glassfish b42 / SJAS 9.0_01 using a (slightly modified for db) web.xml that was included in jasperintelligence-1.1.0-bin.zip (2006-09-22 15:34).

 

I experienced the same difficutly with <taglib> in the web.xml - Glassfish complained about the unexpected taglib element after which I looked at http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd and noticed that it isn't in the schema.

 

Am I missing something obvious?

 

This web.xml looks just like the one in the download, but I'll post anyway...

 

Code:
<?xml version="1.0" encoding="UTF-8"?>
<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">

<display-name>JasperServer UI application</display-name>

<context-param>
<param-name>webAppRootKey</param-name>
<param-value>jasperserver.root</param-value>
</context-param>

<!-- listener to load the root application context -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>

<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>

<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>

<!-- resources initializer -->
<listener>
<listener-class>com.tonbeller.tbutils.res.ResourcesFactoryContextListener</listener-class>
</listener>

<!-- optional? now in JPivot by default -->
<context-param>
<param-name>contextFactory</param-name>
<param-value>com.tonbeller.wcf.controller.RequestContextFactoryImpl</param-value>
</context-param>

<filter>
<filter-name>securityFilter</filter-name>
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
</filter>

<!-- Start of SiteMesh filter config -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>securityFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

<!-- Filter to help parse the file name and extension of uplaoded files-->
<filter>
<filter-name>multiPartHelperFilter</filter-name>
<filter-class>com.jaspersoft.jasperserver.war.common.UploadMultipartFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>multiPartHelperFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>JPivotController</filter-name>
<filter-class>com.tonbeller.wcf.controller.RequestFilter</filter-class>

<!-- to avoid double clicking problem in the OLAP view list
<init-param>
<param-name>indexJSP</param-name>
<param-value>/olap/viewOlap.html</param-value>
<description>forward to this page if session is new</description>
</init-param>
-->
<init-param>
<param-name>errorJSP</param-name>
<param-value>/olap/error.html</param-value>
<!-- <description>URI of error page</description> -->
</init-param>
<init-param>
<param-name>busyJSP</param-name>
<param-value>/olap/busy.html</param-value>
<!--<description>This page is displayed if a the user clicks
on a query before the previous query has finished</description>-->
</init-param>
<!--
<init-param>
<param-name>forceExtension</param-name>
<param-value>.faces</param-value>
<description>replace .jsp with .faces</description>
</init-param>
-->
</filter>

<filter-mapping>
<filter-name>JPivotController</filter-name>
<url-pattern>/olap/viewOlap.html</url-pattern>
</filter-mapping>

<!--
-->
<!-- dispatcher servlet for the application -->
<servlet>
<servlet-name>jasperserver</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jasperserver</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jasperserver</servlet-name>
<url-pattern>/fileview/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>ImageServlet</servlet-name>
<servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ImageServlet</servlet-name>
<url-pattern>/servlets/image</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>PdfServlet</servlet-name>
<servlet-class>net.sf.jasperreports.j2ee.servlets.PdfServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PdfServlet</servlet-name>
<url-pattern>/servlets/pdf</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>XlsServlet</servlet-name>
<!--
<servlet-class>net.sf.jasperreports.j2ee.servlets.XlsServlet</servlet-class>
-->
<servlet-class>net.sf.jasperreports.j2ee.servlets.JExcelApiServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>XlsServlet</servlet-name>
<url-pattern>/servlets/xls</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>RtfServlet</servlet-name>
<servlet-class>net.sf.jasperreports.j2ee.servlets.RtfServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>RtfServlet</servlet-name>
<url-pattern>/servlets/rtf</url-pattern>
</servlet-mapping>

<!-- MondrianXmlaServlet replaced with JasperXmlaServlet -->
<!--
<servlet>
<servlet-name>MondrianXmlaServlet</servlet-name>
<servlet-class>mondrian.xmla.impl.DefaultXmlaServlet</servlet-class>
<init-param>
<param-name>DataSourcesConfig</param-name>
<param-value>datasources.xml</param-value>
</init-param>
</servlet>
-->

<!-- XML for Analysis Servlet -->
<servlet>
<servlet-name>JasperXmlaServlet</servlet-name>
<servlet-class>com.jaspersoft.jasperserver.war.xmla.XmlaServletImpl</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>JasperXmlaServlet</servlet-name>
<url-pattern>/xmla</url-pattern>
</servlet-mapping>

<!-- jfreechart provided servlet -->
<servlet>
<servlet-name>DisplayChart</servlet-name>
<servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class>
</servlet>

<!-- jfreechart provided servlet -->
<servlet>
<servlet-name>GetChart</servlet-name>
<!-- miles bacon 27 November 2006 -commented out, unexpected in the DTD
<display-name>GetChart</display-name>
<description>Serves up chart images for OLAP printing to PDF and Excel.</description>
-->
<servlet-class>com.jaspersoft.jasperserver.war.OlapGetChart</servlet-class>
</servlet>
<servlet>
<servlet-name>Print</servlet-name>
<!-- miles bacon 27 November 2006 -commented out, unexpected in the DTD
<display-name>Print</display-name>
<description>Generate PDF and Excel files for download based on OLAP model.</description>
-->
<servlet-class>com.jaspersoft.jasperserver.war.OlapPrint</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>DisplayChart</servlet-name>
<url-pattern>/DisplayChart</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Print</servlet-name>
<url-pattern>/olap/Print</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetChart</servlet-name>
<url-pattern>/GetChart</url-pattern>
</servlet-mapping>

<!-- web services support -->

<!-- webService Axis2 support START -->
<servlet>
<display-name>Apache-Axis2 Servlet</display-name>
<servlet-name>Axis2Servlet</servlet-name>
<servlet-class>com.jaspersoft.jasperserver.ws.axis2.Axis2SpringServlet</servlet-class>
<init-param>
<param-name>repository</param-name>
<param-value>/WEB-INF</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Axis2Servlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<!-- webService Axis2 support END -->



<session-config>
<!-- Default to 20 minute session timeouts -->
<session-timeout>20</session-timeout>
</session-config>

<!-- mdb: these taglibs are not in the xsd for web.xml,
they are specified by http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
we'll see if the war will deploy without them in web.xml...
<taglib>
<taglib-uri>/WEB-INF/jasperserver.tld</taglib-uri>
<taglib-location>/WEB-INF/jasperserver.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/spring</taglib-uri>
<taglib-location>/WEB-INF/spring.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://www.tonbeller.com/wcf</taglib-uri>
<taglib-location>/WEB-INF/wcf/wcf-tags.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>http://www.tonbeller.com/jpivot</taglib-uri>
<taglib-location>/WEB-INF/jpivot/jpivot-tags.tld</taglib-location>
</taglib>
-->
<resource-ref>
<description>JasperServer Metadata repository</description>
<res-ref-name>jdbc/jasperserver</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<resource-ref>
<description>SugarCRM example database</description>
<res-ref-name>jdbc/sugarcrm</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<resource-ref>
<description>Foodmart database</description>
<res-ref-name>jdbc/foodmart</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<welcome-file-list>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>

<!-- currently the W3C havent settled on a media type for WSDL;
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
for now we go with the basic 'it's XML' response -->
<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>


<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>

</web-app>

Link to comment
Share on other sites

I should note that my impetus for posting on this topic was because I thought that the errors in the descriptor might be among the cause(s) of my failure to get JasperIntelligence running on Glassfish.

 

I've got the war deployed, but the first failure logged in jasperserver.log is:

Code:

01:28:28,500 ERROR ContextLoader,main:119 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler' defined in ServletContext resource [/WEB-INF/applicationContext-report-scheduling.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery.
org.quartz.SchedulerConfigException: Failure occured during job recovery. [see nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: No database selected [see nested exception: java.sql.SQLException: No database selected]]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.initialize(JobStoreSupport.java:493)

 

The error (Error creating bean with name 'quartzScheduler') is appearing elsewhere, but I can't discern the relationship between the other's problems and my own.

 

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=10&id=18613#18613

 

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=10&id=14208#14208

 

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=10&id=14168#14168

 

 

My server is a playground for a few of us here so it has been up a long time; I noticed that restarting the mySQL process might help so I'll try that - in the meantime, can anyone help me to know if SJAS's difficulty in processing the 'unexpected' taglib elements in the web.xml included in my download is related to this error?

 

Signed,

Miles Desparately-wanting-to-build-a-business-case-for-an-alternative-to -our-expensive-per-user-BOXI-client-license-and-have-always-loved-JasperReports

:dry:

Link to comment
Share on other sites

We develop against Tomcat 5.5, which is obviously looser in it's parsing of the web.xml. Haven't heard of people playing with JI on Glassfish before now.

 

It looks like a purely Quartz issue. The taglibs are not related. Is the JNDI connection to the metadata repository defined OK?

 

 

 

Sherman

JasperSoft

Link to comment
Share on other sites

  • 6 months later...

Were you ever able to get JasperServer deployed to Glassfish? I'm experiencing the same problems concerning the web.xml file. If so, what did you do? I'm new to JasperServer and am trying this out for the first time using version 1.2.1.

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...