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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:16:51+00:00 2026-05-25T01:16:51+00:00

I have a web application deployed in a Tomcat 5.5 container. I use a

  • 0

I have a web application deployed in a Tomcat 5.5 container. I use a SessionEventListener bean that logs some activities in the database. Sometimes I get this error message:

java.sql.SQLException: StandardXAConnectionHandle:prepareStatement should not be used outside an EJBServer
    at org.enhydra.jdbc.standard.StandardXAConnectionHandle.prepareStatement(StandardXAConnectionHandle.java:310)
    at org.enhydra.jdbc.standard.StandardXAConnectionHandle.prepareStatement(StandardXAConnectionHandle.java:255)
    at org.springframework.jdbc.core.PreparedStatementCreatorFactory$PreparedStatementCreatorImpl.createPreparedStatement(PreparedStatementCreatorFactory.java:233)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:532)
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:739)
    at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:762)
    at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:213)
    at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:217)
    at hu.rate.session.RateDBSessionRegistry$4.doInTransactionWithoutResult(RateDBSessionRegistry.java:124)
    at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
    at hu.rate.session.RateDBSessionRegistry.refreshLastRequest(RateDBSessionRegistry.java:120)

The code that fails is the following:

txTemplate.execute(new TransactionCallbackWithoutResult() {
            @Override
            public void doInTransactionWithoutResult(
                    TransactionStatus paramTransactionStatus) {
                if(template.update(us, paramMap) == 0) {
                    logger.warn("No session in registry to be refreshed, sessionId = " + sessionId);
                }
            }
        });

public void setTxManager(PlatformTransactionManager txManager) {
         txTemplate = new TransactionTemplate(txManager);
    }

My Spring bean config looks like this:

<bean id="jotm" class="org.springframework.transaction.jta.JotmFactoryBean" />
    <bean id="txManager"
        class="org.springframework.transaction.jta.JtaTransactionManager">
        <property name="userTransaction">
            <ref local="jotm" />
        </property>
    </bean>

I do not really understand this issue, can you explain me what is wrong and how to fix it?

  • 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-25T01:16:52+00:00Added an answer on May 25, 2026 at 1:16 am

    According to this page I found it looks like it is caused by an underlying NullPointerException. Also interestingly enough, there is a comment in that code right below it on if you want to use PreparedStatements you need to comment out two lines and uncomment two other lines. Might be worth looking into.

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

Sidebar

Related Questions

I have a web application that is deployed on WebSphere and that use one
I have a web application project (wap) that is successfully being deployed to a
I have an ASP.NET web application that, for whatever reason, when it is deployed
I have a web application deployed on path /var/lib/tomcat6/webapps/abc/</code> in server.xml on path /etc/tomcat/server.xml
I have developed a java 1.4 web application.Application is deployed on jboss(tomcat). suppose my
I have a web application (WAR) that I want to deploy in Tomcat 5.
I have a JSP web application deployed to tomcat. The url of the application
I have a web application deployed on tomcat. In this application are ExecutorService to
We have a web application deployed on a tomcat server. There are certain scheduled
I have developed an web application using JSP and deployed in tomcat server. 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.