[jboss-jira] [JBoss JIRA] Commented: (JBAS-5178) NullPointerException in VFSUtils.readManifest during WAR deployment
Saleem Ansari (JIRA)
jira-events at lists.jboss.org
Sat Jul 5 07:42:58 EDT 2008
[ http://jira.jboss.com/jira/browse/JBAS-5178?page=comments#action_12420017 ]
Saleem Ansari commented on JBAS-5178:
-------------------------------------
I am facing a similar problem.
System specs:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
Fedora release 8 (Werewolf) Linux kernel 2.6.23.1-42.fc8
I am using two versions of JBoss server : 4.2.2GA and 5.0.0 CR2, specifically these two:
1. Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
2. Release ID: JBoss [Morpheus] 5.0.0.CR2 (build: SVNTag=JBoss_5_0_0_CR2 date=200807051412)
The hello world application I am using is from : http://java.sun.com/javaee/5/docs/tutorial/doc/bnadu.html
I copied this hello world app ( hello1.war file ) to server/default/deploy folder for each server's instance.
One thing that I noticed while doing this is that this application gets deployed in 4.2.2GA but not on 5.0.0 CR2.
This application also gets deployed in Glassfish server.
The WEB-INF folder contains the only file named sun-web.xml . So, maybe this is the source of problem i.e. being sun server specific?
Or is it a bug in JBoss 5.0.0CR2 , maybe in jboss-vfs ?
jobss-vfs jar file version is ( from MANIFEST.MF file ):
Specification-Title: JBoss VFS
Specification-Version: 2.0.0.Beta20
Specification-Vendor: JBoss, A division of Red Hat, Inc
Implementation-Title: JBoss VFS
Implementation-Version: 2.0.0.Beta20
Thanks
> NullPointerException in VFSUtils.readManifest during WAR deployment
> -------------------------------------------------------------------
>
> Key: JBAS-5178
> URL: http://jira.jboss.com/jira/browse/JBAS-5178
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Deployers
> Affects Versions: JBossAS-5.0.0.Beta3
> Environment: * Java VM: Java HotSpot(TM) Server VM 1.6.0_03-b05,Sun Microsystems Inc.
> * OS-System: Windows XP 5.1,x86
> Reporter: David Bernstein
> Assigned To: Ales Justin
> Attachments: hello1.war, orgmobilist.war
>
>
> I have a very simple WAR file that I'm trying to deploy on JBoss 5.0.0.Beta3.
> I'm using:
> * Java VM: Java HotSpot(TM) Server VM 1.6.0_03-b05,Sun Microsystems Inc.
> * OS-System: Windows XP 5.1,x86
> I am using the -Dsun.lang.ClassLoader.allowArraySyntax=true option for the JVM for Java 6 with JBoss 5 as described in JBAS-4491.
> Intermittently, when I deploy the WAR file, I get a NullPointerException in org.jboss.virtual.VFSUtils.readManifest():
> >>>
> 2008-01-24 18:48:53,624 DEBUG [org.jboss.deployers.plugins.main.MainDeployerImpl] Add deployment: vfsfile:/C:/java/jboss/jboss-5.0.0.Beta3/server/orgmob/deploy/orgmobilist.war
> 2008-01-24 18:48:53,624 DEBUG [org.jboss.deployers.plugins.main.MainDeployerImpl] Removing previous deployment: vfsfile:/C:/java/jboss/jboss-5.0.0.Beta3/server/orgmob/deploy/orgmobilist.war
> 2008-01-24 18:48:53,624 DEBUG [org.jboss.deployers.plugins.main.MainDeployerImpl] Scheduling undeployment: vfsfile:/C:/java/jboss/jboss-5.0.0.Beta3/server/orgmob/deploy/orgmobilist.war parent=null
> 2008-01-24 18:48:53,624 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Scan failed
> org.jboss.deployers.spi.DeploymentException: Error populating deployment vfsfile:/C:/java/jboss/jboss-5.0.0.Beta3/server/orgmob/deploy/orgmobilist.war
> at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
> at org.jboss.deployers.structure.spi.helpers.AbstractStructureBuilder.populateContext(AbstractStructureBuilder.java:77)
> at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:89)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:743)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:280)
> at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:237)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:270)
> at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NullPointerException
> at org.jboss.virtual.VFSUtils.readManifest(VFSUtils.java:208)
> at org.jboss.virtual.VFSUtils.getManifest(VFSUtils.java:187)
> at org.jboss.virtual.VFSUtils.addManifestLocations(VFSUtils.java:106)
> at org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder.applyContextInfo(VFSStructureBuilder.java:155)
> at org.jboss.deployers.structure.spi.helpers.AbstractStructureBuilder.populateContext(AbstractStructureBuilder.java:73)
> ... 15 more
> <<<
>
> Sometimes it works without complaint. I haven't been able to figure out exactly which conditions tickle this. I had suspicions that it might have to do with whether it was a hot deploy or on the existence of the properties file, but I wasn't able to prove it consistently. It did seem that if there was previously no properties file and I then did a hot deploy with a properties file, then I got the exception. I was able to deploy successfully to 4.2.2.GA. The structure of the WAR is:
> >>>
> META-INF/
> META-INF/MANIFEST.MF
> WEB-INF/
> WEB-INF/web.xml
> WEB-INF/classes/
> WEB-INF/classes/com/
> WEB-INF/classes/com/orgmob/
> WEB-INF/classes/com/orgmob/orgmobilist/
> WEB-INF/classes/com/orgmob/orgmobilist/server/
> WEB-INF/classes/com/orgmob/orgmobilist/orgmob.properties
> WEB-INF/classes/com/orgmob/orgmobilist/server/FooServlet.class
> <<<
> The manifest is:
> >>>
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.7.0
> Created-By: 1.6.0_03-b05 (Sun Microsystems Inc.)
> <<<
> The web.xml file is:
> >>>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> version="2.5">
>
> <servlet>
> <servlet-name>foo</servlet-name>
> <servlet-class>com.orgmob.orgmobilist.server.FooServlet</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>foo</servlet-name>
> <url-pattern>/foo</url-pattern>
> </servlet-mapping>
> </web-app>
> <<<
> The servlet code is:
> >>>
> package com.orgmob.orgmobilist.server;
> import java.io.IOException;
> import java.io.PrintWriter;
> import javax.servlet.ServletException;
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
> import javax.servlet.http.HttpServletResponse;
> public class FooServlet extends HttpServlet {
>
> private static final long serialVersionUID = 1L;
>
> private void doGetPost(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
> String userid = req.getParameter("userid");
> resp.setContentType("text/html");
> resp.setCharacterEncoding("UTF-8");
> PrintWriter pw = resp.getWriter();
> pw.println("<html>");
> pw.println(" <head>");
> pw.println(" <title>foo servlet</title>");
> pw.println(" </head>");
> pw.println(" <body>");
> pw.println(" <p>userid: ");
> pw.println(userid);
> pw.println(" </p>");
> pw.println(" <p>");
> pw.println(" </p>");
> pw.println(" </body>");
> pw.println("</html>");
> pw.flush();
> pw.close();
> resp.setStatus(HttpServletResponse.SC_OK);
> }
>
> @Override
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
> doGetPost(req,resp);
> }
> @Override
> public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
> doGetPost(req,resp);
> }
> }
> <<<
> The properties file is:
> >>>
> # orgmob
> # Copyright 2007-2008 David B. Bernstein
> # major.minor.patch versioning scheme for orgmob
> orgmob.major.version=0
> orgmob.minor.version=0
> orgmob.patch.version=0
> #
> orgmob.copyright.year=2007-2008
> <<<
> Apologies in advance if there's an obvious problem, a missed bug, or a missed post. I hope I've captured all the relevant information.
> Thanks.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list