You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tanner Postert <ta...@gmail.com> on 2011/01/14 19:49:49 UTC

No system property or default value specified for...

I'm trying to dynamically add a core to a multi core system using the
following command:

http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceDir=items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=true

the data-config.xml looks like this:

<dataConfig>
  <dataSource type="JdbcDataSource"
   url="jdbc:mysql://localhost/"
   ...
   name="server"/>
  <document name="items">
   <entity dataSource="server" name="locals"
       query="select code from master.locals"
       rootEntity="false">
    <entity dataSource="server" name="item"
        query="select '${local.code}' as localcode,
        items.*
FROM ${local.code}_meta.item
WHERE
  item.lastmodified > '${dataimporter.last_index_time}'
OR
  '${dataimporter.request.clean}' != 'false'
order by item.objid"
/>
</entity>
</document>
</dataConfig>

this same configuration works for a core that is already imported into the
system, but when trying to add the core with the above command I get the
following error:

No system property or default value specified for local.code

so I added a <property/> tag in the solr.xml figuring that it needed some
type of default value for this to work, then I restarted solr, but now when
I try the import I get:

No system property or default value specified for
dataimporter.last_index_time

Do I have to define a default value for every variable I will conceivably
use for future cores? is there a way to bypass this error?

Thanks in advance

Re: No system property or default value specified for...

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm trying to dynamically add a core to a multi core system using the
: following command:
: 
: http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceDir=items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=true
: 
: the data-config.xml looks like this:
: 
: <dataConfig>

I think you are using the config param incorrectly -- it should be the 
solrconfig.xml file you want to use (assuming you don't want the one found 
in the "conf" directory of your instanceDir)

that's the reason you are getting errors about needing to specify system 
props or default values for all those variables, because if that file was 
a solrconfig.xml file they must be specified before the SolrCore can be 
initialized -- but for a DIH data configs that's not neccessary.


-Hoss

Re: No system property or default value specified for...

Posted by Markus Jelsma <ma...@openindex.io>.
Ok, have you defined dataimporter.last_index_time in solr.xml or 
solrcore.properties? If not, then you can either define the default value or 
set it in solrcore.properties or solr.xml.

Maybe a catch up on the wiki clears things up:
http://wiki.apache.org/solr/SolrConfigXml#System_property_substitution

> there error I am getting is that I have no default value
> for ${dataimporter.last_index_time}
> 
> should I just define 0000-00-00 00:00:00 as the default for that field?
> 
> On Wed, Jan 19, 2011 at 12:45 PM, Markus Jelsma
> 
> <ma...@openindex.io>wrote:
> > No, you only need defaults if you use properties that are not defined in
> > solr.xml or solrcore.properties.
> > 
> > What would the value for local.core be if you don't define it anyway and
> > you
> > don't specify a default? Quite unpredictable i gues =)
> > 
> > > i even have to define default values for the dataimport.delta values?
> > 
> > that
> > 
> > > doesn't seem right
> > > 
> > > On Wed, Jan 19, 2011 at 11:57 AM, Markus Jelsma
> > > 
> > > <ma...@openindex.io>wrote:
> > > > Hi,
> > > > 
> > > > I'm unsure if i completely understand but you first had the error for
> > > > local.code and then set the property in solr.xml? Then of course it
> > 
> > will
> > 
> > > > give
> > > > an error for the next undefined property that has no default set.
> > > > 
> > > > If you use a property without default it _must_ be defined in
> > > > solr.xml
> > 
> > or
> > 
> > > > solrcore.properties. And since you don't use defaults in your
> > 
> > dataconfig
> > 
> > > > they
> > > > all must be explicitely defined.
> > > > 
> > > > This is proper behaviour.
> > > > 
> > > > Cheers,
> > > > 
> > > > > I'm trying to dynamically add a core to a multi core system using
> > > > > the
> > 
> > > > > following command:
> > http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceD
> > 
> > > > ir
> > 
> > =items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=tr
> > 
> > > > > ue
> > > > > 
> > > > > the data-config.xml looks like this:
> > > > > 
> > > > > <dataConfig>
> > > > > 
> > > > >   <dataSource type="JdbcDataSource"
> > > > >   
> > > > >    url="jdbc:mysql://localhost/"
> > > > >    ...
> > > > >    name="server"/>
> > > > >   
> > > > >   <document name="items">
> > > > >   
> > > > >    <entity dataSource="server" name="locals"
> > > > >    
> > > > >        query="select code from master.locals"
> > > > >        rootEntity="false">
> > > > >     
> > > > >     <entity dataSource="server" name="item"
> > > > >     
> > > > >         query="select '${local.code}' as localcode,
> > > > >         items.*
> > > > > 
> > > > > FROM ${local.code}_meta.item
> > > > > WHERE
> > > > > 
> > > > >   item.lastmodified > '${dataimporter.last_index_time}'
> > > > > 
> > > > > OR
> > > > > 
> > > > >   '${dataimporter.request.clean}' != 'false'
> > > > > 
> > > > > order by item.objid"
> > > > > />
> > > > > </entity>
> > > > > </document>
> > > > > </dataConfig>
> > > > > 
> > > > > this same configuration works for a core that is already imported
> > 
> > into
> > 
> > > > the
> > > > 
> > > > > system, but when trying to add the core with the above command I
> > > > > get the following error:
> > > > > 
> > > > > No system property or default value specified for local.code
> > > > > 
> > > > > so I added a <property/> tag in the solr.xml figuring that it
> > > > > needed some type of default value for this to work, then I
> > > > > restarted solr, but now
> > > > 
> > > > when
> > > > 
> > > > > I try the import I get:
> > > > > 
> > > > > No system property or default value specified for
> > > > > dataimporter.last_index_time
> > > > > 
> > > > > Do I have to define a default value for every variable I will
> > > > > conceivably use for future cores? is there a way to bypass this
> > 
> > error?
> > 
> > > > > Thanks in advance

Re: No system property or default value specified for...

Posted by Tanner Postert <ta...@gmail.com>.
there error I am getting is that I have no default value
for ${dataimporter.last_index_time}

should I just define 0000-00-00 00:00:00 as the default for that field?

On Wed, Jan 19, 2011 at 12:45 PM, Markus Jelsma
<ma...@openindex.io>wrote:

> No, you only need defaults if you use properties that are not defined in
> solr.xml or solrcore.properties.
>
> What would the value for local.core be if you don't define it anyway and
> you
> don't specify a default? Quite unpredictable i gues =)
>
> > i even have to define default values for the dataimport.delta values?
> that
> > doesn't seem right
> >
> > On Wed, Jan 19, 2011 at 11:57 AM, Markus Jelsma
> >
> > <ma...@openindex.io>wrote:
> > > Hi,
> > >
> > > I'm unsure if i completely understand but you first had the error for
> > > local.code and then set the property in solr.xml? Then of course it
> will
> > > give
> > > an error for the next undefined property that has no default set.
> > >
> > > If you use a property without default it _must_ be defined in solr.xml
> or
> > > solrcore.properties. And since you don't use defaults in your
> dataconfig
> > > they
> > > all must be explicitely defined.
> > >
> > > This is proper behaviour.
> > >
> > > Cheers,
> > >
> > > > I'm trying to dynamically add a core to a multi core system using the
> > >
> > > > following command:
> > >
> http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceD
> > > ir
> > >
> > > >
> =items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=tr
> > > > ue
> > > >
> > > > the data-config.xml looks like this:
> > > >
> > > > <dataConfig>
> > > >
> > > >   <dataSource type="JdbcDataSource"
> > > >
> > > >    url="jdbc:mysql://localhost/"
> > > >    ...
> > > >    name="server"/>
> > > >
> > > >   <document name="items">
> > > >
> > > >    <entity dataSource="server" name="locals"
> > > >
> > > >        query="select code from master.locals"
> > > >        rootEntity="false">
> > > >
> > > >     <entity dataSource="server" name="item"
> > > >
> > > >         query="select '${local.code}' as localcode,
> > > >         items.*
> > > >
> > > > FROM ${local.code}_meta.item
> > > > WHERE
> > > >
> > > >   item.lastmodified > '${dataimporter.last_index_time}'
> > > >
> > > > OR
> > > >
> > > >   '${dataimporter.request.clean}' != 'false'
> > > >
> > > > order by item.objid"
> > > > />
> > > > </entity>
> > > > </document>
> > > > </dataConfig>
> > > >
> > > > this same configuration works for a core that is already imported
> into
> > >
> > > the
> > >
> > > > system, but when trying to add the core with the above command I get
> > > > the following error:
> > > >
> > > > No system property or default value specified for local.code
> > > >
> > > > so I added a <property/> tag in the solr.xml figuring that it needed
> > > > some type of default value for this to work, then I restarted solr,
> > > > but now
> > >
> > > when
> > >
> > > > I try the import I get:
> > > >
> > > > No system property or default value specified for
> > > > dataimporter.last_index_time
> > > >
> > > > Do I have to define a default value for every variable I will
> > > > conceivably use for future cores? is there a way to bypass this
> error?
> > > >
> > > > Thanks in advance
>

Re: No system property or default value specified for...

Posted by Markus Jelsma <ma...@openindex.io>.
No, you only need defaults if you use properties that are not defined in 
solr.xml or solrcore.properties.

What would the value for local.core be if you don't define it anyway and you 
don't specify a default? Quite unpredictable i gues =)

> i even have to define default values for the dataimport.delta values? that
> doesn't seem right
> 
> On Wed, Jan 19, 2011 at 11:57 AM, Markus Jelsma
> 
> <ma...@openindex.io>wrote:
> > Hi,
> > 
> > I'm unsure if i completely understand but you first had the error for
> > local.code and then set the property in solr.xml? Then of course it will
> > give
> > an error for the next undefined property that has no default set.
> > 
> > If you use a property without default it _must_ be defined in solr.xml or
> > solrcore.properties. And since you don't use defaults in your dataconfig
> > they
> > all must be explicitely defined.
> > 
> > This is proper behaviour.
> > 
> > Cheers,
> > 
> > > I'm trying to dynamically add a core to a multi core system using the
> > 
> > > following command:
> > http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceD
> > ir
> > 
> > > =items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=tr
> > > ue
> > > 
> > > the data-config.xml looks like this:
> > > 
> > > <dataConfig>
> > > 
> > >   <dataSource type="JdbcDataSource"
> > >   
> > >    url="jdbc:mysql://localhost/"
> > >    ...
> > >    name="server"/>
> > >   
> > >   <document name="items">
> > >   
> > >    <entity dataSource="server" name="locals"
> > >    
> > >        query="select code from master.locals"
> > >        rootEntity="false">
> > >     
> > >     <entity dataSource="server" name="item"
> > >     
> > >         query="select '${local.code}' as localcode,
> > >         items.*
> > > 
> > > FROM ${local.code}_meta.item
> > > WHERE
> > > 
> > >   item.lastmodified > '${dataimporter.last_index_time}'
> > > 
> > > OR
> > > 
> > >   '${dataimporter.request.clean}' != 'false'
> > > 
> > > order by item.objid"
> > > />
> > > </entity>
> > > </document>
> > > </dataConfig>
> > > 
> > > this same configuration works for a core that is already imported into
> > 
> > the
> > 
> > > system, but when trying to add the core with the above command I get
> > > the following error:
> > > 
> > > No system property or default value specified for local.code
> > > 
> > > so I added a <property/> tag in the solr.xml figuring that it needed
> > > some type of default value for this to work, then I restarted solr,
> > > but now
> > 
> > when
> > 
> > > I try the import I get:
> > > 
> > > No system property or default value specified for
> > > dataimporter.last_index_time
> > > 
> > > Do I have to define a default value for every variable I will
> > > conceivably use for future cores? is there a way to bypass this error?
> > > 
> > > Thanks in advance

Re: No system property or default value specified for...

Posted by Tanner Postert <ta...@gmail.com>.
i even have to define default values for the dataimport.delta values? that
doesn't seem right

On Wed, Jan 19, 2011 at 11:57 AM, Markus Jelsma
<ma...@openindex.io>wrote:

> Hi,
>
> I'm unsure if i completely understand but you first had the error for
> local.code and then set the property in solr.xml? Then of course it will
> give
> an error for the next undefined property that has no default set.
>
> If you use a property without default it _must_ be defined in solr.xml or
> solrcore.properties. And since you don't use defaults in your dataconfig
> they
> all must be explicitely defined.
>
> This is proper behaviour.
>
> Cheers,
>
> > I'm trying to dynamically add a core to a multi core system using the
> > following command:
> >
> >
> http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceDir
> > =items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=true
> >
> > the data-config.xml looks like this:
> >
> > <dataConfig>
> >   <dataSource type="JdbcDataSource"
> >    url="jdbc:mysql://localhost/"
> >    ...
> >    name="server"/>
> >   <document name="items">
> >    <entity dataSource="server" name="locals"
> >        query="select code from master.locals"
> >        rootEntity="false">
> >     <entity dataSource="server" name="item"
> >         query="select '${local.code}' as localcode,
> >         items.*
> > FROM ${local.code}_meta.item
> > WHERE
> >   item.lastmodified > '${dataimporter.last_index_time}'
> > OR
> >   '${dataimporter.request.clean}' != 'false'
> > order by item.objid"
> > />
> > </entity>
> > </document>
> > </dataConfig>
> >
> > this same configuration works for a core that is already imported into
> the
> > system, but when trying to add the core with the above command I get the
> > following error:
> >
> > No system property or default value specified for local.code
> >
> > so I added a <property/> tag in the solr.xml figuring that it needed some
> > type of default value for this to work, then I restarted solr, but now
> when
> > I try the import I get:
> >
> > No system property or default value specified for
> > dataimporter.last_index_time
> >
> > Do I have to define a default value for every variable I will conceivably
> > use for future cores? is there a way to bypass this error?
> >
> > Thanks in advance
>

Re: No system property or default value specified for...

Posted by Markus Jelsma <ma...@openindex.io>.
Hi,

I'm unsure if i completely understand but you first had the error for 
local.code and then set the property in solr.xml? Then of course it will give 
an error for the next undefined property that has no default set.

If you use a property without default it _must_ be defined in solr.xml or 
solrcore.properties. And since you don't use defaults in your dataconfig they 
all must be explicitely defined.

This is proper behaviour.

Cheers,

> I'm trying to dynamically add a core to a multi core system using the
> following command:
> 
> http://localhost:8983/solr/admin/cores?action=CREATE&name=items&instanceDir
> =items&config=data-config.xml&schema=schema.xml&dataDir=data&persist=true
> 
> the data-config.xml looks like this:
> 
> <dataConfig>
>   <dataSource type="JdbcDataSource"
>    url="jdbc:mysql://localhost/"
>    ...
>    name="server"/>
>   <document name="items">
>    <entity dataSource="server" name="locals"
>        query="select code from master.locals"
>        rootEntity="false">
>     <entity dataSource="server" name="item"
>         query="select '${local.code}' as localcode,
>         items.*
> FROM ${local.code}_meta.item
> WHERE
>   item.lastmodified > '${dataimporter.last_index_time}'
> OR
>   '${dataimporter.request.clean}' != 'false'
> order by item.objid"
> />
> </entity>
> </document>
> </dataConfig>
> 
> this same configuration works for a core that is already imported into the
> system, but when trying to add the core with the above command I get the
> following error:
> 
> No system property or default value specified for local.code
> 
> so I added a <property/> tag in the solr.xml figuring that it needed some
> type of default value for this to work, then I restarted solr, but now when
> I try the import I get:
> 
> No system property or default value specified for
> dataimporter.last_index_time
> 
> Do I have to define a default value for every variable I will conceivably
> use for future cores? is there a way to bypass this error?
> 
> Thanks in advance