Bug 829071

Summary: Unable to create ESB deployment
Product: [Other] RHQ Project Reporter: Stefan Negrea <snegrea>
Component: PluginsAssignee: Stefan Negrea <snegrea>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.3CC: hrupp, lzoubek, mvecera, snegrea, tcunning
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 828464 Environment:
Last Closed: 2013-08-31 09:56:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 828464    
Bug Blocks:    

Description Stefan Negrea 2012-06-05 21:41:17 UTC
+++ This bug was initially created as a clone of Bug #828464 +++

Created attachment 589244 [details]
sample ESB deployment

Description of problem: I am not able to create ESB deployment child


Version-Release number of selected component (if applicable):
JON 3.1.CR1+SOA-P 5.3.ER3

How reproducible:always


Steps to Reproduce:
1.import SOA-P server running in default profile
2.you must uncomment admin=admin line in soa-users.properties
3.create new deployment under ESB subsystem
  
Actual results: child creation fails

UI error:
java.lang.NullPointerException
	at org.jbosson.plugins.jbossesb.ESB5Component.createResource(ESB5Component.java:228)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)


Agent error:

2012-06-04 20:37:32,479 INFO  [ResourceFactory.executor-1] (rhq.core.pc.inventory.CreateResourceRunner)- Creating resource through report: CreateResourceReport: ResourceType=[{JBossESB5}Deployment], ResourceKey=[null]
2012-06-04 20:37:32,481 INFO  [ResourceFactory.executor-1] (rhq.core.pc.inventory.CreateResourceRunner)- Sending create response to server: CreateResourceResponse[RequestId=10112, Status=Failure]

Expected results:deployment is created


Additional info:

--- Additional comment from mfoley on 2012-06-04 14:52:02 EDT ---

len or pavel .... comments on this?  can you repro?

--- Additional comment from lzoubek on 2012-06-04 15:35:35 EDT ---

Also .. Connection properties for 'JBoss ESB' subystem are incorrectly detected:
'JBoss Home Directory' and 'Configuration Path' are empty and marked as incorrect.

--- Additional comment from pkralik on 2012-06-05 08:24:34 EDT ---

Created attachment 589516 [details]
JBoss ESB Connection settings error

--- Additional comment from pkralik on 2012-06-05 09:10:05 EDT ---

Reproduced. JON 3.1.0.CR1 and SOA-P 5.3.0.ER3.

JBoss ESB Connection settings error
Manual ESB deployment with JON GUI failed.
I did not experienced java.lang.NullPointerException.

--- Additional comment from pkralik on 2012-06-05 09:18:59 EDT ---

Created attachment 589529 [details]
JBoss ESB > Deployments > Connection settings error

--- Additional comment from lzoubek on 2012-06-05 09:44:32 EDT ---

I've just reproduced it on JON 3.1.CR2

--- Additional comment from tcunning on 2012-06-05 13:36:12 EDT ---

Here's what's failing : 
                          Class remoteIClazz = classLoader.loadClass("org.rhq.plugins.jbossas5.deploy.PackageDownloader");

                          Class remoteDClazz = classLoader.loadClass("org.rhq.plugins.jbossas5.deploy.RemoteDownloader");
                          Constructor remoteDConstructor = remoteDClazz.getDeclaredConstructor(ResourceContext.class, boolean.class, ProfileServiceConnection.class);

                          Class clazz = classLoader.loadClass("org.rhq.plugins.jbossas5.deploy.ManagedComponentDeployer");
                          Constructor constructor = clazz.getDeclaredConstructor(ProfileServiceConnection.class, remoteIClazz);

In JON 3.0, the jbossas5 RemoteDeployer class was removed, which made us have to  try to load & execute its replacement (RemoteDownloader/ManagedComponentDeployer) because we need to maintain compatibility with the AS5 admin-console.   In JON 3.1 we're failing on the getDeclaredConstructor the ManagedComponentDeployer constructor.      My guess is that that class has changed between JON 3.0 and JON 3.1 and that is what is breaking us.

I'll take a look at what's changed there and see if we can patch the ESB plugin to go along with it.

--- Additional comment from snegrea on 2012-06-05 17:39:24 EDT ---

Created a two argument constructor for backwards compatibility. The extra argument is not needed for the way the ESB plugin uses the content system code from the AS5 plugin. The extra constructor was marked as deprecated and is not used anywhere else in the RHQ code.

Comment 2 Pavel Kralik 2012-08-22 13:28:48 UTC
SOA-P 4.3.0.GA_CP5 and JON 3.1.1.ER2:
  
https://brewweb.devel.redhat.com/buildinfo?buildID=228250