NativeException error

Hi All,
I’m working on e-commerce application, which having store, base, cms,
core & admin applications. when I try to start server for store, I’m
getting like below

=> Booting WEBrick…
/Users/projects/My
files/jruby-1.3.1/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails/gem_dependency.rb:224:Warning:
Gem::Dependency#version_requirements= is deprecated and will be removed
on or after August 2010. Use Gem::Dependency.new.
Setting the configuration to development

Initializing M2 indexes …
04-13 06:29:11,874 - Indexer:61 - Store::Base Size = 422
Error trying to build index (for ‘Store::Base’ or Store-Items-All)
#<NativeException: java.lang.NullPointerException: null>
com.sonymusic.smapi.Index.(Index.java:94)
com.sonymusic.smapi.Index.(Index.java:64)
com.sonymusic.smapi.Search.getIndex(Search.java:460)
com.sonymusic.smapi.Search.deleteAll(Search.java:401)
com.sonymusic.smapi.loader.Indexer.indexType(Indexer.java:63)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:302)
done.

=> Rails 2.2.2 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2011-04-13 06:29:32] INFO WEBrick 1.3.1
[2011-04-13 06:29:32] INFO ruby 1.8.6 (2011-04-06) [java]
[2011-04-13 06:29:33] INFO WEBrick::HTTPServer#start: pid=405 port=3000

After that when I try to run it in browser
http://localhost:3000/jennifer-lopez, I’m getting error like below

NativeException in StoresController#show

java.lang.NullPointerException: null

com/sonymusic/smapi/Index.java:94:in ' com/sonymusic/smapi/Index.java:64:in
com/sonymusic/smapi/Search.java:460:in getIndex' com/sonymusic/smapi/Search.java:153:insearch’
sun/reflect/NativeMethodAccessorImpl.java:-2:in invoke0' sun/reflect/NativeMethodAccessorImpl.java:39:ininvoke’
sun/reflect/DelegatingMethodAccessorImpl.java:25:in invoke' java/lang/reflect/Method.java:597:ininvoke’
java/lang/Thread.java:637:in run' ../m2-core/dynamic_document/lib/dynamic_document/base.rb:614:infind’
…/m2-core/models/store/base.rb:81:in find_by_permalink' ../m2-core/models/store/base.rb:85:infind_by_permalink!’
app/controllers/application.rb:77:in current_store' app/controllers/application.rb:222:ininit_locale’

Request

Parameters:

{“store”=>“jennifer-lopez”}

When I try to run in console also I’m getting the same error
“c_s = Store::Base.find_by_permalink(“jennifer-lopez”)”

But when I try to get first element like
c_s = Store::Base.find(:first),

I’m getting all the details as below
“{“id”:“3997588”, “class”: “Store::Large”, “name”:“Jennifer
Lopez Store”,“permalink”:“jennifer-lopez”,“pricing”:{“class”:
“DirectPricing”, “components”: {“currency”:
“USD”}},“template_paths”:[],“assets”:{},“artist_name”:“Whitney
Houston”,“artist_url”:“http://www.whitneyhouston.com”,“test_username”:“kevin”,“test_password”:“costner”,“per_page”:{},“format_selection”:{},“countries”:[“US”],“flags”:{},“first_action_override”:{“id”:
“5354152”, “action”: “show”, “controller”:
“pages”},“compiled_types”:[“Music::Album”, “Music::CompactDisc”,
“Music::Track”],“compiled_tags”:[3909273, 3909279, 3909280, 3909281,
3992337, 3992338, 3999131,
3999132],“tags_by_type”:{},“foreign_locales”:[]}”

Pls help me to correct this.

Thanks in advance
Avantec

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs