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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:58:04+00:00 2026-05-15T23:58:04+00:00

Occasionally, I get following exception when running my Java EE application with Glassfish: Error

  • 0

Occasionally, I get following exception when running my Java EE application with Glassfish:

Error in allocating a connection. Cause: java.lang.IllegalStateException: 
Local transaction already has 1 non-XA Resource: cannot add more resources.

The application uses a single JDBC connection pool that is not XA-capable. However, I was not yet been able to identify the second resource that causes the exception.

Is there a way to debug/log transactions with Glassfish 2.1?

Something that would help me identifying the offending non-XA resource would be of great help.

  • 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-15T23:58:04+00:00Added an answer on May 15, 2026 at 11:58 pm

    You can enable the logging of JTA / JTS in the log level of the admin console, plus other log levels (I don’t remember exactly which ones are available). The debug information that is produced is however quite cryptic.

    But your issue is quite strange. XA resource can be database connection, jms connection or connection from jca connectors. If you have only one datasource, this would mean that you try to obtain two connections for the same datasource during one transaction. Normally, the application server optimizes this case and serves the same physical connection twice when you try to obtain it from the datasource — but maybe this optimization is not done in your case.

    So if I were you I would try to enable the logging that shows when connection are obtained, and try to spot in the code also all potential places where a connection might be fetched from the pool either directly with a lookup, or indirectly by injection or through a framework (e.g. JPA).

    As a last resort, you can also try to enable “Allow non-component callers” in the datasource configuration, maybe it helps.

    That also reminded me of this other question: “Local transaction already has 1 non-XA Resource: cannot add more resources” error

    Hope it helps.

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

Sidebar

Ask A Question

Stats

  • Questions 542k
  • Answers 542k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use: SELECT p.id as a, p.url as b, t.id as… May 17, 2026 at 3:22 am
  • Editorial Team
    Editorial Team added an answer There are two parts to the problem First Issue You… May 17, 2026 at 3:19 am
  • Editorial Team
    Editorial Team added an answer I thought I'd show the regex approach, too. It doesn't… May 17, 2026 at 3:18 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Occasionally, on a ASP (classic) site users will get this error: [DBNETLIB][ConnectionRead (recv()).]General network
I occasionally get an exception in a JTextArea that I'm updating with JTextArea.append() ...
I call my JavaScript function. Why do I sometimes get the error 'myFunction is
Something else perhaps? I am already using nHibernate, but I get occasional issues where
Occasionally, I've come across a webpage that tries to pop open a new window
Occasionally while attempting to save a Crystal Report that I'm working on in VS2008,
Occasionally I come accross a unit test that doesn't Assert anything. The particular example
Occasionally a program on a Windows machine goes crazy and just hangs. So I'll
Occasionally working in Windows Vista the O.S. will desaturate the screen, rendering all colors
Occasionally I come across methods with an uncomfortable number of parameters. More often than

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.