You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Vladimir Goncharov (JIRA)" <ji...@apache.org> on 2006/09/27 15:56:50 UTC
[jira] Created: (VELOCITY-461) Class loading issue
Class loading issue
-------------------
Key: VELOCITY-461
URL: http://issues.apache.org/jira/browse/VELOCITY-461
Project: Velocity
Issue Type: Bug
Affects Versions: 1.4
Environment: any java env
Reporter: Vladimir Goncharov
Priority: Blocker
If Velocity.jar is loaded from the WL classpath then it cannot load resources from the war or ear. This applies to both template resources as well as to the loader of the resources loaders themselves e.g. custom ClasspathResourceLoader couldn't be loaded when velocity.jar was loaded from the WL app claspath and the custom class was loaded from the ear.
In my view all appearances of this.getClass().getClassLoader() should be replaced by Thred.currentThread.getContextClassLoader()
Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
[jira] Resolved: (VELOCITY-461) Class loading issue
Posted by "Will Glass-Husain (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VELOCITY-461?page=all ]
Will Glass-Husain resolved VELOCITY-461.
----------------------------------------
Fix Version/s: 1.5
Resolution: Fixed
This is fixed in Velocity 1.5-beta. (download: http://cvs.apache.org/dist/jakarta/velocity/ )
See Velocity-196.
This applies to templates loaded with ClasspathResourceLoader, custom implementations of ResourceLoaders, Introspectors, property files loaded from classpath, etc.
> Class loading issue
> -------------------
>
> Key: VELOCITY-461
> URL: http://issues.apache.org/jira/browse/VELOCITY-461
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: any java env
> Reporter: Vladimir Goncharov
> Priority: Blocker
> Fix For: 1.5
>
>
> If Velocity.jar is loaded from the WL classpath then it cannot load resources from the war or ear. This applies to both template resources as well as to the loader of the resources loaders themselves e.g. custom ClasspathResourceLoader couldn't be loaded when velocity.jar was loaded from the WL app claspath and the custom class was loaded from the ear.
> In my view all appearances of this.getClass().getClassLoader() should be replaced by Thred.currentThread.getContextClassLoader()
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
[jira] Closed: (VELOCITY-461) Class loading issue
Posted by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henning Schmiedehausen closed VELOCITY-461.
-------------------------------------------
> Class loading issue
> -------------------
>
> Key: VELOCITY-461
> URL: https://issues.apache.org/jira/browse/VELOCITY-461
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: any java env
> Reporter: Vladimir Goncharov
> Priority: Blocker
> Fix For: 1.5
>
>
> If Velocity.jar is loaded from the WL classpath then it cannot load resources from the war or ear. This applies to both template resources as well as to the loader of the resources loaders themselves e.g. custom ClasspathResourceLoader couldn't be loaded when velocity.jar was loaded from the WL app claspath and the custom class was loaded from the ear.
> In my view all appearances of this.getClass().getClassLoader() should be replaced by Thred.currentThread.getContextClassLoader()
> Thanks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Commented: (VELOCITY-461) Class loading issue
Posted by "Will Glass-Husain (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VELOCITY-461?page=comments#action_12438233 ]
Will Glass-Husain commented on VELOCITY-461:
--------------------------------------------
That is fixed as well in Velocity-1.5-beta.
Anything that comes from the class path is first searched for in the ContextClassLoader, then via getClassLoader.
Further questions? Please take them to the user list and we'll be happy to answer them there.
> Class loading issue
> -------------------
>
> Key: VELOCITY-461
> URL: http://issues.apache.org/jira/browse/VELOCITY-461
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: any java env
> Reporter: Vladimir Goncharov
> Priority: Blocker
> Fix For: 1.5
>
>
> If Velocity.jar is loaded from the WL classpath then it cannot load resources from the war or ear. This applies to both template resources as well as to the loader of the resources loaders themselves e.g. custom ClasspathResourceLoader couldn't be loaded when velocity.jar was loaded from the WL app claspath and the custom class was loaded from the ear.
> In my view all appearances of this.getClass().getClassLoader() should be replaced by Thred.currentThread.getContextClassLoader()
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
[jira] Commented: (VELOCITY-461) Class loading issue
Posted by "Vladimir Goncharov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VELOCITY-461?page=comments#action_12438198 ]
Vladimir Goncharov commented on VELOCITY-461:
---------------------------------------------
I think that custom resource loaders should be loaded in this way as well in case when one particular web app needs to redefine the resource loader. But it helps anyway. Thanks
I understand that nothing should be on the app server classpath but sometimes it is beyond control and extra flexibility helps in this case. May it can be maid configurable via the property
> Class loading issue
> -------------------
>
> Key: VELOCITY-461
> URL: http://issues.apache.org/jira/browse/VELOCITY-461
> Project: Velocity
> Issue Type: Bug
> Affects Versions: 1.4
> Environment: any java env
> Reporter: Vladimir Goncharov
> Priority: Blocker
> Fix For: 1.5
>
>
> If Velocity.jar is loaded from the WL classpath then it cannot load resources from the war or ear. This applies to both template resources as well as to the loader of the resources loaders themselves e.g. custom ClasspathResourceLoader couldn't be loaded when velocity.jar was loaded from the WL app claspath and the custom class was loaded from the ear.
> In my view all appearances of this.getClass().getClassLoader() should be replaced by Thred.currentThread.getContextClassLoader()
> Thanks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org