Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Equinox Transforms
Equinox Transforms [message #124019] Thu, 08 January 2009 18:45 Go to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

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.
Re: Equinox Transforms [message #124034 is a reply to message #124019] Thu, 08 January 2009 19:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

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@atc.tcs.com> wrote in message
news:gk5hka$pl$1@build.eclipse.org...
> 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.
>
>
Re: Equinox Transforms [message #124047 is a reply to message #124034] Thu, 08 January 2009 19:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

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@atc.tcs.com> wrote in message
news:gk5ilu$kfp$1@build.eclipse.org...
>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@atc.tcs.com> wrote in message
> news:gk5hka$pl$1@build.eclipse.org...
>> 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.
>>
>>
>
>
Re: Equinox Transforms [message #124084 is a reply to message #124047] Thu, 08 January 2009 23:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

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@atc.tcs.com> wrote in message
news:gk5j13$p3n$1@build.eclipse.org...
> 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@atc.tcs.com> wrote in message
> news:gk5ilu$kfp$1@build.eclipse.org...
>>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@atc.tcs.com> wrote in message
>> news:gk5hka$pl$1@build.eclipse.org...
>>> 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.
>>>
>>>
>>
>>
>
>
Re: Equinox Transforms [message #124169 is a reply to message #124034] Fri, 09 January 2009 22:10 Go to previous message
Eclipse UserFriend
Originally posted by: kathir.atc.tcs.com

"news.eclipse.org" <kathir@atc.tcs.com> wrote in message
news:gk5ilu$kfp$1@build.eclipse.org...
>I got the xslt working. Just didn't do the "add required plugins" before
> launching it.
>
Sorry..I got excited when i saw something running and realized it didnt
really work for me. How do i check the whether xslt example is working or
not.

Kathir.


> Any suggestions for 2 & 3 ?
> Kathir."news.eclipse.org" <kathir@atc.tcs.com> wrote in message
> news:gk5hka$pl$1@build.eclipse.org...
>> 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.
>>
>>
>
>
Previous Topic:Dropins flaky
Next Topic:Fire Events Periodically ??
Goto Forum:
  


Current Time: Fri Apr 26 12:32:56 GMT 2024

Powered by FUDForum. Page generated in 0.03276 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top