Bug 779312 (SOA-1700)

Summary: JUDDI InquiryServiceImpl is unable to handle empty business entities.
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Marek Baluch <mbaluch>
Component: jUDDI - within SOAAssignee: Kurt Stam <kurt.stam>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.0 ER5   
Target Milestone: ---   
Target Release: 5.1.0 GA   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1700
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-11 07:00:36 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:

Description Marek Baluch 2009-12-10 08:19:13 UTC
Date of First Response: 2010-01-05 10:08:14
project_key: SOA

When a BusinessEntity which doesn't define any BusinessService objects is saved to jUDDI then a NullPointerException will be thrown on an attempt to view the business entity properties in jUDDI console. The following exception is present in server log:

08:36:58,448 ERROR [InquiryServiceImpl] Could not obtain token. null
java.lang.NullPointerException
	at org.apache.juddi.portlets.server.service.InquiryServiceImpl.getBusinessDetail(InquiryServiceImpl.java:151)
	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:597)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)

I've used the following code to add the business entity to jUDDI registry:

        private static UDDISecurityPortType security;

        // some left out code ...

        public void addBusinessEntity() throws Exception {
                UDDIPublicationPortType pubPort = (UDDIPublicationPortType) testServices.lookup("juddiv3/UDDIPublicationService"); 
                assert(pubPort != null);
		
                Name name = new Name();
                name.setValue("Special Node");
		
                BusinessEntity businessEntity = new BusinessEntity();
                businessEntity.setBusinessKey("uddi:juddi.apache.org:special");
                businessEntity.getName().add(name);
                /* if BusinessServices is not added NullPointerException will be thrown on an attempt in console to view the business.
                BusinessServices must contain at least one BusinessService */
                //businessEntity.setBusinessServices(someBusinessServices);
		
                SaveBusiness saveBusiness = new SaveBusiness();
                saveBusiness.setAuthInfo(getAuthInfo());
                saveBusiness.getBusinessEntity().add(businessEntity);
                
                pubPort.saveBusiness(saveBusiness);
        }
       
         private static String getAuthInfo() throws Exception {
                GetAuthToken getAuthToken = new GetAuthToken();
                getAuthToken.setUserID("root");
                getAuthToken.setCred("");
                
                AuthToken authToken = security.getAuthToken(getAuthToken);
                
                return authToken.getAuthInfo();
        }

----------

This issue depends on https://issues.apache.org/jira/browse/JUDDI-319

Comment 1 Jiri Pechanec 2010-01-05 15:08:14 UTC
This issue has direst impact on SOA-P as services resolver, transform, error and byteArray are affected by it

Comment 2 Kurt Stam 2010-01-05 15:35:13 UTC
http://issues.apache.org/jira/browse/JUDDI-319, fixed on the trunk.

Comment 3 Julian Coleman 2010-02-03 12:45:04 UTC
The linked JIRA is resolved with jUDDI 3.0.1, which is incorporated into 5.0.0.ER8.

Comment 4 Marek Baluch 2010-02-03 13:55:11 UTC
Veriefied on ER8.

Comment 5 Marek Baluch 2010-02-03 14:24:08 UTC
Reopening ... for more info see JUDDI-319.

Comment 6 Kurt Stam 2010-02-03 14:49:09 UTC
Looks like this one is in the console rather then than on the server. We misunderstood and we still need to fix this.

Comment 7 Anne-Louise Tangring 2010-09-21 18:42:45 UTC
This is a SOA 5.1.0 Candidate.

Comment 8 Jiri Sedlacek 2010-10-01 13:01:08 UTC
With SOA-Platform 5.1.0.ER2 there is very similar exception in FindServiceImpl class:

14:55:38,511 ERROR [FindServiceImpl] Could not obtain token. null
java.lang.NullPointerException
	at org.apache.juddi.portlets.server.service.FindServiceImpl.getBusinesses(FindServiceImpl.java:88)
	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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
	at java.lang.Thread.run(Thread.java:636)

You can reproduce it with Marek's code above too.


Comment 10 Jiri Sedlacek 2010-12-07 12:06:22 UTC
verified in SOA-P-5.1.0.ER5

Comment 11 David Le Sage 2011-02-11 06:54:44 UTC
Temporarily reopening to update release note info.

Comment 12 David Le Sage 2011-02-11 06:58:43 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Writer: Added: dlesage
Release Notes Text: Added: https://issues.jboss.org/browse/SOA-1700

If a BusinessEntity which did not define any BusinessService objects was saved to jUDDI, a NullPointerException would be thrown as soon as a user attempted to view that BusinessEntity's properties in the jUDDI Console.  


Comment 13 David Le Sage 2011-02-11 07:00:25 UTC
Release Notes Text: Removed: https://issues.jboss.org/browse/SOA-1700

If a BusinessEntity which did not define any BusinessService objects was saved to jUDDI, a NullPointerException would be thrown as soon as a user attempted to view that BusinessEntity's properties in the jUDDI Console.   Added: https://issues.jboss.org/browse/SOA-1700

If a BusinessEntity which did not define any BusinessService objects was saved to jUDDI, a NullPointerException would be thrown as soon as a user attempted to view that BusinessEntity's properties in the jUDDI Console.  This was due to a bug in the Console.  A code change has been made and, as a result, the users will no longer encounter the NullPointerException in these circumstances.