[ 
https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661170#action_12661170
 ] 

B.J. Reed commented on GERONIMODEVTOOLS-547:
--------------------------------------------

Hi Delos, I applied your 547 patch to my latest GEP trunk and tried to use it 
with the 2.2 snapshot server.  To start with, I was getting a 
NullPointerException in the ServerPluginManager constructor because the server 
variable hadn't been set yet.  So I moved the bulk of the constructor to the 
serverChanged method.  Now I get the following stack trace:

java.lang.IllegalArgumentException: Cannot find matching method/constructor
        at 
org.apache.geronimo.system.plugin.PluginInstallerGBean$$EnhancerByCGLIB$$8fe213ef$$FastClassByCGLIB$$df601166.newInstance(<generated>)
        at net.sf.cglib.reflect.FastClass.newInstance(FastClass.java:91)
        at 
org.apache.geronimo.kernel.basic.BasicProxyManager$ManagedProxyFactory.createProxy(BasicProxyManager.java:213)
        at 
org.apache.geronimo.kernel.basic.BasicProxyManager.createProxy(BasicProxyManager.java:103)
        at 
org.apache.geronimo.system.jmx.KernelDelegate.getGBean(KernelDelegate.java:106)
        at 
org.apache.geronimo.st.v21.core.operations.GeronimoServerPluginManager.serverChanged(GeronimoServerPluginManager.java:100)
        at 
org.apache.geronimo.st.v21.ui.actions.LaunchGeronimoPluginManagerAction.selectionChanged(LaunchGeronimoPluginManagerAction.java:84)
        at 
org.eclipse.ui.internal.PluginAction.refreshEnablement(PluginAction.java:206)
        at 
org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:126)
        at 
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:223)
        at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
        at 
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
        at 
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
        at 
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
        at 
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at 
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at 
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
        at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at 
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
        at 
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
        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)

and the pluginInstaller variable remains null so it can't be used later (like 
in the getPluginMetadata method).  Can you take another look at this?

Thanks.

> code cleanup on Server Plugin Manager
> -------------------------------------
>
>                 Key: GERONIMODEVTOOLS-547
>                 URL: 
> https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-547
>             Project: Geronimo-Devtools
>          Issue Type: Sub-task
>          Components: eclipse-plugin
>    Affects Versions: 2.2.0, 2.1.4
>            Reporter: B.J. Reed
>            Assignee: B.J. Reed
>            Priority: Minor
>             Fix For: 2.2.0, 2.1.4
>
>         Attachments: 547.patch
>
>
> From the initial version of the Server Plugin Manager, there are several 
> things that can be streamlined.
> 1. use geronimo-system.jar file instead of the jaxbmodels 
> (org.apache.geronimo.jee.plugin).  When I tried to use the .jar file, I kept 
> get exceptions that ObjectFactory could not be found.  As it is now, the 
> org.apache.geronimo.jee.plugin classes are exact duplicates of what is in the 
> geronimo-system.jar file
> 2. GeronimoServerPluginManager.java should use PluginInstallerGbean.  This 
> will cut down on a lot of methods that were duplicated into this class.
> 3. Other methods in GeronimoServerPluginManager.java can probably make other 
> calls to the jar files that we already are bringing into the GEP.
> All of this will make the code much slimmer and re-use a lot of good code.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to