Search Results

Search found 18361 results on 735 pages for 'hibernate search'.

Page 79/735 | < Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >

  • Spring transactions not committing

    - by Clinton Bosch
    I am struggling to get my spring managed transactions to commit, could someone please spot what I have done wrong. All my tables are mysql InnonDB tables. My RemoteServiceServlet (GWT) is as follows: public class TrainTrackServiceImpl extends RemoteServiceServlet implements TrainTrackService { @Autowired private DAO dao; @Override public void init(ServletConfig config) throws ServletException { super.init(config); WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext()); AutowireCapableBeanFactory beanFactory = ctx.getAutowireCapableBeanFactory(); beanFactory.autowireBean(this); } @Transactional(propagation= Propagation.REQUIRED, rollbackFor=Exception.class) public UserDTO createUser(String firstName, String lastName, String idNumber, String cellPhone, String email, int merchantId) { User user = new User(); user.setFirstName(firstName); user.setLastName(lastName); user.setIdNumber(idNumber); user.setCellphone(cellPhone); user.setEmail(email); user.setDateCreated(new Date()); Merchant merchant = (Merchant) dao.find(Merchant.class, merchantId); if (merchant != null) { user.setMerchant(merchant); } // Save the user. dao.saveOrUpdate(user); UserDTO dto = new UserDTO(); dto.id = user.getId(); dto.firstName = user.getFirstName(); dto.lastName = user.getLastName(); return dto; } The DAO is as follows: public class DAO extends HibernateDaoSupport { private String adminUsername; private String adminPassword; private String godUsername; private String godPassword; public String getAdminUsername() { return adminUsername; } public void setAdminUsername(String adminUsername) { this.adminUsername = adminUsername; } public String getAdminPassword() { return adminPassword; } public void setAdminPassword(String adminPassword) { this.adminPassword = adminPassword; } public String getGodUsername() { return godUsername; } public void setGodUsername(String godUsername) { this.godUsername = godUsername; } public String getGodPassword() { return godPassword; } public void setGodPassword(String godPassword) { this.godPassword = godPassword; } public void saveOrUpdate(ModelObject obj) { getHibernateTemplate().saveOrUpdate(obj); } And my applicationContext.xml is as follows: <context:annotation-config/> <context:component-scan base-package="za.co.xxx.traintrack.server"/> <!-- Application properties --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>file:${user.dir}/@propertiesFile@</value> </list> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">${connection.dialect}</prop> <prop key="hibernate.connection.username">${connection.username}</prop> <prop key="hibernate.connection.password">${connection.password}</prop> <prop key="hibernate.connection.url">${connection.url}</prop> <prop key="hibernate.connection.driver_class">${connection.driver.class}</prop> <prop key="hibernate.show_sql">${show.sql}</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.c3p0.min_size">5</prop> <prop key="hibernate.c3p0.max_size">20</prop> <prop key="hibernate.c3p0.timeout">300</prop> <prop key="hibernate.c3p0.max_statements">50</prop> <prop key="hibernate.c3p0.idle_test_period">60</prop> </props> </property> <property name="annotatedClasses"> <list> <value>za.co.xxx.traintrack.server.model.Answer</value> <value>za.co.xxx.traintrack.server.model.Company</value> <value>za.co.xxx.traintrack.server.model.CompanyRegion</value> <value>za.co.xxx.traintrack.server.model.Merchant</value> <value>za.co.xxx.traintrack.server.model.Module</value> <value>za.co.xxx.traintrack.server.model.Question</value> <value>za.co.xxx.traintrack.server.model.User</value> <value>za.co.xxx.traintrack.server.model.CompletedModule</value> </list> </property> </bean> <bean id="dao" class="za.co.xxx.traintrack.server.DAO"> <property name="sessionFactory" ref="sessionFactory"/> <property name="adminUsername" value="${admin.user.name}"/> <property name="adminPassword" value="${admin.user.password}"/> <property name="godUsername" value="${god.user.name}"/> <property name="godPassword" value="${god.user.password}"/> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory"> <ref local="sessionFactory"/> </property> </bean> <!-- enable the configuration of transactional behavior based on annotations --> <tx:annotation-driven transaction-manager="transactionManager"/> If I change the sessionFactory property to be autoCommit=true then my object does get persisited. <prop key="hibernate.connection.autocommit">true</prop>

    Read the article

  • How to order results based on number of search term matches?

    - by Travis
    I am using the following tables in mysql to describe records that can have multiple searchtags associated with them: TABLE records ID title desc TABLE searchTags ID name TABLE recordSearchTags recordID searchTagID To SELECT records based on arbitrary search input, I have a statement that looks sort of like this: SELECT recordID FROM recordSearchTags LEFT JOIN searchTags ON recordSearchTags.searchTagID = searchTags.ID WHERE searchTags.name LIKE CONCAT('%','$search1','%') OR searchTags.name LIKE CONCAT('%','$search2','%') OR searchTags.name LIKE CONCAT('%','$search3','%') OR searchTags.name LIKE CONCAT('%','$search4','%'); I'd like to ORDER this resultset, so that rows that match with more search terms are displayed in front of rows that match with fewer search terms. For example, if a row matches all 4 search terms, it will be top of the list. A row that matches only 2 search terms will be somewhere in the middle. And a row that matches just one search term will be at the end. Any suggestions on what is the best way to do this? Thanks!

    Read the article

  • Search function fails because it refers to the wrong controller action?

    - by Christoffer
    My Sunspot search function (sunspot_rails gem) works just fine in my index view, but when I duplicate it to my show view my search breaks... views/supplierproducts/show.html.erb <%= form_tag supplierproducts_path, :method => :get, :id => "supplierproducts_search" do %> <p> <%= text_field_tag :search, params[:search], placeholder: "Search by SKU, product name & EAN number..." %> </p> <div id="supplierproducts"><%= render 'supplierproducts' %></div> <% end %> assets/javascripts/application.js $(function () { $('#supplierproducts th a').live('click', function () { $.getScript(this.href); return false; } ); $('#supplierproducts_search input').keyup(function () { $.get($("#supplierproducts_search").attr("action"), $("#supplierproducts_search").serialize(), null, 'script'); return false; }); }); views/supplierproducts/show.js.erb $('#supplierproducts').html('<%= escape_javascript(render("supplierproducts")) %>'); views/supplierproducts/_supplierproducts.hmtl.erb <%= hidden_field_tag :direction, params[:direction] %> <%= hidden_field_tag :sort, params[:sort] %> <table class="table table-bordered"> <thead> <tr> <th><%= sortable "sku", "SKU" %></th> <th><%= sortable "name", "Product name" %></th> <th><%= sortable "stock", "Stock" %></th> <th><%= sortable "price", "Price" %></th> <th><%= sortable "ean", "EAN number" %></th> </tr> </thead> <% for supplierproduct in @supplier.supplierproducts %> <tbody> <tr> <td><%= supplierproduct.sku %></td> <td><%= supplierproduct.name %></td> <td><%= supplierproduct.stock %></td> <td><%= supplierproduct.price %></td> <td><%= supplierproduct.ean %></td> </tr> </tbody> <% end %> </table> controllers/supplierproducts_controller.rb class SupplierproductsController < ApplicationController helper_method :sort_column, :sort_direction def show @supplier = Supplier.find(params[:id]) @search = @supplier.supplierproducts.search do fulltext params[:search] end @supplierproducts = @search.results end end private def sort_column Supplierproduct.column_names.include?(params[:sort]) ? params[:sort] : "name" end def sort_direction %w[asc desc].include?(params[:direction]) ? params[:direction] : "asc" end models/supplierproduct.rb class Supplierproduct < ActiveRecord::Base attr_accessible :ean, :name, :price, :sku, :stock, :supplier_id belongs_to :supplier validates :supplier_id, presence: true searchable do text :ean, :name, :sku end end Visiting show.html.erb works just fine. Log shows: Started GET "/supplierproducts/2" for 127.0.0.1 at 2012-06-24 13:44:52 +0200 Processing by SupplierproductsController#show as HTML Parameters: {"id"=>"2"} Supplier Load (0.1ms) SELECT "suppliers".* FROM "suppliers" WHERE "suppliers"."id" = ? LIMIT 1 [["id", "2"]] SOLR Request (252.9ms) [ path=#<RSolr::Client:0x007fa5880b8e68> parameters={data: fq=type%3ASupplierproduct&start=0&rows=30&q=%2A%3A%2A, method: post, params: {:wt=>:ruby}, query: wt=ruby, headers: {"Content-Type"=>"application/x-www-form-urlencoded; charset=UTF-8"}, path: select, uri: http://localhost:8982/solr/select?wt=ruby, open_timeout: , read_timeout: } ] Supplierproduct Load (0.2ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."id" IN (1) Supplierproduct Load (0.1ms) SELECT "supplierproducts".* FROM "supplierproducts" WHERE "supplierproducts"."supplier_id" = 2 Rendered supplierproducts/_supplierproducts.html.erb (2.2ms) Rendered supplierproducts/show.html.erb within layouts/application (3.3ms) Rendered layouts/_shim.html.erb (0.0ms) User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."remember_token" = 'zMrtTbDun2MjMHRApSthCQ' LIMIT 1 Rendered layouts/_header.html.erb (2.1ms) Rendered layouts/_footer.html.erb (0.2ms) Completed 200 OK in 278ms (Views: 20.6ms | ActiveRecord: 0.6ms | Solr: 252.9ms) But it breaks when I type in a search. Log shows: Started GET "/supplierproducts?utf8=%E2%9C%93&search=a&direction=&sort=&_=1340538830635" for 127.0.0.1 at 2012-06-24 13:53:50 +0200 Processing by SupplierproductsController#index as JS Parameters: {"utf8"=>"?", "search"=>"a", "direction"=>"", "sort"=>"", "_"=>"1340538830635"} Rendered supplierproducts/_supplierproducts.html.erb (2.4ms) Rendered supplierproducts/index.js.erb (2.9ms) Completed 500 Internal Server Error in 6ms ActionView::Template::Error (undefined method `supplierproducts' for nil:NilClass): 10: <th><%= sortable "ean", "EAN number" %></th> 11: </tr> 12: </thead> 13: <% for supplierproduct in @supplier.supplierproducts %> 14: <tbody> 15: <tr> 16: <td><%= supplierproduct.sku %></td> app/views/supplierproducts/_supplierproducts.html.erb:13:in `_app_views_supplierproducts__supplierproducts_html_erb___2251600857885474606_70174444831200' app/views/supplierproducts/index.js.erb:1:in `_app_views_supplierproducts_index_js_erb___1613906916161905600_70174464073480' Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (33.3ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.9ms) Rendered /Users/Computer/.rvm/gems/ruby-1.9.3-p194@myapp/gems/actionpack-3.2.3/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (39.7ms)

    Read the article

  • Dominating Search Results With Local SEO

    Local Businesses are turning to local SEO services to obtain high placement with the major search engines. With tens of millions of websites currently online, dominant placement with the search engines is vital for online success. To obtain high placement within search engine results, you will need to deploy proven search engine optimization methods.

    Read the article

  • Beginners Guide To Search Engine Optimisation

    Search Engine Optimisation, (aka ?SEO?, ?organic? or ?natural? search) involves a variety of techniques which are used to improve your natural search engine rankings (i.e. the listings on search engi... [Author: Jim Webster - Web Design and Development - March 29, 2010]

    Read the article

  • Search Engine Optimization (SEO) Tips - Code Optimization

    Code optimization is a very important in making your website Search Engine Friendly. A webpage is called Search Engine Friendly when it is coded in such a way that search engines can read and understand it to the maximum. For making your Webpage Search Engine Friendly you have to keep the following factors in mind and code accordingly.

    Read the article

  • Suspend and resume not working on an HP dv7

    - by Emiel
    this one is driving me nuts. My HP dv7 laptop isn't resuming from suspend and hybernate. On suspend - resume it leaves me with a black screen. On hibernate it succesfully loads the images and then it hangs.... I searched through internet and tried serveral things, but nothing seems to work for this HP dv7 on Ubuntu 12.04. With 11.10 it didn't work either. Intel® Core™ i5 CPU M 450 @ 2.40GHz × 4 VESA: Intel®Ironlake Mobile Graphics 64-bit

    Read the article

  • any refresher courses on java enterprise [on hold]

    - by f1wade
    hi can anyone surggest anywhere or any online material, that will serve as a short (1 day) course to cover the basics of spring, hibernate, webflow, richfaces, jsf, beans I am trying to find one that just covers the basics, (how to create this, this and this, and heres another way, these are the options) kind of course. i'm looking for something more point blank, and quick, something i can jot down notes, and then use them back at my application code base. can anyone suggest anywhere, online, or local to nottingham / derby / leicester, UK please.

    Read the article

  • Search Engine Optimization And Other Web Services

    The SEO (Search Engine Optimization) involves an On-Page Optimization through which the different actions being done on the site so as to make the data and content presentable and relevant with a tidy and appealing display for the readers who frequently visit it to gain info on their part of interest and also for the Search Engines wanderers who want to register them. The search engine marketing Company, SEO Services renders a good quality Search Engine Optimization, also Social media optimization and many different types of marketing Solutions for the web business.

    Read the article

  • The Know How Series - Understanding Search Engine Crawlers

    While most internet users use a lot of search engines, hardly a handful really know how a search engine works. If you are an online marketer or your business relies heavily on the internet it becomes a prerogative that you understand search engines and web crawlers. Search engines provide data at the flick of a button or at a single click.

    Read the article

  • Google and Semantic Search Engine Optimization (SEO)

    Semantic Search Engine Optimization is a new frontier for SEO experts who want to stay ahead of the Google curve in securing additional search engine rankings for their target search terms. 'Semantic SEO' is currently quite misunderstood in the SEO community. Once understood, the proper application of a Semantic SEO strategy for your web site (and for your clients) can pay big dividends in improving your on-page copy, page headings, anchor text and internal linking, and deliver increased site traffic for search engine queries containing alternate word meanings.

    Read the article

  • Knowing the Search Engine Process to Improve SEO

    In order to begin your Search Engine Optimization you must first know how search engines work, whether or not you hire an SEO Consultant. It's important to know what you are trying to attract, as well as how search engines find their pages and determine their rating. There are several steps that are part of a search engines process until they get the results pop up on a searchers screen.

    Read the article

  • Problems after resuming from hibernate

    - by ACC
    I have a problem with maverick when resuming from hibernate. Here's a screenshot: Also I'm getting the following errors before the screen appears: *ERROR* render ring head not reset to zero ctl 00... *ERROR* render ring head forced to zero ctl 00000... I tried upgrading to PPA kernel to 2.5.36 and 2.5.37 beta but the problem persists. I have a vaio notebook with an intel graphics card 4500mhd. Anyone knows of a fix?

    Read the article

  • Search Engine Optimization Strategies 101

    I have learned over the last ten years of internet experience that Search Engine Optimization (SEO) can be an elusive and often overcharged service by "SEO experts." So in this article I will lay out in a simple, step by step fashion how to do search engine optimization that will get your website noticed in the search engine general results. Here are some fundamental search engine optimization strategies to get you started.

    Read the article

  • Search Engine Optimization - Great Ways to Increase the Traffic of Your Website

    Search Engine Optimization is a procedure with the help of which you can generate traffic on your websites with the help of some effective tools and methods. This method really helps all the business owners to increase the page ranking and popularity of their website. The SEO methods may target different kind of search results like video results, image results, local search and vertical search.

    Read the article

< Previous Page | 75 76 77 78 79 80 81 82 83 84 85 86  | Next Page >