0 Replies Latest reply on Nov 9, 2006 2:51 PM by Marcio Endo

    IllegalAccessError with SUN's JVM and Seam Remoting

    Marcio Endo Newbie

      If you try to use Seam Remoting running it with SUN's JVM (1.5.08 and 1.5.09) you get an IllegalAccessError in the InterfaceGenerator class.

      17:40:44,187 ERROR [[Seam Remoting]] Servlet.service() for servlet Seam Remoting threw exception
      java.lang.IllegalAccessError: tried to access method java.lang.StringBuilder.append(Ljava/lang/StringBuilder;)Ljava/lang
      /StringBuilder; from class org.jboss.seam.remoting.InterfaceGenerator
       at org.jboss.seam.remoting.InterfaceGenerator.appendClassSource(InterfaceGenerator.java:584)
       at org.jboss.seam.remoting.InterfaceGenerator.appendTypeSource(InterfaceGenerator.java:414)
       at org.jboss.seam.remoting.InterfaceGenerator.appendComponentSource(InterfaceGenerator.java:330)
       at org.jboss.seam.remoting.InterfaceGenerator.generateComponentInterface(InterfaceGenerator.java:131)
       at org.jboss.seam.remoting.InterfaceGenerator.handle(InterfaceGenerator.java:101)
       at org.jboss.seam.remoting.SeamRemotingServlet.doPost(SeamRemotingServlet.java:77)
       at org.jboss.seam.remoting.SeamRemotingServlet.doGet(SeamRemotingServlet.java:62)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      


      Switching to IBM's JVM (1.5.0.3) and the problem does not happen.

      Changing the lines (584~586) from (CVS-20061029):

      typeSource.append(fields);
      typeSource.append(accessors);
      typeSource.append(mutators);
      


      to:

      typeSource.append(fields.toString());
      typeSource.append(accessors.toString());
      typeSource.append(mutators.toString());
      


      and rebuilding SEAM solved the problem.

      Not a bug directly related to SEAM but I guess most people running Windows use SUN's JVM.