glassfish
  1. glassfish
  2. GLASSFISH-11666

latest weld in 3.0.1 issue with redeployment and sessions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: v3.0.1
    • Fix Version/s: 3.1
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

    • Issuezilla Id:
      11,666

      Description

      Have a ee6 web app with simple xhtml referring to a @Named @SessionScoped
      bean
      Deploy with latest nightly 3.0.1 that has the new weld and first page hit is fine.

      Bean:

      package foo;
      import java.io.Serializable;
      import javax.enterprise.context.SessionScoped;
      import javax.inject.Named;
      @Named (value="foo")
      @SessionScoped
      public class ABean implements Serializable{
      private static final long serialVersionUID = 1L;
      int i=0;
      public String getI()

      { return "bug"+i++; }

      }

      and index.xhtml: (and empty bean.xml to trigger CDI)

      <?xml version='1.0' encoding='UTF-8' ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
      <h:head>
      <title>Facelet Title</title>
      </h:head>
      <h:body>
      Hello from Facelets #

      {foo.i}

      bug at redeploy
      </h:body>
      </html>

      Change a bit the @named bean and redeploy (or use deploy on save via
      NetBeans)

      get this exception:
      SEVERE: PWC2767: ClassNotFoundException while loading persisted sessions:
      java.lang.ClassNotFoundException:
      org.jboss.weld.bean.builtin.InstanceImpl$SerializationProxy
      java.lang.ClassNotFoundException:
      org.jboss.weld.bean.builtin.InstanceImpl$SerializationProxy
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
      at
      org.apache.felix.framework.ModuleImpl.searchDynamicImports(ModuleImpl.java
      :1484)
      at
      org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(Modu
      leImpl.java:695)
      at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
      at
      org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleI
      mpl.java:1656)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:604)
      at
      com.sun.enterprise.naming.util.ObjectInputStreamWithLoader.resolveClass(Obje
      ctInputStreamWithLoader.java:117)
      at
      java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at
      java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at java.util.ArrayList.readObject(ArrayList.java:593)
      at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
      pl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at
      java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at
      java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at
      java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at
      java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at
      org.apache.catalina.session.StandardSession.readRemainingObject(StandardSess
      ion.java:1818)
      at
      org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1
      750)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
      9)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
      pl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
      at
      java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at
      org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:10
      63)
      at
      org.apache.catalina.session.StandardManager.readSessions(StandardManager.ja
      va:511)
      at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1557)
      at
      com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1944)
      at
      com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1614)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.jav
      a:339)
      at
      com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.jav
      a:183)
      at
      org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.jav
      a:272)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunner
      Impl.java:310)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRun
      nerImpl.java:320)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRun
      nerImpl.java:1121)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunn
      erImpl.java:83)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(
      CommandRunnerImpl.java:1235)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(
      CommandRunnerImpl.java:1224)
      at
      org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployComman
      d.java:96)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunner
      Impl.java:305)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRun
      nerImpl.java:320)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRun
      nerImpl.java:1176)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunn
      erImpl.java:83)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(
      CommandRunnerImpl.java:1235)
      at
      com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(
      CommandRunnerImpl.java:1224)
      at
      com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:36
      5)
      at
      com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
      at
      com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
      at
      com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
      at
      com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.j
      ava:245)
      at
      com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      at
      com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170
      )
      at
      com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChai
      n.java:135)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at
      com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at
      com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at
      com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.jav
      a:53)
      at
      com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.jav
      a:330)
      at
      com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:30
      9)
      at java.lang.Thread.run(Thread.java:637)

        Activity

        Hide
        rogerk added a comment -

        yes.

        Show
        rogerk added a comment - yes.
        Hide
        ludo added a comment -

        eta for the fix in trunk? What else is missing?
        Before March 20th for EclipseCon demos?

        Show
        ludo added a comment - eta for the fix in trunk? What else is missing? Before March 20th for EclipseCon demos?
        Hide
        rogerk added a comment -

        Can you try the attached weld-osgi-bundle.jar to make sure it fixes your problem?
        Just put it in glassfishv3/glassfish/modules and restart.
        Sending attachment..

        Show
        rogerk added a comment - Can you try the attached weld-osgi-bundle.jar to make sure it fixes your problem? Just put it in glassfishv3/glassfish/modules and restart. Sending attachment..
        Hide
        rogerk added a comment -

        Created an attachment (id=4271)
        weld osgi bundle

        Show
        rogerk added a comment - Created an attachment (id=4271) weld osgi bundle
        Hide
        rogerk added a comment -

        Fixed with latest 1.0.0-SP1 integration.

        Show
        rogerk added a comment - Fixed with latest 1.0.0-SP1 integration.

          People

          • Assignee:
            rogerk
            Reporter:
            ludo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: