I can start an embedded Glassfish using glassfish-embedded-all-3.0.jar, but I cannot deploy a simple war file containing a JSP page.
my code:
public static void main(String[] args) throws IOException, LifecycleException {
Server.Builder builder = new Server.Builder("test");
server = builder.build();
ContainerBuilder containerBuilder = server
.createConfig(ContainerBuilder.Type.web);
server.addContainer(containerBuilder);
containerBuilder.create(server);
server.createPort(9999); // Starts grizzly on the given port
File war = new File("hello.war");
System.out.println(war.getAbsolutePath());
DeployCommandParameters dcp = new DeployCommandParameters();
dcp.contextroot = "test";
dcp.name = "test";
server.getDeployer().deploy(war, dcp);
}
log messages:
INFO: Created HTTP listener embedded-listener on port 9999
28.01.2010 14:00:49 com.sun.enterprise.web.WebContainer configureHttpServiceProperties
WARNING: pewebcontainer.invalid_http_service_property
28.01.2010 14:00:49 com.sun.enterprise.web.WebContainer createHosts
INFO: Created virtual server server
28.01.2010 14:00:50 com.sun.enterprise.web.WebContainer loadSystemDefaultWebModules
INFO: Virtual server server loaded system default web module
28.01.2010 14:07:08 org.apache.catalina.core.StandardContext callServletContainerInitializers
SEVERE: PWC1420: Error invoking ServletContainerInitializer org.apache.jasper.runtime.TldScanner
org.apache.jasper.JasperException: PWC6177: XML parsing error on file file:.m2/repository/org/glassfish/extras/glassfish-embedded-all/3.0/glassfish-embedded-all-3.0.jar
It shouldn't be difficult to deploy a file, but my Glassfish isn't running as expected. Am i doing something wrong?
--Rafael
[Message sent by forum member 'wam23' (wampfler_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=383467