Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.9-M0
    • Fix Version/s: 2.11.4, 2.12.1, 2.13-beta
    • Component/s: REST
    • Labels:
    • Environment:

      WIndows 7 x64 bit.

      Description

      Add in web.xml the following filter:

      <filter>
              <filter-name>cross-origin</filter-name>
              <filter-class&gt;org.eclipse.jetty.servlets.CrossOriginFilter</filter-class&gt;
          </filter>
          <filter-mapping>
              <filter-name>cross-origin</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>
      

      Expected result : CORS is enabled
      Actual result : the following exception:

      2015-12-13 13:17:28.574:WARN:oejs.BaseHolder:main:                                                                                                    
      java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.CrossOriginFilter                                                                        
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366)                                                                                     
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)                                                                                     
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)                                                                                 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425)                                                                                      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)                                                                                      
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450)                                                           
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)                                                           
              at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)                                                                                    
              at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:95)                                                                           
              at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)                                                                       
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:851)                                                               
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)                                               
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)                                                                
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)                                                               
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)                                                           
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)                                                                     
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)                                                  
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)                                                                   
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)                                                      
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)                                                              
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)                                             
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:440)                                                       
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)                                            
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)                                                                            
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)                                                                         
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)                                                                                      
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)                                               
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)                                                    
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)                                                             
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)                                                     
              at org.eclipse.jetty.server.Server.start(Server.java:387)                                                                                     
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)                                                   
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)                                                          
              at org.eclipse.jetty.server.Server.doStart(Server.java:354)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)                                                                   
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)                                                                    
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
              at java.lang.reflect.Method.invoke(Method.java:606)                                                                                           
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)                                                                                     
              at org.eclipse.jetty.start.Main.start(Main.java:817)                                                                                          
              at org.eclipse.jetty.start.Main.main(Main.java:112)                                                                                           
      2015-12-13 13:17:28.584:WARN:oejuc.AbstractLifeCycle:main: FAILED cross-origin: javax.servlet.UnavailableException: org.eclipse.jetty.servlets.CrossOr
      javax.servlet.UnavailableException: org.eclipse.jetty.servlets.CrossOriginFilter                                                                      
              at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:102)                                                                          
              at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)                                                                       
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:851)                                                               
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)                                               
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)                                                                
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)                                                               
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)                                                           
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)                                                                     
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)                                                  
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)                                                                   
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)                                                      
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)                                                              
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)                                             
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:440)                                                       
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)                                            
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)                                                                            
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)                                                                         
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)                                                                                      
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)                                               
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)                                                    
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)                                                             
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)                                                     
              at org.eclipse.jetty.server.Server.start(Server.java:387)                                                                                     
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)                                                   
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)                                                          
              at org.eclipse.jetty.server.Server.doStart(Server.java:354)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)                                                                   
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)                                                                    
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
              at java.lang.reflect.Method.invoke(Method.java:606)                                                                                           
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)                                                                                     
              at org.eclipse.jetty.start.Main.start(Main.java:817)                                                                                          
              at org.eclipse.jetty.start.Main.main(Main.java:112)                                                                                           
      2015-12-13 13:17:28.604:WARN:oejs.BaseHolder:main:                                                                                                    
      java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.CrossOriginFilter                                                                        
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366)                                                                                     
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355)                                                                                     
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354)                                                                                 
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425)                                                                                      
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)                                                                                      
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450)                                                           
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)                                                           
              at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)                                                                                    
              at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:95)                                                                           
              at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)                                                                       
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:888)                                                               
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)                                               
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)                                                                
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)                                                               
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)                                                           
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)                                                                     
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)                                                  
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)                                                                   
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)                                                      
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)                                                              
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)                                             
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:440)                                                       
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)                                            
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)                                                                            
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)                                                                         
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)                                                                                      
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)                                               
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)                                                    
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)                                                             
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)                                                     
              at org.eclipse.jetty.server.Server.start(Server.java:387)                                                                                     
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)                                                   
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)                                                          
              at org.eclipse.jetty.server.Server.doStart(Server.java:354)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)                                                                   
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)                                                                    
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
              at java.lang.reflect.Method.invoke(Method.java:606)                                                                                           
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)                                                                                     
              at org.eclipse.jetty.start.Main.start(Main.java:817)                                                                                          
              at org.eclipse.jetty.start.Main.main(Main.java:112)                                                                                           
      2015-12-13 13:17:28.614:WARN:oejuc.AbstractLifeCycle:main: FAILED cross-origin: javax.servlet.UnavailableException: org.eclipse.jetty.servlets.CrossOr
      javax.servlet.UnavailableException: org.eclipse.jetty.servlets.CrossOriginFilter                                                                      
              at org.eclipse.jetty.servlet.BaseHolder.doStart(BaseHolder.java:102)                                                                          
              at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:93)                                                                       
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:888)                                                               
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)                                               
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)                                                                
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)                                                               
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)                                                           
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)                                                                     
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:41)                                                  
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)                                                                   
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)                                                      
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)                                                              
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)                                             
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:440)                                                       
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)                                            
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)                                                                            
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:528)                                                                         
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)                                                                                      
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)                                               
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:560)                                                    
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:235)                                                             
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)                                                     
              at org.eclipse.jetty.server.Server.start(Server.java:387)                                                                                     
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)                                                   
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)                                                          
              at org.eclipse.jetty.server.Server.doStart(Server.java:354)                                                                                   
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)                                                        
              at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1255)                                                                   
              at java.security.AccessController.doPrivileged(Native Method)                                                                                 
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1174)                                                                    
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                                                
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)                                                              
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)                                                      
              at java.lang.reflect.Method.invoke(Method.java:606)                                                                                           
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:321)                                                                                     
              at org.eclipse.jetty.start.Main.start(Main.java:817)                                                                                          
              at org.eclipse.jetty.start.Main.main(Main.java:112)                                                                                           
      

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                tbarsballe Torben Barsballe
                Reporter:
                Hanokh Aloni Hanokh Aloni
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Stride room