Bug 778333 (SOA-818)

Summary: SOA-P server does not define TModel in SOA Software's registry if none exists
Product: [JBoss] JBoss Enterprise SOA Platform 4 Reporter: Jiri Pechanec <jpechane>
Component: JBossESBAssignee: tcunning
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.3 IR4   
Target Milestone: ---   
Target Release: 4.3 CP01   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-818
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-19 19:45:19 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
jbossesb-properties.xml none

Description Jiri Pechanec 2008-09-23 12:48:29 UTC
Date of First Response: 2008-09-24 04:26:48
project_key: SOA

I tried to setup SOA-P to use SOA-Software - attached is jbossesb-properties.xml file with the setup.

The ESB does not start with the exception
java.lang.NullPointerException
	at org.apache.ws.scout.registry.infomodel.ClassificationImpl.setClassificationScheme(ClassificationImpl.java:103)
	at org.apache.ws.scout.registry.LifeCycleManagerImpl.createClassification(LifeCycleManagerImpl.java:198)
	at org.apache.ws.scout.registry.LifeCycleManagerImpl.createClassification(LifeCycleManagerImpl.java:210)
	at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:425)
	at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.registerEPR(JAXRRegistryImpl.java:140)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.internal.soa.esb.services.registry.RegistryService$1.invoke(RegistryService.java:61)
	at $Proxy36.registerEPR(Unknown Source)
	at org.jboss.internal.soa.esb.services.registry.CachingRegistryInterceptor.registerEPR(CachingRegistryInterceptor.java:104)
	at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.registerEPR(InVMRegistryInterceptor.java:51)
	at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.registerEPR(RegistryFactory.java:242)
	at org.jboss.soa.esb.listeners.RegistryUtil.register(RegistryUtil.java:143)
	at org.jboss.soa.esb.listeners.message.MessageAwareListener.doInitialise(MessageAwareListener.java:209)
	at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:133)
	at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:150)
	at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:69)
	at org.jboss.soa.esb.listeners.config.JBoss4ESBDeployment.startService(JBoss4ESBDeployment.java:100)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
	at $Proxy0.start(Unknown Source)
	at org.jboss.system.ServiceController.start(ServiceController.java:417)
	at org.jboss.system.ServiceController.start(ServiceController.java:435)
	at org.jboss.system.ServiceController.start(ServiceController.java:435)
	at org.jboss.system.ServiceController.start(ServiceController.java:435)
	at org.jboss.system.ServiceController.start(ServiceController.java:435)
	at org.jboss.system.ServiceController.start(ServiceController.java:435)
	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy4.start(Unknown Source)
	at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy52.start(Unknown Source)
	at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy9.deploy(Unknown Source)
	at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
	at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
	at $Proxy0.start(Unknown Source)
	at org.jboss.system.ServiceController.start(ServiceController.java:417)
	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy4.start(Unknown Source)
	at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
	at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
	at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
	at $Proxy5.deploy(Unknown Source)
	at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
	at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
	at org.jboss.Main.boot(Main.java:200)
	at org.jboss.Main$1.run(Main.java:508)
	at java.lang.Thread.run(Thread.java:595)

Current version of Scout is RC2 and is aspectized using JBossESB project. This prevents to use scout snapshot jar file provided by TomC in JBQA-1587.
It seems that SOA-632 and the updated Scout did not get to SOA-P

Comment 1 Jiri Pechanec 2008-09-23 12:48:55 UTC
Link: Added: This issue is related to JBQA-1587


Comment 2 Jiri Pechanec 2008-09-23 12:49:30 UTC
Link: Added: This issue is related to SOA-632


Comment 3 Jiri Pechanec 2008-09-23 12:50:32 UTC
Attachment: Added: jbossesb-properties.xml


Comment 4 Kevin Conner 2008-09-24 08:26:48 UTC
The stacktrace would suggest that the database has not been initialised correctly, specifically that the classification scheme cannot be located.

From the scout code

    public void setClassificationScheme(ClassificationScheme cscheme)
            throws JAXRException
    {
        scheme = cscheme;

        /*
         * not 100% clear, but I *think* the JavaDoc indicates that if
         * our internality dictates that of the scheme.
         */

103:       ((ClassificationSchemeImpl) scheme).setExternal(isExternal());
    }

So scheme must be null.

    public Classification createClassification(ClassificationScheme scheme,
                                               InternationalString name,
                                               String value) throws JAXRException {
        Classification cl = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
198:        cl.setClassificationScheme(scheme);
        cl.setName(name);
        cl.setValue(value);

        ((ClassificationImpl) cl).setExternal(true);

        return cl;
    }

    public Classification createClassification(ClassificationScheme scheme,
                                               String name, String value)
            throws JAXRException {
210:        return createClassification(scheme, this.createInternationalString(name), value);
    }

So this value of scheme has come from the JAXRegistryImpl

            ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:category");
            Collection<Classification> classifications = new ArrayList<Classification>();
425:            Classification classification =
                blm.createClassification(
                  cScheme,
                  "category", category );

So the scheme is obtained from scout/jUDDI and would appear to be null.

Does this classification exist in the jUDDI database?  If not, why not?



Comment 5 Kevin Conner 2008-09-24 15:46:35 UTC
The above questions are really targeted at the SOA Software configuration and not jUDDI.



Comment 6 Jeff DeLong 2008-09-24 18:12:57 UTC
How is this classification created in the UDDI directory? Is the ESB supposed to create it at startup time? 

Comment 7 Jeff DeLong 2008-09-24 19:09:10 UTC
Do we need to setup categories, etc in SOA Software before starting up the ESB. Similar to how the jUDDI database is initialized?

Comment 8 Kevin Conner 2008-09-24 19:16:23 UTC
When running against jUDDI it is populated using the import.sql script under jbossesb.sar/juddi-sql.  This would be executed, along with the creation script, if it is detected that the tables do not exist.

Tom Cunningham says that SOA Software have similar scripts so I have asked him to check if they are initialising our data.

Ideally we should be handling this but it doesn't look like we are at present.

Comment 9 tcunning 2008-09-25 20:00:37 UTC
We need to do the following:

In SOA Software's GUI, go to Configure -> tModel
Add a new tModel with "org.jboss.soa.esb.:category" for both Name and Description.      Do not add a Key, or either of the Overview Document fields.

This gets us past the error above.      dev76 (the machine that is being used for this test) still needs to be patched to SM 5.2 v1.1 for this to be a valid test - it contains fixes that we need.

Comment 10 Kevin Conner 2008-09-25 20:38:19 UTC
Tom, is there any way that this can be handled automatically?

Comment 11 tcunning 2008-09-26 05:14:53 UTC
Link: Added: This issue depends JBESB-2072


Comment 12 tcunning 2008-09-26 05:16:50 UTC
Logged JBESB-2072 for Kevin's suggestion.

dev76 is now working - Len installed the SM5.2 v1.1 patch. 

Comment 13 tcunning 2008-10-15 15:22:41 UTC
Add ClassificationScheme if none exists.

Comment 14 tcunning 2008-12-16 10:00:59 UTC
Link: Added: This issue is duplicated by SOA-1070


Comment 15 Len DiMaggio 2009-03-12 19:16:08 UTC
Steps to verify:

If you don't a TModel in SOA Software's registry, it'll create one for you automatically
Re-set-up SOA Software, run through the SOA Software Integration guide and see if it works



Comment 17 Len DiMaggio 2009-03-19 19:45:19 UTC
Verified with 4.3 CP01 CR4