We use Spring's JdbcTemplate which is configured through Spring config as illustrated below. Is there a way to do this without injecting the data source? I'd like to just create the JdbcTemplate instance programatically and "initalize" the datasource using TheOracleDS.
Our current config:
Java class
private JdbcTemplate jdbcTemplat...
Hi,
I'm currently in the process of building a CRUD tool for an existing Spring-based application.
The application is being included in the Grails app as a JAR library which seems to work fine.
To make use of the library's own spring context, I used to load it through:
def ctx = new ClassPathXmlApplicationContext( 'classpath:/applicat...
Hello All...
I have working copy of war file which is working fine in windows..
Now when i am deploying that war file into linux + tomcat, it's giving me following stacktrace :
2009-11-23 17:06:08,675 INFO (org.springframework.jdbc.datasource.DriverManagerDataSource:153) - Loaded JDBC driver: com.mysql.jdbc.Driver
2009-11-23 17:06:08...
We configure our Spring transaction in Spring config as:
<tx:jta-transaction-manager/>
I gather this means that Spring will automatically discover the underlying JTA implementation. So when we start up JBoss we see these messages while Spring searches:
[JtaTransactionManager] [ ] No JTA TransactionManager found at fallback JNDI loca...
I am currently developing a web application based upon Struts2 & Spring components combined with a set of tier libraries in a company-made framework.
These librairies expose sets of spring beans, through blahblah.xml files embedded in the provided jar files.
I need to replace some of the implementation classes exposed through such bean...
I want to use to implement only REST service - a very simple one returning 'person' by full name or id in JSON. Im probably will be using JAX-RS and maybe JAXB - im not sure if tis is a right choise. I want to use it with following technologies/products and their versions:
JDK 1.5
Eclipse 3.5 EE
Tomcat 6.0
CXF 2.2.5
Spring 2.5.1
My q...
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 executed sql. So I put in log4j, set up a log4j.properties file. and no sql.
here is the log4j.properties file:
log4j.appender.stdout=org.apache.log4j.ConsoleAppe nder
log4j.appende...
I am separating my spring bean configuration files as follows:
myapp-service.xml
myapp-servlet.xml
However I am getting the error;
Error creating bean with name 'beanName' defined in ServletContext resource [/WEB-INF/myapp-servlet.xml]: Cannot resolve reference to bean 'beanService' while setting bean property 'beanService'; nested...
Hi,
How do i display non-validation errors in jsp with spring webflow.
Something equivalent to struts ActionErrors/
Thx
...
Hello,
I'm trying to get my Portlets work with some DAO Objects which I configured as spring beans. I've included an application.xml to my WEB-INF, added it to my web.xml, configured hibernater support, a datasource. Everything seems fine, after deployment I see the context loaded message from spring. Now I'm trying to get one dao objec...
Hi,
I'm currently trying to get Freemarker to work with my application using Spring. No matter what I try I keep getting template not found. I am not sure if I have the configuration set up properly, but it never finds my template. Here is my spring bean config:
<bean id="freemarkerConfig" class="org.springframework.web.servlet.vie...
Is there a nice way to have Spring's @Controller classes to call a specific method once per request?
Right now I'm using a method annotated with @InitBinder for this purpose, but this is suboptimal as @InitBinder methods get called several times per request. I just want to do some initialization / update stuff to use in my controllers.
...
Is it possible to get a list of all available web services on a tomcat server?
...
I am using Spring, Hibernate for developing my application. And as DB side, I have MySQL. I have an User table and that has password field of varchar type.
Now, when a new user is created, I just want store password field in an encrypted form. Is there any facility provided by Hibernate to do so? Or is there any other way?
...
I have a Spring Batch process which takes a set of rows in the database and creates a number of flat files from those rows, 10 rows per file. To do this, I've created a Spring Batch process, similar to this:
<batch:job id="springTest" job-repository="jobRepository" restartable="true">
<batch:step id="test">
<batch:tasklet>
...
Hi guys!
I would like to know if it's possible to use Spring to resolve the dependencies of an object created manually in my program. Take a look at the following class:
public class TestClass {
private MyDependency md;
public TestClass() {
}
...
public void methodThaUsesMyDependency() {
...
md.someMethod...
I have got following warning when the application start up.
2009-05-13 09:19:41,171 WARN net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath:jar:file:/app/java/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
I found encache code in following url .. Configuration...
I wired-up but it did not work as I expected.
I have set the lazy inialization true between entities abd believe,HibernateInterceptor manages the hibernate session. When I trying to access the object properties, it thorws exception LazyInitializationException.
Error messgae : Transaction could not initialize proxy - the owning Session ...
I am using this in my application config to specify where to get my messages
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="WEB-INF/properties/messages"/>
<property name="defaultEncoding" value="UTF-8"/>
</bean>
How do i declare a bean ...
They say that a closed session in hibernate and webapp with ajax is a common problem with java and spring so I have to set the OpenSessionInViewInFilter in the web.xml like this
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextCon...