1 Reply Latest reply on Jul 31, 2012 5:02 PM by pugsherpa

    Datasource Parsing Error - IllegalArgumentException: newValue is null

    pugsherpa Newbie

      When I try to start the server standalone, I get the following error....

       

      {code}

      11:26:57,744 ERROR [org.jboss.as.server] JBAS015956: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration

              at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

      Caused by: java.lang.IllegalArgumentException: newValue is null

              at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:784)

      {code}

       

      I've tried going through the documenation here:  http://docs.jboss.org/ironjacamar/userguide/1.0/en-US/html/deployment.html#deployingds_descriptor

      but the documentation doesn't say which deployment properties are required and which are optional.  I know that some value is missing from my datasource declaration but I don't know what it is.  This error "newValue is null" is significantly less helpful than the other configuration parsing error messages I've seen up until this point.  Most of the error messages I've seen told me exactly what was missing or which element was having the problem.  This one is a mystery to me.

       

      Here's the datasource def:

       

      {code:xml}

      <datasource jndi-name="java:/ourapp/LoginDataSource" enabled="true" use-java-context="false">

           <connection-url>${db.url}</connection-url>

           <driver>oracle</driver>

           <security>

                <user-name>${user}</user-name>

                <password>${pw}</password>

           </security>

           <validation>

                <exception-sorter>org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter</exception-sorter>

           </validation>

      </datasource>

      {code}

        • 1. Re: Datasource Parsing Error - IllegalArgumentException: newValue is null
          pugsherpa Newbie

          Found it.  pool-name attribute is required.  I wish the documentation was better written.  I shouldn't have to comb through the schema to find out how to configure this product.  Especially since it wasn't required in the previous version of Jboss that we were using.

           

           

          {code:xml}
          <datasource jndi-name="java:/ourapp/LoginDataSource" pool-name="login-datasource" enabled="true" use-java-context="false">


               <connection-url>${db.url}</connection-url>


               <driver>oracle</driver>


               <security>


                    <user-name>${user}</user-name>


                    <password>${pw}</password>


               </security>


               <validation>


                    <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>


               </validation>


          </datasource>


          {code}

           

          I'd request that you fix the error message in future releases to make them match the more informative errors thrown when other configuration parsing errors occur.  Like this one:

           

           

          {code}

          Message: JBAS014724: Missing required attribute(s): class-name

          {code}