problem about spring-data-Collection of common programming errors
jasonfungsing
mongodb spring-data spring-data-mongodb spring-mongo
I have been google for a while, not sure whether Spring Data MongoDB supports for bulk save.I need to save a collection of documents into mongo as atomic, either all saved or none saved.Can anyone share a link or some sample code for this?
Djordje Ivanovic
java spring hibernate jpa spring-data
I have webapp with Spring, Hibernate/JPA and Spring Data. I created repositories that extends JpaRepository for some entitites and everything were just fine with default methods like .save(T) or saveAndFlush, findAll, even with findBy, if some field name is simple as id (findById) or findByRole – where Role is enum or findByActive where active is the boolean field in given Entity. But when I try to do the same with fields which are complex object, I get into the trouble. I have enetity named Pe
Kaliyug Antagonist
spring hadoop spring-data
I’m trying out Spring Data – Hadoop for executing the MR code on a remote cluster from my local machine’s IDEHadoop 1.1.2, Spring 3.2.4, Spring-Data-Hadoop 1.0.0applicationContext.xml :<?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans”xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:hdp=”http://www.springframework.org/schema/hadoop”xmlns:context=”http://www.springframework.org/schema/context”xsi:schemaLocation=”http://www.springf
user1734143
jboss7.x aspectj spring-data jboss-eap-6
We are upgrading JBoss from 5 to EAP 6.1We are getting following error during deployment. Anyone faced similar issue?Error creating bean with name xyzSessionFactory defined in class path resource [applicationContext-xyz-dao.xml]: Cannot resolve reference to bean xyzDataSource while setting bean property dataSource; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name xyzDataSource: Post-processing of the FactoryBeans object failed; nested
avh
java spring neo4j spring-data spring-test
I evaluate some stacks accessing neo4j (2.0.0) and have some problems with spring (3.2.6). What I am trying to achieve right now is very simple: a unit test connecting the graph and reading a node. My application context looks like this:<?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans”xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:context=”http://www.springframework.org/schema/context”xmlns:tx=”http://www.springframework.org/s
Chetan
java spring jpa spring-data
I am trying to setup a project on spring data, but running into strange errors like this:problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.springframework.data.jpa.repository.config.JpaRepositoryConfigDefinitionParserI have specified the proper schema namespace as guided in spring data JPA documententation site.xmlns:jpa=”http://www.springframework.org/schema/data/jpa”xsi:schemaLocation=”http://www.springframewo
romedius
hadoop hbase spring-data
I’m using spring data + hbase to write some values into a HBase database. Unfortunately the HbaseTemplate seems to close the connection after the first call.I’m new to Spring and HBase/Hadoop, so i don’t know if this is a Spring/HBase Configuration issue or another stupidityTestclass:package org.springframework.data.hadoop.samples;import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.util.Bytes; import org.junit.Test; import org.j
imamc
spring neo4j spring-data spring-data-neo4j
I’ve got some data that has been pumped into a neo4j instance using the native api. The same instance is used by an app backed by Spring data graph. The repositories fail to find the data. I’m assuming that this is an issue due to indexes and/or missing properties.When the data is pumped in the following properties are set:node.setProperty(“__type__”, “com.x.x.Class”);Index is set as follows:Index<Node> typeIndex = indexManager.forNodes(“__types__”); typeIndex.add(node, “className”, “com.x
rmuller
spring-data spring-data-mongodb
I want to customize / configure the serialization policy of spring-data-mongodb (version 1.1.1.RELEASE) without using annotations (like @Id, @Document, @Field) because I do not have access to the domain classes.Is this possible? If yes, what is the most efficient way to do this?
dmahapatro
sql hibernate grails spring-data
I have a situation in Hibernate where I need to get the count(*) on a SQL EXCEPT query. Below is the query ( imitated my original code ):String query = “”” select count(*) as totalCount from ( select distinct id from Employee where name like ‘%Roger% EXCEPT select distinct id from Manager ) Temporary”””Now, when I say:hibernateSession.createQuery(query);The below exception is thrown:org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1, column 36My logs also show the below
Prayag Upd
java junit hql spring-data
I have a working native query written within a SpringRepository as below : public interface ServiceTransactionRepository extends CrudRepository<ServiceTransaction, Long>, JpaSpecificationExecutor<ServiceTransaction> {@Query(value = “SELECT t.userName, COUNT(t.sid) as number_of_total_transactions, COALESCE(SUM(t.transaction_amount)) as total_transaction_sum, count(z.id) number_of_commission_transactions, COALESCE(SUM(z.amount),0) as commission_amount, t.authority FROM (SELECT u.userNa
nsylmz
adeelmahmood
spring hadoop spring-data
I have an web application that an receive requests for several other applications running from linux command line as from different users. For each of these requests I have to read data from hdfs for calling application folder which only the calling application linux user access to. Is there a way I can setup configuration in such a way that it can be overridden at run time to impersonate the caller application user for spring-hadoop kerberos authentication.
balteo
jpa spring-roo spring-data spring-data-jpa
I use Spring Roo + Spring Data + QueryDSL and I have the following classes/interfaces:public interface FamilyAdvertisementRepositoryCustom { }@RooJpaRepository(domainType = FamilyAdvertisement.class) public interface FamilyAdvertisementRepository extends FamilyAdvertisementRepositoryCustom { }public class FamilyAdvertisementRepositoryImpl extends QueryDslRepositorySupport implements FamilyAdvertisementRepositoryCustom {//NO CONSTRUCTOR }all in following package: com.bignibou.repository;With foll
shelley
java spring spring-data spring-data-jpa
In a web application that uses Spring Data JPA with Hibernate, we utilize the web pagination functionality to provide paging and sorting capabilities in various lists of entities.@Controller public class MyEntityController {@RequestMapping(method = RequestMethod.GET)public ModelAndView list(Pageable pageable) { … } }@Configuration public class MyWebMvcConfig extends WebMvcConfigurationSupport {@Overridepublic void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers
masi
java spring annotations spring-data spring-data-jpa
i followed the tutorial posted here to get a basis application to work with Spring Data JPA. Now, how i understood, using the configuration<jpa:repositories base-package=”my.package.to.scan” />should result in that package beeing scanned by Spring Data JPA for interfaces extending JpaRepository and create a concreate bean of it so it can be used anywhere in my service classes using simple Spring @Autowired. But it fails, saying it can’t find a bean with className (which is the default name
Malave
java groovy jpa-2.0 spring-data spring-data-jpa
I have an Item and this Item could have any number of categories. I need to do a query to return all the items that correspond to a category. First let me put the domain objects:@Entity class Item {@Id@GeneratedValueLong id;String name@ElementCollection@JoinColumn(name = “security_id”)List<Category> categories = [] }And here is the enum with the categoriespublic enum Category {OFFICE(“office”),HOME(“home”),GARDEN(“garden”)final String value;private Category(String value) {this.value = valu
Darshan Patil
mongodb spring-data mongodb-java
I am working on some test program for SpringData MongoDB, I done it same as its mentioned on http://static.springsource.org/spring-data/data-document/docs/1.0.0.M2/reference/html/#mongo.core buts its showing exceptionspackage com.springMongo.core;import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.dat
imgr8
spring exception spring-data spring-data-mongodb
I am using spring-data-mongodb dependency in my Spring MVC application. It was working fine till now but I needed to add a Class instance property to one of my domain objects. Since Mongo doesn’t support persisting Class instances directly, I added custom converter for this case. I followed the instructions here: http://static.springsource.org/spring-data/data-mongodb/docs/current/reference/html/mongo.core.html#mongo.custom-converters.writerSo my converters looks like:public class ClassReadConve
Pangea
spring spring-data spring-data-neo4j
Why is spring-data looking at isCaptain even when I specified it as transient? From the documentation, the transient properties should be ignored. No error if I use a Boolean wrapper classExceptionorg.springframework.data.mapping.model.MappingException: Setting property isCaptain to null on Player [nodeId=1, name=null, firstName=null, lastName=null]at org.springframework.data.neo4j.support.mapping.SourceStateTransmitter.setProperty(SourceStateTransmitter.java:85)at org.springframework.data.neo4j
Joachim Sauer
solr spring-data spring-data-jpa spring-data-solr
To enable full text search, I ever used hibernate-search and solrJ, No I am trying spring-data-solr, but found I seems not working together with spring-data-jpa. I just can’t make the configuration correct. If I add the following solr configuration xml to my project.I get error message. The config xml file of spring-data-solr is:<?xml version=”1.0″ encoding=”UTF-8″?> <beans xmlns=”http://www.springframework.org/schema/beans” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:p
Web site is in building