eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
386 stars 144 forks source link

dup classes exist in both: javax.servlet.jar and servlet-api.jar #8242

Closed glassfishrobot closed 15 years ago

glassfishrobot commented 15 years ago

This was seen in V3 b47a:

There are several classes which are duplicated in both javax.servlet.jar and servlet-api.jar. The classes appear to be slightly different however. This was seen by doing the following and checking the class size:

jar tvf javax.servlet.jar |grep javax.servlet.http.HttpSessionContext 356 Wed May 06 05:42:44 EDT 2009 javax/servlet/http/HttpSessionContext.class

jar tvf servlet-api.jar |grep javax.servlet.http.HttpSessionContext 288 Wed Oct 18 13:02:26 EDT 2006 javax/servlet/http/HttpSessionContext.class

This appears to be the case for most/all classes in the packages: javax.servlet.http javax.servlet

Not sure which is correct but I don't think there can be different versions of these classes in different jars.

I flagged this a P2 as this may needs to be addressed asap -paul

Environment

Operating System: All Platform: Sun

Affected Versions

[V3]

glassfishrobot commented 6 years ago
glassfishrobot commented 15 years ago

@glassfishrobot Commented @ssevozen said: servlet-api.jar should not be in the distribution at all - it is currently being pulled in as transitive dependency of grizzly.

I'll adjust GF packager to exclude servlet-api, but we might also need to take a look at grizzly pom files and see if it can be addressed at the source...

glassfishrobot commented 15 years ago

@glassfishrobot Commented @ssevozen said: ...

glassfishrobot commented 15 years ago

@glassfishrobot Commented jluehe said: Kin-man is looking into this

glassfishrobot commented 15 years ago

@glassfishrobot Commented kchung said: servlet-api.jar is servlet 2.5, and javax.servlet.jar is servlet 3.0. I think servlet-api.jar got pulled in because it is being used by other modules, such as grizzle and jsp projects.

While it is true that we can change these projects' dependencies to servlet 3.0, it would create problem at this time. The reason is that servlet 3.0 is built as part of glassfish build, to make jsp depends on servlet 3.0 would create a circular build dependency, since glassfish also depends on jsp. The only solution is build and publish servlet 3.0 first, before build jsp and the rest of glassfish. This would happen when servlet is an independent project, which we plan to do in the future.

For now it may be best to just exclude servlet-api.jar from the packaging.

glassfishrobot commented 15 years ago

@glassfishrobot Commented @ssevozen said: I am already taking care of the servlet-api.jar exclusion in packager (and this fix will be checked in shortly), but you should still consider whether the currently defined scope of grizzly-cometd module dependency on servlet-api is appropriate or not...

glassfishrobot commented 15 years ago

@glassfishrobot Commented @ssevozen said: Packager change which will exclude servlet-api.jar from GF distribution has been checked in into preview branch and trunk. That being said, I will downgrade this issue to P3 and assign it to grizzly team - as per my previous comment, please evaluate if you really need to have servlet-api defined as compile/runtime dependency of grizzly-cometd module or it could possibly be defined as "provided".

glassfishrobot commented 15 years ago

@glassfishrobot Commented oleksiys said: Jeanfrancois, do you have any concerns, if we'll change servlet-api dependency for cometd to "provided"?

glassfishrobot commented 15 years ago

@glassfishrobot Commented jfarcand said: Will be fixed in 1.9.18c

glassfishrobot commented 15 years ago

@glassfishrobot Commented oleksiys said: Grizzly 1.9.18d was integrated

glassfishrobot commented 15 years ago

@glassfishrobot Commented Issue-Links: depends on GLASSFISH-9684

glassfishrobot commented 15 years ago

@glassfishrobot Commented Was assigned to oleksiys

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-8242

glassfishrobot commented 15 years ago

@glassfishrobot Commented Reported by phendley

glassfishrobot commented 15 years ago

@glassfishrobot Commented Marked as fixed on Monday, October 12th 2009, 9:19:36 pm