Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8115803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:35:05+00:00 2026-06-06T03:35:05+00:00

When Tomcat starts I get this messages: INFO: Initializing Spring FrameworkServlet ‘spring’ 2012-06-20 17:02:55,209

  • 0

When Tomcat starts I get this messages:

    INFO: Initializing Spring FrameworkServlet 'spring'
2012-06-20 17:02:55,209 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'spring': initialization started>
2012-06-20 17:02:55,243 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing WebApplicationContext for namespace 'spring-servlet': startup date [Wed Jun 20 17:02:55 CEST 2012]; root of context hierarchy>
2012-06-20 17:02:55,305 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-servlet.xml]>



2012-06-20 17:02:56,094 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'hibernateConfiguration' of type [class com.xxxxxxxxxx.android.market.config.HibernateConfiguration$$EnhancerByCGLIB$$53f79727] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
2012-06-20 17:02:56,690 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - <Building new Hibernate SessionFactory>
2012-06-20 17:02:57,285 INFO [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] - <Updating database schema for Hibernate SessionFactory>
2012-06-20 17:02:57,621 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'sessionFactoryBean' of type [class org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>


2012-06-20 17:02:57,694 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@46ed5d9d: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,beanConfiguration,hibernateConfiguration,AppService,appController,homeController,jspViewResolver,messageSource,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,appCategory,appDAO,appReleaseDAO,appService,sessionFactoryBean,transactionManager,persistenceExceptionTranslationPostProcessor]; root of factory hierarchy>
2012-06-20 17:02:58,011 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - <Mapped URL path [/{id}] onto handler 'appController'>
2012-06-20 17:02:58,012 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - <Mapped URL path [/{id}.*] onto handler 'appController'>
2012-06-20 17:02:58,012 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - <Mapped URL path [/{id}/] onto handler 'appController'>
2012-06-20 17:02:58,012 INFO [org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping] - <Root mapping to handler 'homeController'>
2012-06-20 17:02:58,482 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'spring': initialization completed in 3273 ms>
Jun 20, 2012 5:02:58 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 20, 2012 5:02:58 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jun 20, 2012 5:02:58 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/122  config=null
Jun 20, 2012 5:02:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4237 ms

Here is my Hibernate config class. It’s annotated based and when I use inside of the Junit tets @ContextConfiguration all works.

    package com.xxxxxxxxxxxxx.android.market.config;

import java.util.Properties;

import org.hibernate.dialect.MySQL5InnoDBDialect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.orm.hibernate3.HibernateTransactionManager;
import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;

import com.xxxxxxxxxxxxx.android.market.dao.xxx;
import com.xxxxxxxxxxxxx.android.market.dao.xxx;
import com.xxxxxxxxxxxxx.android.market.dao.xxx;

@Configuration
public class HibernateConfiguration {

    @Bean
    public AnnotationSessionFactoryBean sessionFactoryBean() {
        Properties props = new Properties();
        props.put("hibernate.dialect", MySQL5InnoDBDialect.class.getName());
        props.put("hibernate.format_sql", "true");
        props.put("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");
        props.put("hibernate.connection.password", "philipp");
        props.put("hibernate.connection.url", "jdbc:mysql://localhost/Market");
        props.put("hibernate.connection.username", "philipp");

        AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean();
        bean.setAnnotatedClasses(new Class[] { xxx.class, xxx.class, xxx.class });
        bean.setHibernateProperties(props);
        bean.setSchemaUpdate(true);
        return bean;
    }

    @Bean
    public HibernateTransactionManager transactionManager() {
        return new HibernateTransactionManager(sessionFactoryBean().getObject());
    }

    @Bean
    public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
        return new PersistenceExceptionTranslationPostProcessor();
    }

}

My spring-servlet.xml

    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
    xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
        http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

    <context:annotation-config />

    <!-- eingefügt aus app-context -->
    <context:component-scan base-package="com.xxxxxxxxxxxxx.android.market.config" />
    <context:component-scan base-package="com.xxxxxxxxxxxxx.android.market.market.dao" />
    <context:component-scan base-package="com.xxxxxxxxxxxxx.android.market.service.app" />
    <context:component-scan base-package="com.xxxxxxxxxxxxx.android.market.controller" />
    <!-- eingefügt aus app-context -->

    <bean id="jspViewResolver"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass"
            value="org.springframework.web.servlet.view.JstlView" />
        <property name="prefix" value="/WEB-INF/jsp/" />
        <property name="suffix" value=".jsp" />
    </bean>

    <bean id="messageSource"
        class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="classpath:messages" />
        <property name="defaultEncoding" value="UTF-8" />
    </bean>

    <tx:annotation-driven transaction-manager="transactionManager" />

</beans>

Now, when will get some items by rest-api from the database I get this:

    org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
    org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
    org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:685)
    com.xxxxxxxxxxxxx.android.market.dao.AppDAOImpl.currentSession(AppDAOImpl.java:22)
    com.xxxxxxxxxxxxx.android.market.dao.AppDAOImpl.getAppById(AppDAOImpl.java:46)
    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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    $Proxy21.getAppById(Unknown Source)
    com.xxxxxxxxxxxxx.android.market.service.app.AppServiceImpl.getAppById(AppServiceImpl.java:29)
    com.xxxxxxxxxxxxx.android.market.controller.AppController.getApp(AppController.java:22)
    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.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



    package com.xxxxxxxxxxxxx.android.market.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.xxxxxxxxxxxxx.android.market.dao.App;
import com.xxxxxxxxxxxxx.android.market.service.app.AppService;

@Controller
public class AppController {

    @Autowired
    private AppService appService;

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public ModelAndView getApp(@PathVariable int id) {
        App app = appService.getAppById(id);
        return new ModelAndView("appXmlView", BindingResult.MODEL_KEY_PREFIX
                + "app", app);
    }
}




    package com.xxxxxxxxxxxxx.android.market.service.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xxxxxxxxxxxxx.android.market.dao.App;
import com.xxxxxxxxxxxxx.android.market.dao.AppDAO;

@Service("AppService")
public class AppServiceImpl implements AppService {

    @Autowired
    private AppDAO appDAO;

    public boolean saveApp(App app) {
        return appDAO.insert(app);
    }

    public void deleteApp(App app) {
        appDAO.delete(app);

    }

    public void updateApp(App app) {
        appDAO.update(app);
    }

    @Transactional
    public App getAppById(int id) {
        return appDAO.getAppById(id);
    }

    public App getAppByName(String name) {
        return appDAO.getAppByName(name);
    }

}




import java.util.Properties;

import org.hibernate.dialect.MySQL5InnoDBDialect;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.orm.hibernate3.HibernateTransactionManager;
import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.xxxxxxxxxxxxxxxx.android.market.dao.App;
import com.xxxxxxxxxxxxxxxx.android.market.dao.AppCategory;
import com.xxxxxxxxxxxxxxxx.android.market.dao.AppRelease;

New HibernateConfiguration file:

@Configuration
@EnableTransactionManagement
public class HibernateConfiguration {

    @Bean
    public AnnotationSessionFactoryBean sessionFactoryBean() {
        Properties props = new Properties();
        props.put("hibernate.dialect", MySQL5InnoDBDialect.class.getName());
        props.put("hibernate.format_sql", "true");
        props.put("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");
        props.put("hibernate.connection.password", "philipp");
        props.put("hibernate.connection.url", "jdbc:mysql://localhost/BusinessMarket");
        props.put("hibernate.connection.username", "philipp");

        AnnotationSessionFactoryBean bean = new AnnotationSessionFactoryBean();
        bean.setAnnotatedClasses(new Class[] { AppCategory.class, App.class, AppRelease.class });
        bean.setHibernateProperties(props);
        bean.setExposeTransactionAwareSessionFactory(false);
        bean.setSchemaUpdate(true);
        return bean;
    }

    @Bean
    public HibernateTransactionManager transactionManager() {
        return new HibernateTransactionManager(sessionFactoryBean().getObject());
    }

    @Bean
    public PersistenceExceptionTranslationPostProcessor persistenceExceptionTranslationPostProcessor() {
        return new PersistenceExceptionTranslationPostProcessor();
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:35:07+00:00Added an answer on June 6, 2026 at 3:35 am

    Since you’re using Spring 3.1 Configuration in Java try removing

    <tx:annotation-driven transaction-manager="transactionManager" />

    and specifying @EnableTransactionManagement on HibernateConfiguration as follows

    @Configuration
    @EnableTransactionManagement
    public class HibernateConfiguration
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After a successful start of Tomcat and a few REST calls I get this
When i try to debug my webapp it starts up the tomcat server and
When Tomcat starts it calls my ServletContextListener to obtain a database connection, which I
I am using tomcat version 6.0. My requirement is that when tomcat starts up,
I know this question is a duplicate of Execute method on startup in spring
I am getting this exception on my tomcat server (+liferay) java.util.concurrent.RejectedExecutionException my class is
I was trying to follow this example http://www.mulesoft.org/documentation/display/MULE3USER/Building+Web+Services+with+CXF on a legacy project so then
I get this message when I try to start my small test project with
I have one basic web project using spring in eclispe. I have installed tomcat
When I start Tomcat (6.0.18) from Eclipse (3.4), I receive this message (first in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.