With Hibernate+Eclipse you can generate POJO classes that represent the tables. You can then wire it all together pretty easily with Spring. However, if you have to interact with stored procedures ... |
I have an application which is connected to a database through a spring.net AdoTemplate. I am charged with creating a restore database method which keeps the app running but drops ... |
I am using spring-2.5.6 to connect from a standalone application to an Oracle 10g database (ojdbc14.jar) using the org.apache.commons.dbcp.BasicDataSource. When I try to retrieve a SqlRowSet using the public SqlRowSet queryForRowSet(String ... |
I'm using Spring's JDBC support to run SQL queries and updates on an Oracle database. I'd like to insert a row and then get the key that it was assigned ... |
I have a Java project connecting to an Ingres database and using the Spring Framework. This issue is related to the error codes list configuration.
According to Spring Framework API:
... |
I'm researching spring for a possible switch to a spring stack. One of the things that I thought was cool was the ability for spring jdbc to log all the ... |
Does anyone know how what Spring Jdbc template method I could use to execute this 'upsert' or an alternative approach that would also perform the operations in one database call?
UPDATE jasper_report ...
|
|
How do one query for a double with the Spring JDBC temple?
For example:
public double getAverageScore() {
return jdbctemplate.queryFor???("select avg(score) from test");
}
There are queryForInt and queryForLong, but no queryForDouble
... |
The answers to my previous post encouraged me mixing SQL and NoSQL db.
What is the best practice implementation of two databases in terms of application context configuration and DAO creation? ... |
I want to read data in blocks of say 10k records from a database.
I found Result limits on wikipedia and it seems obvious that this can't done with sql ... |
We currently have a system that displays a page tabular data on the screen without any paging support in the user interface. It is running on Java 1.5 / Spring ... |
Imagine you have the following table (note: this is a contrived/simplified example):
CREATE TABLE foo (
book_id number,
page number,
-- [a bunch of other ...
|
I am trying to write a conditional batch insert based on Java Parameters, for example
List<Object[]> params = new ArrayList();
params.add(new Object[]{1, 2, 3});
getSimpleJdbcTemplate.batchUpdate(
"INSERT INTO SomeTable( colA, colB, colC)" +
" VALUES(?, ?, ...
|
I'm doing massive import in SQL Server using my Java application with Spring Framework and SimpleJdbcInsert class. The results are not good and I'm trying to optimize it.
I support every ... |
With memory profiling tools, it looks like NHibnerate will cache SQL strings while execution, which occupy a large # of memory spaces.
Whether Spring.NET is able to configure the cache-related setting?
Thanks.
|
Have specific sql file. It may be "connected" to some other more generic .sql init file.
Is it possible somehow include reference from one .sql to another .sql file for Oracle?
note: DB ... |
I have two domain code:
public class domain1{
private string domain1Name;
private List<domain2> domain2List;
/* getter setter */
}
public class domain2{
private string domain2Name;
/* getter setter */
}
and i have a Spring Controller returning a map then pass ... |
Has anyone tried using JOOQ with the Spring framework or am I breaking new ground?
http://www.jooq.org
|
Can anybody give me an example of using the Spring JDBC classes NamedParameterJdbcTemplate and MySQLParameterSource using the sql types?
The MapSqlParameterSource has this method:
addValue
public MapSqlParameterSource addValue(String paramName,
... |
I'm new to NHibernate/Spring and I have a query that requires the identity column to be OFF before running the query and turned ON afterwards. Basically, we're reinserting a record into ... |
I have a Java code that uses Spring to connect and execute sql on an Oracle DB. I have a query that takes long time to execute (20 minutes or ... |
I am trying to insert a row into a table using JDBC 2.0 as a Spring dependency. I can run this query inside of SQL Server 2008 without error. But when ... |
Iam trying to connect to sql server 2005 instance running on a remote machine from my spring web application. This web application is running in tomcat server. Earlier When I connected ... |
Is there some way to check beforehand if a java type is compatible with a sql.Types?
I could type out all the stuff like:
if (BIGINT||TINYINT) try BigInteger.parse(myvalue) and
if (TIME||DATE||TIMESTAMP) try new ... |
I am facing a technical issue on a web-app development :
Here is the goal :
By clicking on a button, the user launches a SQL/Oracle procedure that takes about 5 to 10 ... |
There doesn't seem to be a named query support in Spring JDBC Templates. By named query I mean the facility to reference sql statement by name in java code and keep ... |
I have a query like this -
SELECT * FROM mytable WHERE id IN()
The IN will get list of ids which are more than 1000. So my query fails on Oracle.
One option ... |
I'm having trouble calling procedure in mssql server using java.
I keep getting org.springframework.jdbc.BadSqlGrammarException
Here is my code:
public void init(@Qualifier("mssqlDataSource") DataSource dataSource) {
...
|
I am connecting to SQL Server via Spring in WebSphere. I have a piece of pretty simple dynamic SQL (below) that is throwing "The cursor was not declared."
SELECT TOP 1
...
|
I am trying to decipher a stack trace (partially submitted here). Any help is greatly appreciated! I can understand bits and pieces but not he whole thing. Additionally, ... |
All,
I am trying to connect SQL Server named instance using Microsoft JDBC Driver as well as jTds.
Both were giving different problems .
Microsoft Driver issue :
Connection URL :
dataSource.setUrl("jdbc:sqlserver://xx.xx.xx.xx;databaseName=DBNAME;instanceName=SQL2005");
instance SQL2005 ... |
I was wondering what's the error of this code, I get everything right, but why won't it work? here's the code, I got my driver name, and database url right, but ... |
Possible Duplicate:
How to initialize log4j properly?
I have fix this problems code on the previous Question, but these time, I encountered a new one Again, ... |
I was trying to add a User in my database using Java with Spring framework(Standalone) but I have encountered problems specifically in this code
package test;
import dao.FinanceDao;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
public class TestDrive {
...
|
Hello I created a project with the following roo command: Code: persistence setup --provider HIBERNATE --database MSSQL --databaseName xx --userName xx --password xx database reverse engineer --package ~.domain --schema dbo but ... |
I'm using Spring 3.0.5 and I've noticed that timestamps are not formatted correctly when printed using . The fields are defined as java.util.Date but at runtime they contain a java.sql.Timestamp because ... |
Hi, i need to load mass data from the database using SQL. how do u recommend me to approach it ? does spring has some kind of class/utility which can help ... |
this.procGetDate = new SimpleJdbcCall(jdbcTemplate).withFunctionName("getdate"); this.simpleJdbcTemplate.update("update [dbo].[PersonaNatural] set FCExpiracion = ? where IDPersona = ? ", procGetDate.execute(), personaRut.getIdPersona()); |
generating code based on existing sql server database Am evaluating solutions and products that can generate code for maintaining (mostly) lookup type tables in a SQL Server database. The end result ... |
Hi there! I've created a unique index in one of my table ... and I would like to catch SQL code exception (Error Code 1) ... First of all I could ... |
Connections to MSSQL not closing when undeploying The problem is that everytime I undeploy my webapp the connection with the MSSQL database is not closed and when I deploy the app ... |
Hi I have a java.sql.Connection that I obtained from JDO (kodo) and want to use it to do plain jdbc stuff. Can I get spring (-dao) to make life easier? I ... |
Can't create connection with MSSQL Hi gyes I am using spring roo 1.1.1 and MSSQL(SQL Server 2008 R2) as database i have one small sample with one entity and one field ... |
compilation of sql and errorcodes lookup slowing me down ? Hi, if I put verbose logging on I see the following messages for every sql call to the database : org.springframework.jdbc.object.SqlFunction ... |
I tried reverse engineering a SQLServer database using the jTDS JDBC driver and the xml produced from "database introspect" always contains "required="false"" on every column of every table, even though the ... |
How to show the internal sql that is used to execute with database In hibernate we used "showSql" and it shows query like insert into mkyong.stock_transaction (CHANGE, CLOSE, DATE, OPEN, STOCK_ID, ... |
Reverse engineering MSSQL issue 1. Created top level package 2. Introspect and installed driver 3. updated database.properties with the correct server info 4. ran the reverse engineering from roo shell database ... |
jdbc problem using MSSQL SERVER 2008 Hi, I am successful to access MSSQL 2008 server by regular jsp. But I have a problem to access to MS SQL server 2008 by ... |
Use of java.sql.Timestamp in field command I am new to Roo and most of the rest of Spring. I am learning Roo, and I was trying to create an entity that ... |
Calling native SQL query for updating I continue using Spring Data JPA more and more. Maybe this question is a little more advanced... I have a stored procedure in my Postgres ... |
May 9th, 2011, 01:53 PM #1 Palsajicoco View Profile View Forum Posts Private Message Junior Member Join Date May 2011 Location Vienna, Austria Posts 9 Error in the SQL syntax ?! ... |
|
|
bad SQL grammar [insert into T_EMPLOYEE_EMP (MST_ID,MST_TYPE,MST_NAME) values (?,?,?)]; nested exception is java.sql.SQLException: ORA-00904: "MST_NAME": invalid identifier MST_NAME(column name) is alredy there in data base Code: Code: int addEmp = update("insert ... |
Hi, I am using DriverManagerDataSource datasource in my servlet to connect to Oracle. Is it possible to set some property or some other way to show all sql in the System.out ... |
I am using Spring 3 with hibernate and am running queries against my SQL server database. I'd like to see the actual SQL that was run, not the one that hibernate ... |
Retrieving sql data in my jsp file? Hello, i got entities, i got controller and service . is it really not possible to do a sql query (native or hql) with ... |
When I raise an exception in a stored proc (using RAISERROR) it always comes back to my Java code as BadSqlGrammarException, which isn't accurate. Have I missed some configuration? Shouldn't it ... |
Migration from SQLSERVER to ORACLE fails.... Hi, I have a working solution for Spring batch which consists of couple of jobs that read data from files, web service, database and write ... |
Error in loading sql-error-codes.xml I started seeing this warning in my logs...and have no idea why it started happening. I am not loading my own version of this file... Thanks in ... |
Nov 3rd, 2004, 12:55 PM #1 joegaber View Profile View Forum Posts Private Message Member Join Date Sep 2004 Location North Carolina Posts 38 Very slow dynamic SQL Scenario: I am ... |
Inserting Date type into SQL server from modelAttribute variable issues Hello folks I am having a hard time dealing with the format Date type variable inside a web portal. The things ... |
Does Spring Expression Language support IN operator? Similar to SQL IN clause public class Security { private secTyp1; public Security (String aSecTyp1) { secTyp1 = aSecTyp1; } } I am trying ... |
getId method not generated from MSSQL I am trying to generate a simple application using MSSQL with Spring Roo and GWT. I have two basic tables to reverse engineer: Person and ... |
Reverse Engineer SQL Server error message Hi, In a new Roo project, using JTDS to access a MS SQL Server Schema and I am receiving a error message. I searched through ... |
Run sql script on server startup Hello, I do have some dummy data for testing purposes. What I want now is, that if I start the server, a sql script file ... |
About the number of SQL requests Hello all, I'm starting to learn Spring and Hibernate and I'm also starting to use SpringRoo. I have (for example) a company table CPY that ... |
CustomEditor for java.sql.Date ? I have a JSP that binds to a data bean. In that data bean, I have a java.util.Date attribute and a java.sql.Date attribute. My initBinder is as ... |
UncategorizedSQLException with SQL Partitioning - Parallel Processing Hi, I run a job with SQL Partitioning. I encountered the following error during execution: org.springframework.jdbc.UncategorizedSQLException : Executing query; uncategorized SQLException for SQL [SELECT ... |
binding to java.sql.Timestamp (custom editor) Hello, I've searched the forum and cannot find a satisfactory answer. I have an abstractCommandController with validator and command object. The comman object holds to fields ... |
Best practice for direct SQL with hiberate/spring Hi, we are using Hibernate together with Spring 1.1. Our Beans are configured with the TransactionProxyFactoryBean. For performance reasons we have to use direct ... |
Nov 28th, 2011, 10:19 AM #1 dr4w View Profile View Forum Posts Private Message Junior Member Join Date Dec 2010 Posts 5 SQL error using the default MessageStore impl Hi All ... |
petclinic sql select statements having 2 or more variables A real newbie here. From the petclinic example how does one use two (not only one) variables in the where clause of ... |
Problem using Native SQL Hi, could someone please help with the following, which is making use of native SQL. The trouble is that following line of code is not being accepted ... |
hi,all I know spring have already contain some database's id auto incrementer for example MySQLMaxValueIncrementer,OracleSequenceMaxValueInc rementer,but it doesn't have a SQLServer and Sybase's implementation. Anybody can tell me how can i ... |
Hi, We are getting the following message. INFO SQLErrorCodesFactory - SQL error codes for 'Adaptive Server Enterprise' not found Could someone help in explaining how we would configure the error codes ... |
Hi, just wated find out what would be the best way to use spring jdbc classes for dynamic searches. The sql is not known at the program's start, the number of ... |
Exception output vague from mapping query due to bad sql. Just a fyi. I accidentily wrote " severity,..... from ....." whereas I should have written "select severity, .... from ....". The ... |
What exactly do you want to know? Release 0.8.1 for example uses Hypersonic internally for its sample application and unit tests. Perhaps take a look there. |
Hello, I want to use the sql-Tag (JSTL) and wonder how I could use the datasource, which is instantiated by Spring as usual (org.springframework.jdbc.datasource.DriverManager DataSource bean). How do I get JSTL ... |
Apr 1st, 2005, 03:57 AM #1 lucia.baldelli View Profile View Forum Posts Private Message Junior Member Join Date Apr 2005 Posts 2 SQLServer insert problem Hello everybody! I'm trying to migrate ... |
how to pass NULL as an IN parameter to SQL function I have an SQL Server 2000 function, that has 1 out parameter and 3 in parameters. The 3rd parameter is ... |
baffling sql error - please help! Hi, I am getting this exception: [PreparedStatementCreatorFactory.PreparedStatementC reatorImpl: sql=[select messageID, fromUserName, subject, dateSent, isRead from messages where toUserName = ? and visibleToRecipient = 1 order ... |
missing quotes in generated SQL around string literal, help! Hi I am a beginner of spring/hibernate (3.0) and postgres (8.0.3), and I ran into a strange problem. I am just trying ... |
What is the correct way to set up an SQL IN clause? What is the correct way to set up an SQL IN clause? It works when I pass in a ... |
What is the correct way to set up an SQL IN clause? What is the correct way to set up an SQL IN clause? It works when I pass in a ... |
Cannot bind java.sql.date in CustomDateEditor I would like to bind a date field which is in the format of 2005-07-04 to the java.sql.Date format, so I register using these Code: protected ... |
ms sqlserver JDBC driver supports batching? I use spring jdbc and ms sqlserver JDBC driver,but I encounter a error org.springframework.jdbc.BadSqlGrammarException: Bad SQL grammar [update Bookreview set F_IsAvaliable = 0 where F_reviewID ... |
usersByUsernameQuery SQL statement problem Hi guys, My user table contain a field call 'activate_date' where if this field is null, user won't be able to login. I configured the applicationContext-security.xml like ... |
hi all, I'm using the ibatis sqlmap with the spring framework and wanted to know how I can print out my sqlmap SQL statements for debugging purposes? I want to see ... |
Hi! How do I issue plain SQL queries (non-hibernate) but still within a transaction? Using: Connection con = session.connection(); // do some sql query using thecon object // if it fails, ... |
recovering from SQL connection loses... I'm deploying an application using Spring and Hibernate 3.0.5 to a WebLogic 8.1 SP4 server. Things are working fine *UNLESS* the database connection goes down. Then ... |
I download the springframework 1.2.3 and installed the jpetstore for hsqldb database successfully, when I try to change the datasource, i only found the database scripts for mysql, hsqldb, oracle and ... |
Does spring have anything that publishes information within a database as XML? There are quite a few resources out there, but I was wondering if Spring has something. Couple of good ... |
Custom editor for java.sql.Date ? I would like to bind a date field which is in the format of 2005-09-29 to the java.sql.Date format, so i tried to register a custom ... |
SQL Exeception while trying to login Hi, I am trying to authenticate against table like this: Code: SELECT username, ... |
Nov 10th, 2005, 11:57 AM #1 serge View Profile View Forum Posts Private Message Junior Member Join Date Feb 2005 Location Harvard, Massachusetts Posts 8 sql-error-codes.xml or transition to 1.2.3 or ... |
Sql Server 2000 vs Oracle 9i - performance problem Hi everyone, I would like to direct my question especially to people having experience with Hibernate and Spring frameworks. Short problem description: ... |
Bad Sql Grammar Exception Hi All , I have duplicated the JdbcDaoImpl ,DaoAuthenticationProvider , AuthenticationDao so that my userByUsernameQuery takes two parameters to retrieve the uname/Pword . Since i dont need ... |
you didn't tell much details but in generell: Do not use Microsofts jdbc driver, try "jtds" instead, really the better solution. i run a sql-server 2000 and connection pooling, no trouble ... |