<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Classloading problem with osgi in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/classloading-problem-with-osgi/m-p/147980#M103301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running Activiti in an OSGI environment, with the engine in one bundle and several other bundles provide the process definitions and related resources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've run into a ClassNotFoundException when reading a process variable I've set previously, because the engine bundle classloader does not know the Class of the process variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Which is normal because it's an implementation and I don't what to export those in my OSGI environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I see a few options to get the deserialization to work but I would like some guidance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Create a custom VariableType for each process variable I want to store. Can I add these dynamically to the configuration depending on the bundles that are active?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Forget storing serializable types and convert the object to XML or JSON first and deconvert from string process variable with my own converter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Replace the classloader on the ProcessEngineConfigurationImpl each time you load a process variable so the ReflectUtil will find it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Temporarily replace the classloader of the thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Other ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would preferably not use 3 or 4 because they seem to be cheating OSGI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So what's the best way? Any tips or tricks?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Jun 2013 12:26:50 GMT</pubDate>
    <dc:creator>lvolckaert</dc:creator>
    <dc:date>2013-06-17T12:26:50Z</dc:date>
    <item>
      <title>Classloading problem with osgi</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/classloading-problem-with-osgi/m-p/147980#M103301</link>
      <description>Hi,I'm running Activiti in an OSGI environment, with the engine in one bundle and several other bundles provide the process definitions and related resources.I've run into a ClassNotFoundException when reading a process variable I've set previously, because the engine bundle classloader does not kno</description>
      <pubDate>Mon, 17 Jun 2013 12:26:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/classloading-problem-with-osgi/m-p/147980#M103301</guid>
      <dc:creator>lvolckaert</dc:creator>
      <dc:date>2013-06-17T12:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Classloading problem with osgi</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/classloading-problem-with-osgi/m-p/147981#M103302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Solutions one and two seem to be a good solution. I can't think of any other solutions…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jun 2013 08:03:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/classloading-problem-with-osgi/m-p/147981#M103302</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-06-18T08:03:08Z</dc:date>
    </item>
  </channel>
</rss>

