[weld-dev] weld-examples deployment

Pete Muir pmuir at redhat.com
Mon Jun 7 03:41:30 EDT 2010


On 6 Jun 2010, at 01:20, Marcin Mieszek wrote:

> Hi,
> 
> I am working currently on issue https://jira.jboss.org/browse/WELD-273
> Add GlassFish targets to example POMs
> 
> My solution employs glassfish embedded server called from the maven
> directly. To deploy to jetty it will be enough to call mvn install
> with dedicated profile embedded-glassfish
> 
> Please find below the problems I encountered. As I am starting with
> the project please excuse me if ther are lame :) I am still learning
> how the code is organized and how to use it.
> 
> 1. Add domain.xml file with glassfich configuration. This file will
> contain datasource definition.
> 
> Due to severalproblems I gave up with Derby (sample database used from
> the login example uses table User which is reserved keyword in Derby +
> I found suggestion to switch to HSQL at
> http://docs.jboss.org/seam/2.2.1.CR1/reference/en-US/html/glassfish.html
> )

You are welcome to change the Table name...

> 
> 2.Adding glassfish specific persistence.xml file with
> <jta-data-source> not prefixed with java: (it did not work with
> glassfish).

Yeah, these names are not standard across Java EE IIRC :-(

> 
> 3. I also had following problem with login application:
> 
> 2010-06-06 01:31:00 org.glassfish.api.ActionReport failure
> SEVERE: Exception while loading the app
> org.glassfish.deployment.common.DeploymentException: The bean
> org.jboss.weld.bean-/D:/weld-examples/jsf/login/target/applications/weld-login/-ManagedBean-class
> org.jboss.weld.examples.login.Login declares a passivating scope but
> has non-serializable dependency:
> org.jboss.weld.bean-/D:/weld-examples/jsf/login/target/applications/weld-login/-ManagedBean-class
> org.jboss.weld.examples.login.Credentials
>        at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:183)
>        at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
> ...and marked Credentials application as serializable.

Great :-)

> 
> 4. I tried to retest login example with Jetty but got problem with
> jetty-env.xml file, which was search in wrong location:
> 
> Caused by: org.apache.maven.plugin.MojoExecutionException:
> jetty-env.xml file does not exist at location
> D:\weld-examples\jsf\numberguess\src\main\resources\jetty-env.xml
> 
> I added a parameter to jetty plugin:
>              <jettyEnvXml>${basedir}/src/main/webapp/WEB-INF/jetty-env.xml</jettyEnvXml>



> 
> 5. After that I still got error:
> 2010-06-06 01:52:45.322::INFO:  seeing JVM BUG(s) - cancelling interestOps==0
> 2010-06-06 01:52:45.806::WARN:  /weld-numberguess/home.jsf
> org.jboss.weld.context.ContextNotActiveException: WELD-001303 No
> active contexts for scope type @ConversationScoped
>        at org.jboss.weld.conversation.ConversationImpl.checkConversationActive(ConversationImpl.java:79)
>        at org.jboss.weld.conversation.ConversationImpl.isTransient(ConversationImpl.java:234)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
>        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
>        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
>        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
> 
> ..and did not succeed with jetty deployment.

Mitja, any ideas?

> 
> I will prepare the patch once I have retested all the examples.
> 
> Looking forward to feedback from you,
> 
> Marcin
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list