dev@glassfish.java.net

Re: Does the trunk build?

From: Sahoo <Sahoo_at_Sun.COM>
Date: Fri, 17 Oct 2008 22:23:10 +0530

I think I have some idea about why this error occurs. Looking at mvn -X
output, I see classpath during compilation of web-glue has
servlet-api-2.5.jar ahead of javax.servlet-3.0-SNAPSHOT.jar. Since this
method the compiler is not able to locate is new in Servlet 3.0,
compilation fails. More interesting to note that doing a build in
web-glue module does not fail, where as doing a build from top level
fails. It may just be a bug in maven. For the moment, we can force maven
to javax.servlet-3.0-SNAPSHOT.jar ahead in classpath by explicitly
specifying a dependency on the same rather than depending on it
transitively. See "Dependency mediation" in [1]. I will try this work
around and if it works, I shall check in.

Thanks,
Sahoo

[1]
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Sahoo wrote:
> I am also seeing this error after updating my workspace. I have not
> done any investigations yet.
>
> Thanks,
> Sahoo
>
> Nandini Ektare wrote:
>> Hi Amy,
>>
>> Unfortunately that did not work. I have tried fresh workspace and a
>> fresh maven repository (tried specifying new repo explicitly too)
>> I have tried both mvn -U install and mvn install (just in case
>> dependencies are resolved differently)
>>
>> Trunk fails with the same error below. Any idea how I could work
>> around this issue? (I am on windows if that matters in any way)
>>
>> Thanks
>> Nandini
>>
>> Amy Roh wrote:
>>> The javax.servlet.ServletContext does have the method in question.
>>> Try rebuilding after update.
>>>
>>> Hudson build is fine.
>>>
>>> Amy
>>>
>>> Nandini Ektare wrote:
>>>> servlet-api module seems incompatible....
>>>>
>>>> [INFO] [hk2:hk2-compile]
>>>> [INFO] Compiling 130 source files to
>>>> C:\scf\v3\web\web-glue\target\classes
>>>> Note:
>>>> C:\scf\v3\web\web-glue\src\main\java\com\sun\enterprise\web\WebComponentInvocation.java
>>>> uses or overrides a deprecated API.
>>>> Note: Recompile with -Xlint:deprecation for details.
>>>> C:\scf\v3\web\web-glue\src\main\java\com\sun\enterprise\web\pwc\connector\coyote\PwcCoyoteRequest.java:146:
>>>> cannot find symbol
>>>> symbol : method getSessionCookieConfig()
>>>> location: interface javax.servlet.ServletContext
>>>> (servletContext.getSessionCookieConfig()!=null)) {
>>>> ^
>>>> Note: Some input files use or override a deprecated API.
>>>> Note: Recompile with -Xlint:deprecation for details.
>>>> Note: Some input files use unchecked or unsafe operations.
>>>> Note: Recompile with -Xlint:unchecked for details.
>>>> 1 error
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>>
>>>> [ERROR] BUILD ERROR
>>>> [INFO]
>>>> ------------------------------------------------------------------------
>>>>
>>>> [INFO] Fatal error compiling
>>>>
>>>> -Nandini
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>