[jboss-jira] [JBoss JIRA] Reopened: (JBAS-8831) hsqldb-ds.xml connection-url configuration for server mode results in null connection-url

Jason Greene (JIRA) jira-events at lists.jboss.org
Thu Apr 21 14:26:38 EDT 2011


     [ https://issues.jboss.org/browse/JBAS-8831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason Greene reopened JBAS-8831:
--------------------------------



Due to feedback from the community, I have split the AS7 and AS6 projects and reopened all unscheduled AS6 issues that are a year or less old. This will make it easier community members to find and work on them.

Future releases beyond 6.1 can be done provided a community member steps up to coordinate them.

> hsqldb-ds.xml connection-url configuration for server mode results in null connection-url
> -----------------------------------------------------------------------------------------
>
>                 Key: JBAS-8831
>                 URL: https://issues.jboss.org/browse/JBAS-8831
>             Project: Legacy JBoss Application Server 6 
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 6.0.0.Final
>            Reporter: jaikiran pai
>            Assignee: Ales Justin
>             Fix For: No Release
>
>         Attachments: JMX_JAXB_usage.patch
>
>
> The hsqldb-ds.xml has sections which need to be uncommented (and some commented) to enable server mode HSQL DB server. Additionally, a section in the bindings-jboss-beans.xml in JBOSS_HOME/server/<servername>/conf/bindingservice.beans needs to be uncommented too.
> The part which fails is:
>  <connection-url>
>           <value-factory bean="ServiceBindingManager" method="getStringBinding">
>              <parameter>jboss:service=Hypersonic</parameter>
>              <parameter>jdbc:hsqldb:hsql://${hostforurl}:${port}</parameter>
>           </value-factory>
>       </connection-url>
> The exception is:
> Caused by: org.jboss.resource.JBossResourceException: connectionURL is null
> 	at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createConnectionFactory(LocalManagedConnectionFactory.java:90) [:6.0.0.Final]
> 	at org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.createConnectionFactory(ConnectionFactoryBindingService.java:141) [:6.0.0.Final]
> 	... 79 more
> The root cause is that the code ends up calling the wrong method on ServiceBindingManger. Instead of calling the getStringBinding with 2 parameters, it ends up calling the getStringBinding with just the single (service name) parameter. 
> The code which parses the parameters, is in org.jboss.system.metadata.ServiceMetaDataParser:
> private ServiceValueMetaData parseValueFactory(Element el) throws Exception
>    {
>       ...
>       List<ServiceValueFactoryParameterMetaData> parameters = new ArrayList<ServiceValueFactoryParameterMetaData>();
>       attr = el.getAttributeNode("parameter");
>       if (attr != null)
>       {
>          parameters.add(new ServiceValueFactoryParameterMetaData(attr.getValue()));
>       }
>       else
>       {
>          NodeList children = el.getChildNodes();
>          for (int j = 0; j < children.getLength(); j++)
>          {
>             // skip over non-element nodes
>             if (children.item(j).getNodeType() != Node.ELEMENT_NODE)
>                continue;
>             Element child = (Element) children.item(j);
>             if ("parameter".equals(child.getTagName()))
>             {
>                parameters.add(parseValueFactoryParameter(child));
>             }
>          }
>       }
> ....
> The code never enters the else part for that above xml configuration. I haven't looked into the details of that getAttributeNode API, but it appears like a bug to me in the xerces impl (i might be wrong), since "parameter" isn't really an attribute.
> Assigning this to Ales for now, since that class lies within jboss-jmx-mc-int project.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list