how to deploy war file on weblogic 12c - deployment

few days ago my boss told to deploy our project war file on weblogic12c and I did it but weblogic gave me this two error and I don't what should I do :
all I see is about these error and next key stop
this is my xml file
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="3.0" id="WebApp_ID" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<display-name>JournalDev-PrimefacesWebApplication</display-name>
-<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
-<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
-<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
-<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>ultima-#{guestPreferences.theme}</param-value>
</context-param>
-<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
-<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/primefaces-ultima.taglib.xml</param-value>
</context-param>
-<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
-<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
-<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
-<context-param>
<param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
<param-value>false</param-value>
</context-param>
-<context-param>
<param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
<param-value>0</param-value>
</context-param>
-<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>ApplicationResources</param-value>
</context-param>
-<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-beans.xml,/WEB-INF/faces-navigations.xml</param-value>
</context-param>
-<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/config/applicationContext-*.xml,**/applicationContext-*.xml </param-value>
</context-param>
-<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
<param-value>en</param-value>
</context-param>
-<context-param>
<param-name>datasource</param-name>
<param-value>news_DS</param-value>
</context-param>
-<welcome-file-list>
<welcome-file>user/body.xhtml</welcome-file>
</welcome-file-list>
-<session-config>
<session-timeout>30</session-timeout>
</session-config>
-<filter>
<filter-name>requestContextFilter</filter-name>
<filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
</filter>
-<filter-mapping>
<filter-name>requestContextFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
-<filter-mapping>
<filter-name>requestContextFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
-<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
-<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
-<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
-<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
-<filter>
<filter-name>hibernateFilter</filter-name>
<filter-class> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
</filter>
-<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>hibernateFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
-<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
-<init-param>
<description> Set the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
-<init-param>
<description> Set the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB </description>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
-<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
-<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
-<filter>
<filter-name>AccessFilter</filter-name>
<filter-class>org.nspl.access.AccessFilter</filter-class>
</filter>
-<filter-mapping>
<filter-name>AccessFilter</filter-name>
<url-pattern>/user/*</url-pattern>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
-<filter-mapping>
<filter-name>AccessFilter</filter-name>
<url-pattern>/admin/*</url-pattern>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
-<servlet>
<servlet-name>picServlet</servlet-name>
<servlet-class>org.nspl.access.PicServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>picServlet</servlet-name>
<url-pattern>/picServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>Select</servlet-name>
<servlet-class>org.nspl.access.Select</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>Select</servlet-name>
<url-pattern>/Select</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>Index</servlet-name>
<servlet-class>org.nspl.access.Index</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>Index</servlet-name>
<url-pattern>/Index</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>AttachmentServlet</servlet-name>
<servlet-class>org.nspl.access.AttachmentServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>AttachmentServlet</servlet-name>
<url-pattern>/AttachmentServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>picPersonServlet</servlet-name>
<servlet-class>org.nspl.access.PicPersonServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>picPersonServlet</servlet-name>
<url-pattern>/picPersonServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>baseInfoACMServlet</servlet-name>
<servlet-class>org.nspl.access.BaseInfoACMServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>baseInfoACMServlet</servlet-name>
<url-pattern>/baseInfoACMServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>operationServlet</servlet-name>
<servlet-class>org.nspl.access.OperationServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>operationServlet</servlet-name>
<url-pattern>/operationServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>bulletinServlet</servlet-name>
<servlet-class>org.nspl.access.BulletinServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>bulletinServlet</servlet-name>
<url-pattern>/bulletinServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>reportsServlet</servlet-name>
<servlet-class>org.nspl.access.ReportsServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>reportsServlet</servlet-name>
<url-pattern>/reportsServlet</url-pattern>
</servlet-mapping>
-<servlet>
<servlet-name>Kaptcha</servlet-name>
<servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class>
</servlet>
-<servlet-mapping>
<servlet-name>Kaptcha</servlet-name>
<url-pattern>/kaptcha.jpg</url-pattern>
</servlet-mapping>
-<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
-<listener>
<listener-class>org.nspl.access.SessionListener</listener-class>
</listener>
-<listener>
<listener-class> org.springframework.web.util.IntrospectorCleanupListener </listener-class>
</listener>
-<listener>
<listener-class> org.springframework.web.context.request.RequestContextListener </listener-class>
</listener>
-<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
-<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
-<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
-<filter>
<filter-name>Character Encoding Filter</filter-name>
<filter-class>org.primefaces.ultima.filter.CharacterEncodingFilter</filter-class>
</filter>
-<filter-mapping>
<filter-name>Character Encoding Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
-<mime-mapping>
<extension>ttf</extension>
<mime-type>application/font-sfnt</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>woff</extension>
<mime-type>application/font-woff</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>woff2</extension>
<mime-type>application/font-woff2</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>eot?#iefix</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg#exosemibold</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg#exobolditalic</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg#exomedium</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg#exoregular</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
-<mime-mapping>
<extension>svg#fontawesomeregular</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
</web-app>
and my admin server log : https://drive.google.com/open?id=0B4URKdA128Y5WURXT1lnby13blE
I google it and found some solution it's about web.xml file but I don't don't understand what should i do ?

thank you for posting the admin server log. There is a long stack trace error in your server log that states:
Caused by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: **Bean already exists**: "weblogic.j2ee.descriptor.FilterMappingBeanImpl#f5a45ff9(/FilterMappings[[CompoundKey: **hibernateFilter**[CompoundKey: ][CompoundKey: *.xhtml]]])".
This can happen sometimes particularly when you're using WebLogic's autodeploy feature. I've made an assumption here that you're deploying to a single server (Admin Server) in DEVELOPMENT mode using the autodeploy feature.
I would recommend the following:
In the admin console, delete the deployment, even if it is marked FAILED. If you get an error trying to delete it, then see below.
Shutdown all running WebLogic servers
Delete the contents of the auto deploy directory (if you're using autodeploy, which is what it looks like)
Delete the contents of
/home/sadr/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/servers/AdminServer/tmp
If you were unable to delete the deployment via the admin console, you will have to remove the deployment from your domain's config.xml:
/home/sadr/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain/config/config.xml
(make a backup before you edit)
Restart the admin server
Redeploy the WAR file
On a personal note, I'm not a fan of autodeploy unless you're doing the actual development on your own workstation. And even then, you would use JDeveloper to integrate with WebLogic in a local dev environment. If you are working in more of an integration type environment, then I would recommend not using the autodeploy feature - which can be unrealiable at times.

Related

Getting com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes on JBoss EAP 7

My Environment: JBOSS EAP 7, Jersey Rest Service 1.15
Getting com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
web.xml
<display-name>Rest App 2</display-name>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.providers</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.resources</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>jersey-serlvet</servlet-name>
<servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet
</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.test.app.service</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<!-- <load-on-startup>1</load-on-startup> -->
</servlet>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet-mapping>
<servlet-name>jersey-serlvet</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
I tried all the different options, but no success. Any help greatly appreciated.

Viewable route returns 404

When trying to access /Example/Site a 404 no found page will be shown, but the jsp is in webapp/WEB-INF/jsp/. Why is this not working?
<web-app id="WebApp_ID" 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>jmattheis rest app</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>jersey-servlet</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.stackoverflow.jmattheis.rest</param-value>
</init-param>
<init-param>
<param-name>jersey.config.servlet.filter.forwardOn404</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>org.glassfish.jersey.server.mvc.jsp.JspMvcFeature</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.mvc.templateBasePath.jsp</param-name>
<param-value>/WEB-INF/jsp</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.tracing</param-name>
<param-value>ALL</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>jersey-servlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
Here the Resource:
#Component
#Path("Example")
public class Example {
#GET
#Path("/Site")
#Produces(MediaType.TEXT_HTML)
public Response getSite() {
return Response.ok(new Viewable("/test")).build();
}
}
Have a look at the Jersey2 MVC documentation
Jersey web applications that want to use JSP templating support should be registered as Servlet filters rather than Servlets in the application's web.xml. The web.xml-less deployment style introduced in Servlet 3.0 is not supported at the moment for web applications that require use of Jersey MVC templating support.
So you need to change your servlet to an filter to make it work.
It could be that this was not needed in the early versions of jersey 2, but I cannot find the older documentation for that so we'll never know.
Like this:
<web-app id="WebApp_ID" 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>jmattheis rest app</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>jersey-filter</filter-name>
<filter-class>org.glassfish.jersey.servlet.ServletContainer</filter-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.stackoverflow.jmattheis.rest</param-value>
</init-param>
<init-param>
<param-name>jersey.config.servlet.filter.forwardOn404</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>org.glassfish.jersey.server.mvc.jsp.JspMvcFeature</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.mvc.templateBasePath.jsp</param-name>
<param-value>/WEB-INF/jsp</param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.tracing</param-name>
<param-value>ALL</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>jersey-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

REST using several resteasy providers in different war files

In the deployed EAR file there are a couple of WARs which configure rest providers.
file1.war:
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
path1.exception.Mapper1
</param-value>
</context-param>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/rest/path1</url-pattern>
</servlet-mapping>
file2.war:
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
path2.exception.Mapper2
</param-value>
</context-param>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
Now when the /rest/path2 url is used, the path1.exception.Mapper1 is invoked, although only the path2.exception.Mapper2 should be used.
How can I archive it?
I tried to use in web.xml of file1.war:
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/rest/path1/* </param-value>
</context-param>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/rest/path1</url-pattern>
</servlet-mapping>
with no success (when try to access the /rest/path2 url, path1.exception.Mapper1 catched it and worked).
Any ideas?

Form Based authentication in REST Web serivces

I have created the REST web services using dynamic web project in eclipse and running in tomcat 7.
I am able to do basic authentication for the web services. Now I am trying to implement form based authentication.Now, any web service call from the browser shows 404 error instead of showing the login form.
May be , I guess the issue is path of the LoginForm.html. I have created the LoginForm.html directly under webcontent.
My web.xml code is
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>CustomerConnect</display-name>
<security-role>
<role-name>manager</role-name>
</security-role>
<security-constraint>
<web-resource-collection>
<web-resource-name>management pages</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/LoginForm.html</form-login-page>
<form-error-page>/LoginError.html</form-error-page>
</form-login-config>
</login-config>
<!-- <session-config> -->
<!-- <session-timeout> -->
<!-- 1 -->
<!-- </session-timeout> -->
<!-- </session-config> -->
<servlet>
<servlet-name>Jersey REST Service</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.JSPTemplatesBasePath</param-name>
<param-value>/views/</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(images|css|jsp)/.*</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>com.bvbi.customerconnect.middletier</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<context-param>
<description>Location to store uploaded file</description>
<param-name>file-upload</param-name>
<param-value>
/home/bvbi/Desktop/apache-tomcat-7.0.26/webapps/CredoImages/
</param-value>
</context-param>
</web-app>
Your path configuration is correct. Remove * from your <url-pattern> inside the <servlet-mapping>.
<servlet-mapping>
<servlet-name>Jersey REST Service</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Does it make any difference?

Deployment Error for module in GlassFish Server 3.1.2

I found the same question asked previously here but I didn't found the suitable answer. I am designing my web in JSF2.0 with PrimeFaces 3.5 as a JSF component suite. Below is the error coming while automatic deploy is in process-
Below is the error which is coming while restarting the GlassFish Server 3.1.2 (As automatic deploy is not working so i thought of restarting it)-
Below is the error displayed by GlassFish Server 3.1.2 in Eclipse console-
SEVERE: service exception
java.lang.NullPointerExceptionnull at java.lang.String.replace(String.java:2219)null at com.sun.enterprise.v3.common.PropsFileActionReporter.setMessage(PropsFileActionReporter.java:67)null at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:219)null at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)null at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)null at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)null at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)null at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)null at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)null at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)null at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)null at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)null at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)null at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)null at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)null at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)null at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)null at com.sun.grizzly.ContextTask.run(ContextTask.java:71)null at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)null at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)null at java.lang.Thread.run(Thread.java:679)null
My web.xml looks like below-
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="portal" version="3.0">
<display-name>Portal</display-name>
<!-- Change to "Production" when you are ready to deploy -->
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>cupertino</param-value>
</context-param>
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>
<!-- Primefaces file upload -->
<!-- thresholdSize specifies the maximum file size in bytes to keep uploaded
files in memory. If it exceeds this limit, it’ll be temporarily written to
disk. -->
<!-- uploadDirectory is the folder where to keep temporary files that exceed
thresholdSize. -->
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
<init-param>
<param-name>thresholdSize</param-name>
<param-value>51200</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<context-param>
<param-name>uploadDirectory</param-name>
<param-value>/opt/upload/</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
I am using Eclipse Indigo on Ubuntu 10.04.4 LTS.