Affects: Documentation (Ref Guide, User Guide, etc.), Release Notes project_key: SOA jUDDI integration test suite passes, but during server shutdown a NullPointerException is thrown. See attached server log for more information. The fact that Hibernate repopulates the jUDDI schema (see comments for explanation) has uncovered a new problem. JAXRRegistryImpl tries to retrieve the jboss ESB tModel via it's findService method. If it does not find it then it saves a new record to the database. The problem is that even after a successful save operation the tModel just is not in the database. This problem exists regardless weather we use a datasource in persistence.xml or direct jdbc. JAXRRegistryImpl.java code snipp: // Will be null because the schema is not in the database. ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, orgCategory); Collection<Classification> classifications = new ArrayList<Classification>(); // If the scheme returned null, then we have to create a org.jboss.soa.esb.:category scheme to use if (cScheme == null) { try { ClassificationScheme scheme = blm.createClassificationScheme(orgCategory, orgCategory); ArrayList<ClassificationScheme> cSchemes = new ArrayList<ClassificationScheme>(); cSchemes.add(scheme); // scheme was not found so save it !!! BulkResponse br = blm.saveClassificationSchemes(cSchemes); } catch (Exception e) { throw new JAXRException(e); } // Wow. The scheme is still null here. cScheme = bqm.findClassificationSchemeByName(findQualifiers, orgCategory); } How to reproduce: ----------------------- 1) Reconfigure jUDDI in SOA-P to provide db connections outside the container. 2) Pick an API jUDDI test from juddi-core 3) Add jbossesb-registry.sar/juddi_config to class-path so hibernate can pick up it's config file. 4) Run the test 5) Shutdown the server with ctrl+c and look out for a NullPointerException.
Attachment: Added: server.log
The jbossesb tModel is lost from DB after any DB write initiated from an jUDDI integration test. The JAXRRegistryImpl.findService() attempts to save the tModel during server shutdown when the tModel is not found, but even after the save is made the tModel is not in the database.
We loose the jboss esb tModel because jUDDI during startup does not find the "root" publisher in the DB and runs the whole registration process again. During the registration process it uses the juddi_custom_install_data from juddi_core-3.x.x.jar file which does not include the jboss esb data. The final question is why it is unable to find the "root" publisher.
The cause why we loose the jboss esb tModel is caused by hibernate - The whole jUDDI database schema is redeployed by hibernate due hibernate.hbm2ddl.auto=create parameter, when a new EntityManager object is created by Install.alreadyInstalled() method and the configuration is picked up. This is not a problem.
Affects: Added: [Documentation (Ref Guide, User Guide, etc.), Release Notes]
Attached reproducer. 1) setup properties in quickstarts.properties file. 2) ant customize-server (enabled out of container juddi connections) 3) start server 4) ant test
Attachment: Added: soa1921demo.zip
Verified in version 5.1.0.ER2