You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Frank Schwarz (JIRA)" <ji...@apache.org> on 2010/01/28 23:00:32 UTC
[jira] Created: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Freemarker template not found due to wrong classloader
------------------------------------------------------
Key: CAMEL-2423
URL: https://issues.apache.org/activemq/browse/CAMEL-2423
Project: Apache Camel
Issue Type: Improvement
Affects Versions: 2.1.0, 2.2.0, Future
Reporter: Frank Schwarz
Attachments: freemarker.patch
Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57260#action_57260 ]
Frank Schwarz commented on CAMEL-2423:
--------------------------------------
Both components work fine in my environment. So no action is needed here. (Both velocity and string-template make use of ResourceBasedEndpoint#getResource() which eventually delegates to some spring magic.)
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank Schwarz updated CAMEL-2423:
---------------------------------
Attachment: freemarker-2.patch
Based on my investigations about velocity and string-template I created a different patch for the freemarker component. It is now based on ResourceBasedComponent and makes use of the inherited getResourceLoader() method. This patch is now more "Camel-like".
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker-2.patch, freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57230#action_57230 ]
Willem Jiang commented on CAMEL-2423:
-------------------------------------
Supporting to set the BeanClassLoader from the component is a good way to let the user get the power of control.
I checked the code of camel-velocity and camel-stringtemplate, they are littler different from Freemarker, so I doesn't applied the change on to these two component.
It could be great that Frank submit a new patch for upper two component.
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57300#action_57300 ]
Claus Ibsen commented on CAMEL-2423:
------------------------------------
Applied 2nd patch
trunk: 905585.
1.x: 905588.
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker-2.patch, freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang updated CAMEL-2423:
--------------------------------
Affects Version/s: (was: 2.2.0)
(was: Future)
1.5.0
1.6.0
2.0-M1
1.6.1
1.6.2
2.0-M2
2.0-M3
2.0.0
Fix Version/s: 2.2.0
1.6.3
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Frank Schwarz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Frank Schwarz updated CAMEL-2423:
---------------------------------
Attachment: freemarker.patch
proposed patch
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 2.1.0, 2.2.0, Future
> Reporter: Frank Schwarz
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57228#action_57228 ]
Claus Ibsen commented on CAMEL-2423:
------------------------------------
Frank do you mind creating the same fix for the other 2 camel components? camel-velocity and camel-stringtemplate as all those 3 are kind similar?
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CAMEL-2423:
-----------------------------------
Assignee: Willem Jiang
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 2.1.0, 2.2.0, Future
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-2423.
---------------------------------
Resolution: Fixed
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CAMEL-2423) Freemarker template not found due to
wrong classloader
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57225#action_57225 ]
Willem Jiang commented on CAMEL-2423:
-------------------------------------
Applied patch with thanks to Frank
trunk
http://svn.apache.org/viewvc?rev=904365&view=rev
camel 1.x branch
http://svn.apache.org/viewvc?rev=904383&view=rev
> Freemarker template not found due to wrong classloader
> ------------------------------------------------------
>
> Key: CAMEL-2423
> URL: https://issues.apache.org/activemq/browse/CAMEL-2423
> Project: Apache Camel
> Issue Type: Improvement
> Affects Versions: 1.5.0, 1.6.0, 2.0-M1, 1.6.1, 1.6.2, 2.0-M2, 2.0-M3, 2.0.0, 2.1.0
> Reporter: Frank Schwarz
> Assignee: Willem Jiang
> Fix For: 1.6.3, 2.2.0
>
> Attachments: freemarker.patch
>
>
> Freemarker templates are loaded with org.springframework.core.io.Resource-class's classloader. This does not work when Spring is part of the classloader realm of the application's parent classloader.
> Proposed patch attached.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.