glassfish_at_javadesktop.org wrote:
> Hello,
>
> I was able to deploy my application using my embedded glassfish.
>
> Originally I had nearly the same exception like Peter:
> "org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: javax.servlet.ServletException: com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for ..."
>
> I assume that the message might be misleading and hiding the real cause. So far I don't know what went wrong. In my case all I have done was explicitely setting the [b]instanceRoot[/b] attribute for the embedded file system.
>
It should be possible to run applications in embedded mode, without
pointing to a regular glassfish install. If your application runs only
if you point to a regular install, then it is possible that something
is picked up from the filesystem, when it should be picked up from the
embedded jar. A reproducible case would help debug this further.
Thanks
> <code-snippet>
> EmbeddedFileSystem.Builder efsb = new EmbeddedFileSystem.Builder();
> if (installRoot != null) efsb.installRoot(new File(installRoot), true);
> if (instanceRoot != null) {
> // this property is normally used as a token in a regular glassfish
> // domain.xml
> System.setProperty("com.sun.aas.instanceRootURI", "file:" + instanceRoot);
> efsb.instanceRoot(new File(instanceRoot));
> }
>
> if (configFile != null) efsb.configurationFile(new File(configFile));
> if (autoDelete != null) efsb.autoDelete(autoDelete.booleanValue());
>
> return efsb.build();
> <code-snippet>
>
> During my first try the instanceRoot was "null". When setting a real path on my file system everything worked like a charm.
>
> For your interest: my application is a war file with a JAX-WS web service inside using spring application context with AOP. No problems at all.
>
> Thanks,
> Klaus
> [Message sent by forum member 'klausstake' (klaus.stake_at_web.de)]
>
> http://forums.java.net/jive/thread.jspa?messageID=384475
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>