4 Replies Latest reply on Oct 7, 2005 9:39 AM by jlaskowski

    Compile failed - today's sources

    jlaskowski

      Hi,

      I'm getting the following exception on Java 5 while building Portal from today's sources.

      ...
      _default:compile-classes:
      [mkdir] Created dir: C:\projs\jboss-portal-2.2\core\output\classes
      [mkdir] Created dir: C:\projs\jboss-portal-2.2\core\output\gen\classes
      [javac] Compiling 292 source files to C:\projs\jboss-portal-2.2\core\output\classes
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\core\aspects\controller\PolicyEnforcementInterceptor.java:90: reference to CodeSource is
      ambiguous, both method CodeSource(java.net.URL,java.security.cert.Certificate[]) in java.security.CodeSource and method CodeSource(java.net.URL,java.security.Co
      deSigner[]) in java.security.CodeSource match
      [execmodules] cs = new CodeSource(new URL("http://www.jboss.org/portal"), null);
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\core\servlet\StaticPrincipalFilter.java:57: warning: [deprecation] getRealPath(java.lang.
      String) in javax.servlet.ServletRequest has been deprecated
      [execmodules] public Principal getUserPrincipal()
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\core\servlet\StaticPrincipalFilter.java:57: warning: [deprecation] isRequestedSessionIdFr
      omUrl() in javax.servlet.http.HttpServletRequest has been deprecated
      [execmodules] public Principal getUserPrincipal()
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\core\servlet\StaticPrincipalFilter.java:57: warning: [deprecation] getRealPath(java.lang.
      String) in javax.servlet.ServletRequest has been deprecated
      [execmodules] public Principal getUserPrincipal()
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\test\core\HttpServletRequestWrapperImpl.java:20: warning: [deprecation] getRealPath(java.
      lang.String) in javax.servlet.ServletRequest has been deprecated
      [execmodules] public class HttpServletRequestWrapperImpl
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\test\core\HttpServletRequestWrapperImpl.java:20: warning: [deprecation] isRequestedSessio
      nIdFromUrl() in javax.servlet.http.HttpServletRequest has been deprecated
      [execmodules] public class HttpServletRequestWrapperImpl
      [execmodules] ^
      [execmodules] C:\projs\jboss-portal-2.2\core\src\main\org\jboss\portal\test\core\HttpServletRequestWrapperImpl.java:20: warning: [deprecation] getRealPath(java.
      lang.String) in javax.servlet.ServletRequest has been deprecated
      [execmodules] public class HttpServletRequestWrapperImpl
      [execmodules] ^
      [execmodules] 1 error
      [execmodules] 6 warnings

      BUILD FAILED
      C:\projs\jboss-portal-2.2\tools\etc\buildfragments\targets.ent:732: The following error occurred while executing this line:
      C:\projs\jboss-portal-2.2\tools\etc\buildfragments\targets.ent:95: Compile failed; see the compiler error output for details.

      Jacek

        • 1. Re: Compile failed - today's sources

          I am compiling on JDK 4 without issues, but they have introduced a new constructor in JDK 5.

          I have added an explicit cast to the intended constructor and added it in the CVS.

          • 2. Re: Compile failed - today's sources
            jlaskowski


            Thanks Julien. It works now.

            Any chances that the change to PortalObjectCommandMapper class go into the repository?

            $ cvs diff core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandMapper.java
            Index: core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandMapper.java
            ===================================================================
            RCS file: /cvsroot/jboss/jboss-portal/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandMapper.java,v
            retrieving revision 1.1
            diff -u -r1.1 PortalObjectCommandMapper.java
            --- core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandMapper.java 1 Oct 2005 09:09:52 -0000 1.1
            +++ core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandMapper.java 7 Oct 2005 11:31:48 -0000
            @@ -71,7 +71,7 @@
             else if (parent instanceof Page)
             {
             Page page = (Page)parent;
            - return page.getPage(name);
            + return page.getWindow(name);
             }
             return null;
             }
            


            And would you consider committing the change to build.xml - http://jira.jboss.com/jira/browse/JBPORTAL-408?

            Jacek

            • 3. Re: Compile failed - today's sources

              just done it.

              and then when the command is created, it uses the page of the window.

              • 4. Re: Compile failed - today's sources
                jlaskowski

                Thanks!

                p.s. See you at JBoss World 2005!

                Jacek