You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/02/25 10:40:41 UTC
[Bug 56186] New: javax.websocket-api.jar exists in the war package,
then Cannot load custom ServerApplicationConfig
https://issues.apache.org/bugzilla/show_bug.cgi?id=56186
Bug ID: 56186
Summary: javax.websocket-api.jar exists in the war package,
then Cannot load custom ServerApplicationConfig
Product: Tomcat 7
Version: 7.0.52
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: liushangkun520@hotmail.com
hi, i have a project that using maven to compile it.
and there is a dependency like this :
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.0</version>
</dependency>
after packing with a war file, the javax.websocket-api.jar also in the war
well, i am debugged tomcat7.0.52 with the class :
org.apache.tomcat.websocket.server.WsSci
line at 94:
if (ServerApplicationConfig.class.isAssignableFrom(clazz)) {
serverApplicationConfigs.add(
(ServerApplicationConfig) clazz.newInstance());
}
this check is never return true case ServerApplicationConfig's classloader is
WebappClassLoader i guess..
i changed pom.xml like this:
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
after packing with a war file and run again ...
ServerApplicationConfig.class.isAssignableFrom(clazz) return true ,
so my custom ServerApplicationConfig can be loaded ...
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 56186] javax.websocket-api.jar exists in the war package, then
Cannot load custom ServerApplicationConfig
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56186
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
You can't package the API with the WAR and then expect to be able to pick up
the implementation from the container since the implementation will never be
able to see the API classes.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org