I would like to use glassfish embedded with plain an undeployed web
project for testing etc. (i.e. no war file).
However, I am getting UnsupportedOperationException during deployment
if I use ScatteredArchive in Glassfish 3.0 embedded (static shell
file) rather then a packed *.war file (works fine if I use a war file
though):
This is the exception I get during deployment:
java.lang.UnsupportedOperationException: entries(String)
at org.glassfish.api.embedded.ScatteredArchive.entries(ScatteredArchive.java:424)
at org.glassfish.persistence.jpa.JPASniffer.scanForPURootsInLibDir(JPASniffer.java:97)
at org.glassfish.persistence.jpa.JPASniffer.handles(JPASniffer.java:84)
at com.sun.enterprise.v3.server.SnifferManagerImpl.getSniffers(SnifferManagerImpl.java:156)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:200)
at cmd.Main.main(Main.java:40)
And this is the code for generating the ScatteredArchive:
private static ReadableArchive explodedWar(String name, Server server,
File topDir) throws MalformedURLException
{
ScatteredArchive.Builder war = new ScatteredArchive.Builder( name,
(File)null);
war.resources(new File(topDir, "build/classes" ));
war.resources(new File(topDir, "WebContent" ));
war.addClassPath( new File(topDir, "build/classes" ).toURI().toURL() );
return war.buildWar();
}
Listening the archive for debuggin it shows:
War content:
WEB-INF/classes/servlet/TestServlet.class
index.jsp
META-INF/MANIFEST.MF
WEB-INF/web.xml
/Morten
[Message sent by forum member 'mmc41']
http://forums.java.net/jive/thread.jspa?messageID=395516