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

  • SEARCH
  • Home
  • 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 728375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:40:27+00:00 2026-05-14T06:40:27+00:00

I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate

  • 0

I have an extremely simple web application running in Tomcat using Spring 3.0.2, Hibernate 3.5.1, JPA 2, and Derby. I am defining all of my database connectivity in persistence.xml and merely using Spring for dependency injection. I am using embedded Derby as my database.

Everything works correctly when I define the driver and url properties in persistence.xml in the classic Hibernate manner as thus:

<property name="hibernate.connection.driver_class" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="hibernate.connection.url" value="jdbc:derby:webdb;create=true"/>

The problems occur when I switch my configuration to the JPA2 standardized properties as thus:

<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:webdb;create=true"/>

When using the JPA2 property keys, the application bails hard with the following exception:

java.lang.UnsupportedOperationException: The user must supply a JDBC connection

Does anyone know why this is failing?

NOTE: I have copied the javax… property strings straight from the Hibernate reference documentation, so a typo is extremely unlikely.

  • 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-05-14T06:40:28+00:00Added an answer on May 14, 2026 at 6:40 am

    The answer appears to be that this is a Spring issue, likely stemming from the use of the LocalContainerEntityManagerFactoryBean. I was using Spring to enable the use of the @PersistenceContext annotation rather than manually initializing the EntityManager in the standard Java SE way. When I replaced the use @PersistenceContext with Persistence.createEntityManagerFactory("WebApp").createEntityManager(); (and commented the EntityManager stuff out of my Spring config), everything worked as expected.

    For reference, this was the Spring configuration I was using:

    <?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/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans.xsd
                http://www.springframework.org/schema/context
                http://www.springframework.org/schema/context/spring-context.xsd
                http://www.springframework.org/schema/tx
                http://www.springframework.org/schema/tx/spring-tx.xsd">
    
        <context:component-scan base-package="net.webapp"/>
        <tx:annotation-driven/>
    
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"/>
    
        <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
                <property name="entityManagerFactory" ref="entityManagerFactory"/>
        </bean>
    </beans>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP based web application which is currently only using one webserver
So I have an extremely simple $.post function that works perfectly in all the
I have an extremely simple Console application written in C#. It is very easy
I have an extremely simple page that I'm trying to view in the Facebook
I am currently learning F# and have tried (an extremely) simple example of FizzBuzz.
I have a legacy data-driven application with an extremely complicated data model (and hundreds
I have this extremely simple splash page here: http://iph0wnz.com It has the main graphic
I have an extremely simple JSON object that looks like the following: var data
I have an extremely simple example trying to use Data Annotations with unobtrusive javascript
I have an extremely simple page that isn't displaying properly in IE6. In this

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.