[jboss-jira] [JBoss JIRA] Commented: (JBAS-8831) hsqldb-ds.xml connection-url configuration for server mode results in null connection-url
Ales Justin (JIRA)
jira-events at lists.jboss.org
Thu Jan 27 08:14:03 EST 2011
[ https://issues.jboss.org/browse/JBAS-8831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578233#comment-12578233 ]
Ales Justin commented on JBAS-8831:
-----------------------------------
>> So I guess, we need a test which is backed by JaxB UnMarshaller.
How do we do this (configure diff parsing mechanism) in AS?
(vs. how we do this in the tests?)
> 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: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Final
> Reporter: jaikiran pai
> Assignee: Ales Justin
>
> 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