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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:24:22+00:00 2026-05-20T01:24:22+00:00

Using jboss5.1.x, ejb3.0 This was driving me crazy for two day now: I am

  • 0

Using jboss5.1.x, ejb3.0

This was driving me crazy for two day now:

I am trying simple where clauses query and I keep on getting that error:


this is what I get with JPSQL query:

       String queString ="select s from T04SysParms s WHERE s.key_Name='EXECUTION_TIME'"; 
        Query q = em.createQuery(queString); 
        List<T04SysParms> results = (List<T04SysParms>) q.getResultList(); 

exception I get:

org.hibernate.QueryException: could not resolve property: key_Name of: com.mirs.ecms.db2.T04SysParms [select s from com.mirs.ecms.db2.T04SysParms s WHERE s.key_Name=’EXECUTION_TIME’]


this is my mappe class:

@Entity
@Table(name = "T04_SYS_PARMS", schema = "ECMS")
public class T04SysParms implements java.io.Serializable
{

// Fields

private String key_Name;
private String value_Name;

// Constructors

/** default constructor */
public T04SysParms()
{
}

/** minimal constructor */
public T04SysParms(String keyName)
{
    this.key_Name = keyName;
}

/** full constructor */
public T04SysParms(String keyName, String valueName)
{
    this.key_Name = keyName;
    this.value_Name = valueName;
}

// Property accessors
@Id
@Column(name = "KEY_NAME", unique = true, nullable = false, length = 100)
public String getKeyName()
{
    return this.key_Name;
}

public void setKeyName(String keyName)
{
    this.key_Name = keyName;
}

@Column(name = "VALUE_NAME", length = 200)
public String getValueName()
{
    return this.value_Name;
}

public void setValueName(String valueName)
{
    this.value_Name = valueName;
}

}

The actualy table name in database: T04_SYS_PARMS
the mapped table name is: T04SysParms

any idea?
thanks,
ray.

  • 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-20T01:24:23+00:00Added an answer on May 20, 2026 at 1:24 am

    VALUE is a reserved word in the sql standard. Do you actually have a column named that? If so, you might need to quote it in the query. Or better, change it to a more meaningful name.

    Based on comments, this was likely not the root problem, though I think it’s healthy to avoid reserved words.

    You’ve also been showing queries that get only the VALUE_NAME field, but then you’re trying to pull a whole T04SysParms out of the result.

    Based on the update including the mappings, a JPQL version of the query:

    String queString ="select s from T04SysParms WHERE s.keyName='EXECUTION_TIME'";
    Query q = em.createQuery(queString);
    List<T04SysParms> results = (List<T04SysParms>) q.getResultList();
    

    should give you back a list of T04SysParms objects conforming to your needs.

    It should be possible to do something similar with the SQL form (adjusting it to get all fields), but to get entities rather than individual fields, JPQL is more appropriate.

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

Sidebar

Related Questions

I am using Jboss5.1, Tomcat 6, Ejb3.0 I was trying to do simple Ejb
I'm trying to implement stateless session bean ejb3 in jboss5 using netbeans6.8 as a
I am using Jboss5.1.x, EJB3.0 I am into this subject for couple of days
I am struggling this for a week. using Jboss5.1.x, EJB3.0, quartz1.8 people refer me
I am using Jboss5.1.x , EJB3.0 I am trying to configure Quartz. I get
I am using JBoss5.1.x AS, EJB3.0. I am trying to add a job (using
I am using EJB3.0, Weblogic 11g I am trying to do simple lookup from
using Jboss5.1.x, EJB3.0, JPA. Is there a way of running a query with DBLINK
I've been struggling for this for a while now. I'm trying to gear up
I am using restEasy(Restful implementation for jboss) ejb3.0, Jboss5.1.1 AS I did restful service

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.