[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] Re: Equinox Transforms

2. I resolved the problem of launching it from inside eclipse, i had to 
import the org.eclipse.osgi project into the workspace. Otherwise it wont 
work.

But i got into a different problem now, Now i get a ClassNotFoundException 
from inside the transforms extension class.

 1. com.comp.product.transforms
 2. com.comp.product.diagnostics

I have a PluginTransformingBundleFileWrapperFactoryHook which implements 
BundleFileWrapperFactoryHook,HookConfigurator, AdaptorHook

public BundleFile wrapBundleFile(BundleFile bundleFile, Object content, 
BaseData data, boolean base)

throws IOException

{

if (m_startLevelManager != null && m_startLevelManager.getStartLevel() >= 1)

{

if (m_loginClass == null)

{

try

{

ClassLoader classLoader = getClass().getClassLoader();

m_loginClass = classLoader.loadClass(m_loginProperty);

ILogin login;

System.out.println("Calling the Login module");

login = (ILogin) m_loginClass.newInstance();

// The actual rights loading from a login

// implementation.

m_rightsList = login.login();

login = null;

}

catch (Exception e)

{

e.printStackTrace();

System.err.println("RCP-Auth: Couldn't call the " + "ILogin.login 
method.\nEclipse will now exit.");

// System.exit(1);

}

}


return new PluginTransformBundleFile(getContext(), data, bundleFile);

}

return null;

}





PluginTransformBundleFile.java



/**

* Returns BundleEntry at path.

*

* @param path

* The file path.

* @return The original bundle entry, or a PluginTransformBundleEntry 
instance.

*/

@Override

public BundleEntry getEntry(final String path)

{

final BundleEntry original = m_delegate.getEntry(path);

if (m_data.getBundle() == null || path == null || original == null)

{

return original;

}


try

{

if (path.equals("plugin.xml"))

{

return new PluginTransformBundleEntry(original, original.getInputStream());

}

}

catch (IOException e)

{

System.err.println(this.getBundleContext() + "#" + 
this.getClass().getCanonicalName() + ": "

+ "Couldn't create " + PluginTransformBundleEntry.class.getCanonicalName() + 
" for file " + path);

}


return original;

}

I get a ClassNotFoundException for PluginTransformBundleEntry when i run in 
debug mode. In normal mode nothing happens, it just didnt do the transform. 
i 
have -Dosgi.framework.extensions=com.comp.product.transforms,com.comp.product.diagnostics 
in the run configurations vm arguments.

I am struck with this now.


Kathir.


"Kathir" <kathir@xxxxxxxxxxx> wrote in message 
news:gk5j13$p3n$1@xxxxxxxxxxxxxxxxxxxx
> Here are the plugin structure i have.
>
> 1. com.comp.product.transforms
> 2. com.comp.product.diagnostics
>
> diagnostics does a login and based on the permissions of the user, 
> extensions are filtered. The filtering is done in the transforms fragment.
>
> Kathir.
>
> "news.eclipse.org" <kathir@xxxxxxxxxxx> wrote in message 
> news:gk5ilu$kfp$1@xxxxxxxxxxxxxxxxxxxx
>>I got the xslt working. Just didn't do the "add required plugins" before
>> launching it.
>>
>>
>> Any suggestions for 2 & 3 ?
>> Kathir."news.eclipse.org" <kathir@xxxxxxxxxxx> wrote in message 
>> news:gk5hka$pl$1@xxxxxxxxxxxxxxxxxxxx
>>> Hi,
>>>
>>> 1.
>>>
>>> I tried running the xslt example plugin from my eclipse. I get the 
>>> following exception when i used the launch file inside the xslt plugin.
>>>
>>> java.lang.ClassNotFoundException: 
>>> org.eclipse.core.runtime.adaptor.EclipseStarter
>>>
>>> at java.net.URLClassLoader$1.run(Unknown Source)
>>>
>>> at java.security.AccessController.doPrivileged(Native Method)
>>>
>>> at java.net.URLClassLoader.findClass(Unknown Source)
>>>
>>> at java.lang.ClassLoader.loadClass(Unknown Source)
>>>
>>> at java.lang.ClassLoader.loadClass(Unknown Source)
>>>
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:546)
>>>
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>>>
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>>>
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
>>>
>>> 2.
>>>
>>> I created my own transforms and used it in my application plugin to 
>>> filter some extensions. I added a startup handler exception to check 
>>> whether the transforms are applied or not. Whenever i start the app, the 
>>> startup handler extension will be removed and i should be able to see 
>>> the application. But whatever way i try to launch, the transform doesnt 
>>> get applied and the startup handler gets invoked.
>>>
>>> How do i run the transforms based application from inside eclipse. I 
>>> have osgi.framework.extensions attribute set in my run configurations.
>>>
>>> When i export the application as a product, the transformations get 
>>> applied and the startup handler is removed from the extensions.
>>>
>>> 3. So i am exporting the product everytime i make changes to my code and 
>>> testing it. The next problem is I do a login when i start the 
>>> application. The Login Dialog uses jface classes for the UI. I do the 
>>> login check before i do the transforms. I get ClassNotFoundException for 
>>> all the jface classes from inside the transforms fragment. Is it 
>>> possible to use any eclipse plugin classes  before i do the transforms.
>>>
>>> PS: I used the sample from Bredex authorization and extending it to my 
>>> needs.
>>>
>>> Am i doing things on the right direction. Any suggestions?
>>>
>>> Kathir.
>>>
>>>
>>
>>
>
>