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 8027713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:53:31+00:00 2026-06-04T23:53:31+00:00

I’m attempting to migrate a JSP / Hibernate project to GWT / Hibernate. Briefly,

  • 0

I’m attempting to migrate a JSP / Hibernate project to GWT / Hibernate. Briefly, the issue appears to be that the MysqlConnectionPoolDataSource class from jetty-env.xml is evidently not getting instantiated, causing the resource reference from web.xml to fail.

Our Hibernate setup works fine in non-GWT projects. I’m using Eclipse Indigo, Google Suite Plugin 2.5, Google GWT Designer 2.4.2.

Here are the steps I took and excerpts of files that I think matter. (Apologies in advance – this is a little bit verbose but wanted to be sure my question is complete and clear.)

My war/WEB-INF/classes/hibernate.cfg.xml includes:

<property name="hibernate.connection.datasource">
    java:comp/env/jdbc/nndb
</property>

The web.xml includes:

<resource-ref>
    <description>NN Database Connection Pooling</description>
    <res-ref-name>jdbc/nndb</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

I also created CustomJettyLauncher as described here and added Eclipse run config to use it (Run Config Arguments -server com….CustomJettyLauncher) This results in:

jetty-6.1.x
[WARN] Configuration problem at NN Database Connection Poolingjdbc/nndbjavax.sql.DataSourceContainerShareable
java.lang.IllegalStateException: Nothing to bind for name javax.sql.DataSource/default

Presumably at this point I need an entry in the jetty-env.xml defining the resource:

<?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
    <New id="nndb" class="org.mortbay.jetty.plus.naming.Resource">
        <Arg>jdbc/nndb</Arg>
        <Arg> 
            <New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
               <Set name="Url">jdbc:mysql://dbserver/dbname</Set>
               <Set name="User">dbuser</Set>
               <Set name="Password">dbpasswd</Set>
            </New>
        </Arg>
   </New>
</Configure>

But the above error (Nothing to bind for name javax.sql.DataSource/default) remains. Interestingly, if I intentionally bugger up the datasource classname in jetty-env.xml (e.g. NOSUCH.com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource) there’s no gripe, so it may not even be trying to instantiate that class. (Similar “tracer” errors for WebAppContext and Resource DO produce gripes, so it’s only ConnectionPoolDataSource that it’s not trying to instantiate.)

Whew!

Does anyone see what’s wrong? Any recommendations would be greatly appreciated.

Thanks in advance!

  • 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-04T23:53:32+00:00Added an answer on June 4, 2026 at 11:53 pm

    I had to completely change my answer after having played with your project code. Here’s a new one:

    You happened to take a Jetty Launcher code from earlier versions of GWT (I believe). Once I replaced your CustomJettyLauncher with the the version that I had (modified as per the same recommendations but on top of a version from the GWT 2.4 codebase) it all came together. Proper initialization of initial context, the java:comp/env, etc.

    You can actually make your version work with the 6.1.11 too if you add the java:comp/env into the name in jetty-env.xml but I don’t think going that route makes sense. I couldn’t make it work with 6.1.26 and it doesn’t really matter since using proper Jetty Launcher codebase makes it work with either version.

    Here’s the launcher code that works (package and class name is just how you had it so it’s a “drop-in” replacement): https://gist.github.com/2854726


    Leaving a trail for someone who might stumble upon this post later. You get Jetty to show its DEBUG logs in GWT hosted (dev) mode by launching GWT with SPAM log level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
I have a French site that I want to parse, but am running into
I have a text area in my form which accepts all possible characters from
I know there's a lot of other questions out there that deal with 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.