Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

hypspecter
I have a custom filter class that attempts to configure the Milton Configurator.  It worked in 2.5.x but when I upgraded to 2.6.0.1 it gives the following error:

10:28:26,942 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Addm]] (MSC service thread 1-15) Exception starting filter MiltonFilter: java.lang.VerifyError: (class: io/milton/servlet/DefaultMiltonConfigurator, method: configure signature: (Lio/milton/servlet/Config;)Lio/milton/http/HttpManager;) Incompatible argument to function
        at mil.af.addm.webDAV.WebDAVFilter.init(WebDAVFilter.java:51) [webDav-1.0.jar:]
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:]
        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_33]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_33]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]

It seems that it doesn't like my call to configure passing in a FilterConfigWrapper that I generated from the FilterConfig object passed into my init method as seen below:

public void init(FilterConfig config) throws ServletException {
                try {
                        FilterConfigWrapper filterConfigWrapper = new FilterConfigWrapper(config);
                        this.servletContext = config.getServletContext();

                        String configuratorClassName = config
                                        .getInitParameter("milton.configurator");
                        if (configuratorClassName != null) {
                                configurator = DefaultMiltonConfigurator
                                                .instantiate(configuratorClassName);
                        } else {
                                configurator = new DefaultMiltonConfigurator();
                        }
                        LOGGER.debug("Using configurator: " + configurator.getClass());

                        String sExcludePaths = config
                                        .getInitParameter("milton.exclude.paths");
                        LOGGER.debug("init: exclude paths: " + sExcludePaths);
                        if (sExcludePaths != null) {
                                excludeMiltonPaths = sExcludePaths.split(",");
                        }

                        httpManager = configurator.configure(filterConfigWrapper);

                } catch (ServletException ex) {
                        LOGGER.error("Exception starting milton servlet", ex);
                        throw ex;
                }
        }

Looked at the source code and don't see where it throws the verify error but I think I am using the correct method signature for configure.  Any ideas.
Reply | Threaded
Open this post in threaded view
|

Re: Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

hypspecter
I have tried to clean and rebuild everything from the jar to the server.  I am not sure where it is getting a different signature for configure.
Reply | Threaded
Open this post in threaded view
|

Re: Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

hypspecter
And I'm using maven to pull the jars off the site
Reply | Threaded
Open this post in threaded view
|

Re: Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

bradmacnz
In reply to this post by hypspecter
I cant see anything wrong with your code. Its possible that was just a
bad build, I'll redeploy as 2.6.0.2 later today


On 25/02/14 04:39, hypspecter wrote:

> I have a custom filter class that attempts to configure the Milton
> Configurator.  It worked in 2.5.x but when I upgraded to 2.6.0.1 it gives
> the following error:
>
> 10:28:26,942 ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Addm]]
> (MSC service thread 1-15) Exception starting filter MiltonFilter:
> java.lang.VerifyError: (class: io/milton/servlet/DefaultMiltonConfigurator,
> method: configure signature:
> (Lio/milton/servlet/Config;)Lio/milton/http/HttpManager;) Incompatible
> argument to function
> at mil.af.addm.webDAV.WebDAVFilter.init(WebDAVFilter.java:51)
> [webDav-1.0.jar:]
> at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447)
> [jbossweb-7.0.13.Final.jar:]
> at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269)
> [jbossweb-7.0.13.Final.jar:]
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3865)
> [jbossweb-7.0.13.Final.jar:]
> at
> org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
> [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
> at
> org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [rt.jar:1.6.0_33]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [rt.jar:1.6.0_33]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]
>
> It seems that it doesn't like my call to configure passing in a
> FilterConfigWrapper that I generated from the FilterConfig object passed
> into my init method as seen below:
>
> public void init(FilterConfig config) throws ServletException {
> try {
> FilterConfigWrapper filterConfigWrapper = new
> FilterConfigWrapper(config);
> this.servletContext = config.getServletContext();
>
> String configuratorClassName = config
> .getInitParameter("milton.configurator");
> if (configuratorClassName != null) {
> configurator = DefaultMiltonConfigurator
> .instantiate(configuratorClassName);
> } else {
> configurator = new DefaultMiltonConfigurator();
> }
> LOGGER.debug("Using configurator: " + configurator.getClass());
>
> String sExcludePaths = config
> .getInitParameter("milton.exclude.paths");
> LOGGER.debug("init: exclude paths: " + sExcludePaths);
> if (sExcludePaths != null) {
> excludeMiltonPaths = sExcludePaths.split(",");
> }
>
> httpManager = configurator.configure(filterConfigWrapper);
>
> } catch (ServletException ex) {
> LOGGER.error("Exception starting milton servlet", ex);
> throw ex;
> }
> }
>
> Looked at the source code and don't see where it throws the verify error but
> I think I am using the correct method signature for configure.  Any ideas.
>
>
>
> --
> View this message in context: http://milton-users.96038.n3.nabble.com/Error-in-2-6-0-1-when-trying-to-configure-DefaultMiltonConfigurator-tp4025628.html
> Sent from the Milton Users mailing list archive at Nabble.com.
> _______________________________________________
> Milton-users mailing list
> [hidden email]
> http://lists.justthe.net/mailman/listinfo/milton-users

_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users
Reply | Threaded
Open this post in threaded view
|

Re: Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

hypspecter
Did you change your build script?  I made no code changes and only changed the version in the pom and got compile errors back until I included milton-api.  I never had to have that before changing to 2.6.0.1.  I only needed milton-server-ce and milton-server-ent.  No problem with that change. Just asking.
Reply | Threaded
Open this post in threaded view
|

Re: Error in 2.6.0.1 when trying to configure DefaultMiltonConfigurator

bradmacnz
No, there should not have been any impact on dependencies etc. I've seen
that happen with other libraries myself (recently when upgrading
spring), but maven can be a bit of a mystery sometimes.




On 25/02/14 10:48, hypspecter wrote:

> Did you change your build script?  I made no code changes and only changed
> the version in the pom and got compile errors back until I included
> milton-api.  I never had to have that before changing to 2.6.0.1.  I only
> needed milton-server-ce and milton-server-ent.  No problem with that change.
> Just asking.
>
>
>
> --
> View this message in context: http://milton-users.96038.n3.nabble.com/Error-in-2-6-0-1-when-trying-to-configure-DefaultMiltonConfigurator-tp4025628p4025632.html
> Sent from the Milton Users mailing list archive at Nabble.com.
> _______________________________________________
> Milton-users mailing list
> [hidden email]
> http://lists.justthe.net/mailman/listinfo/milton-users

_______________________________________________
Milton-users mailing list
[hidden email]
http://lists.justthe.net/mailman/listinfo/milton-users