JDOQL queryfilter failure while retrieving field of "java.lang.Object" Type.

PROBLEM DESCRIPTION --->
JDOQL FILTER ON A FIELD OF "java.lang.Object" TYPE, NOT WORKING.
HELP REQUESTED WITH SUGGESTIONS OR POINTERS TO THE CORRECT SOLUTION.
Deatiled Problem :=
Environment :=
Kodo version 2.4.1 (on Windows 2000).
J2SDK 1.3.1_06 (on Windows 2000).
Database:= MySQL 3.23.55 (on Windows 2000).
Java Class Hierarchy Example:=
SuperPersistentObject
|__ LevelOneDescendant
|__ LevelTwoDescendant
|__ LastDescendant
Procedures Followed :=
Java class named "LastDescendant" is enhanced and persisted in the
database.
The field "m_value" is of java type "java.lang.Object" and is
represented as a "blob" in the database.
Aadequate data is pumped in the field "m_value" (Data of Type
String/Integer/Double/Boolean etc.). The class "LastDescendant" is
retrieved using following JDO specific code :=
SUCCESSFUL EXAMPLE :=
Extent extent= PersistentManager.getExtent
(com.name.project.LastDescendant.class, false);
String m_queryFilter = "";
Query query = PersistentManager.getQuery(extent, m_queryFilter);
Collection m_resultset = (Collection)query.execute();
The above code returns all the available "LastDescendant" objects
persisted in the DB. Post Load, The value in the field "m_value" of
all the retrieved "LastDescendant" objects, is testeded successfully
and found to be matching to the expected values.
FAILED EXAMPLE :=
Extent extent= PersistentManager.getExtent
(com.name.project.LastDescendant.class, false);
//Retrieving only the objects whose "m_value" field contains Integer
// values, between 10 and 9000. (110 objects with Integer value
// between 10 and 9000 are pumped in the DB, for testing).
String m_queryFilter = "(m_value >= 10 && m_value <= 9000)";
Query query = PersistentManager.getQuery(extent, m_queryFilter);
Collection m_resultset = (Collection)query.execute();
NO "LastDescendant" OBJECTS RETRIEVED, the Collection "m_resultset" is
Empty, (Actually Expecting 110 objects).
Tried every other way, using "declareImports()"/ "declareParameters()"/
"declareVariables()" etc. Tried TypeCasting the m_value field to Integer,
but to no avail.
Actual Classes :=
public class SuperPersistentObject implements java.io.Serializable {
protected String appKey;
public class LevelOneDescendant extends SuperPersistentObject {
protected SuperPersistentObject m_classRef;
public class LevelTwoDescendant extends LevelOneDescendant {
protected Object m_value;
public class LastDescendant extends LevelTwoDescendant {
"project.jdo" meta-data entry :=
<class name="SuperPersistentObject"
identity-type="application"
objectid-class="com.name.project.AppKeyImpl">
<field name="appKey" primary-key="true"/>
</class>
<class name="LevelOneDescendant" identity-type="application"
persistence-capable-superclass =
"com.name.project.SuperPersistentObject">
</class>
<class name="LevelTwoDescendant" identity-type="application"
persistence-capable-superclass =
"com.name.project.LevelOneDescendant">
<field name="m_value">
<extension vendor-name="kodo" key="data-column" value="VALUE"/>
</field>
</class>
<class name="LastDescendant" identity-type="application"
persistence-capable-superclass="com.name.project.LevelTwoDescendant">
</class>
JDO related properties :=
javax.jdo.PersistenceManagerFactoryClass =
com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
javax.jdo.option.ConnectionURL= jdbc:mysql://localhost/PRTestDB
javax.jdo.option.ConnectionUserName= SuperUser
javax.jdo.option.ConnectionPassword= <xxxxxx>
javax.jdo.option.ConnectionDriverName= com.mysql.jdbc.Driver
javax.jdo.option.Optimistic= true
javax.jdo.option.RetainValues= true
javax.jdo.option.NontransactionalRead= true
javax.jdo.option.NontransactionalWrite= true
javax.jdo.option.RestoreValues= true
javax.jdo.option.Multithreaded= true
javax.jdo.option.MsWait= 5000
javax.jdo.option.IgnoreCache= false
javax.jdo.option.MinPool= 1
javax.jdo.option.MaxPool= 80
com.solarmetric.kodo.impl.jdbc.WarnOnPersistentTypeFailure= true
com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=
com.solarmetric.kodo.impl.jdbc.schema.DBSequenceFactory
com.solarmetric.kodo.impl.jdbc.FlatInheritanceMapping= true
com.solarmetric.kodo.LicenseKey= <xxxx-yyyy-zzzz-2345-6789>
com.solarmetric.kodo.EnableQueryExtensions= false
com.solarmetric.kodo.DefaultFetchThreshold= 30
com.solarmetric.kodo.DefaultFetchBatchSize= 10

You can't query on a blob column.

Similar Messages

  • Error occurred while sending query result: 'java.lang.NullPointerException'

    I am doing end to end scenario from SQL server to File
    JDBC --XI -- File
    I am getting the following Error while monitoring the sender CC in RWB
    "Error occurred while sending query result: 'java.lang.NullPointerException'
    Please Help !!

    Hi,
    To see the Adapter Error log, try:
    http://<XiServerHostName>:<J2EE-Port>/MessagingSystem
    Try viewing the Audit Log for each message (Newspaper Icon)
    Regards,
    Amitabha

  • All cmp-fields that double as cmr-fields must have an object type??

    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

    I believe there is a requirement that any field used as a primary or
    foreign key must be an object and implement hashCode/equals.
    I'd post in weblogic.developer.interest.ejb.cmp if you want more
    information.
    -- Rob
    Pedro Salazar wrote:
    Greetings,
    I'm deploying an application in weblogic 8.1sp2 that worked fine in
    jboss 3.2. The error is:
    Exception:weblogic.management.ApplicationException: prepare failed for
    ServiceEJB.jar Module: ServiceEJB.jar Error: Exception preparing module:
    EJBModule(ServiceEJB.jar,status=NEW) Unable to deploy EJB:
    ServiceEJB.jar from ServiceEJB.jar: [EJB:011017]Error while reading
    'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: In relationship
    'primitive_TO_primitive_param', role
    'primitive_param_BELONGS_TO_primitive', a cmp-field used to implement
    this relationship has a primitive type. All cmp-fields that double as
    cmr-fields must have an object type. . at
    weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:255) at
    Does it means that I should cmp field from "int" type to "Integer"
    object??? If true, I really don't know why the requirement since in
    jboss worked just fine. But do you confirm it?
    regards,
    Pedro Salazar

  • Error: initialization error: file java\lang\Object.class not found

    when the error listed my classpath's its not the same list that is in my Windows XP environment variable list?
    I am on 9.0.3
    I am assuming I have to set some varible to my new jdk\bin directory. I reinstalled it. I have set it to use jdk 1.4 using the ojvm tool a while back.

    Please help!!
    I did change the jdev.conf file setting:
    SetJavaHome /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
    and I still get this error:
    initiallization erro: file java/lang/Object.class not found in classpath
    I am usgin Oracle JDeveloper 10g 10.1.2 on a Mac OS X Tiger
    Could someone please help?
    thanks a bunch!!!

  • Is there a forName() for java.lang.reflect.Type?

    Is there an equivelant to Class.forName() for all types?
    For example:forName("java.util.List<java.lang.Sring>");
    //or
    forName("int");Such a method would return a java.lang.reflect.Type, instead of return a java.lang.Class
    See also
    Field.getGenericType()
    Method.getGenericReturnType()

    incidentally, getGenericType() will give you the
    generic type of the member being examined, not the
    parameterized type.
    that is, if I declare a method like this:
    public <T extends MyInterface> T getStuff() {
    }I won't be able to reflectively find out what types
    of T are being used at runtime, only that it's of
    type 'T'. of limited use really
    Java's implementation of Generics isn't as good as it
    could be, mainly to maintain backwards compatibiityYou are right in that case because that is not a ParameterizedType that is a TypeVariable.
    Type can encompass both Types.

  • Error: invalid file 'java/lang/Object.class' (wrong version: 48, expected 4

    hi all
    ive installed jdk1.4.1 from jdk1.3 .
    When i try to compile a java file i get this error.
    Error: invalid file 'java/lang/Object.class' (wrong version: 48, expected 45)
    anyone has any idea abt this.
    im stuck :( pls help.
    thanks
    Jan

    Did you uninstall 1.3 completely? Completely in the sense both jdk and jre.
    You may get this error if you use javac of one version and the rt.jar of another version.
    Sudha

  • Java/lang/NoClassDefFoundError: java/lang/Object

    Hi Experts,
    We are installing Java "1.6.0_31.We have updated the environment variables with the correct Java Path but which checking the java -version we are getting the following error.
    java -version
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object
    hence the DAC service is not starting giving the following error.
    startserver.h: startserver.h: cannot open
    OS detected: SunOS
    ld.so.1: java: fatal: libjli.so: open failed: No such file or directory
    Killed
    Following are the environment variable entries.
    PATH=/opt/SUNWspro/bin:/../oracle/product/10.2.0/client_1/bin:/.../Informatica/PowerCenter8.6.1/server/bin:/usr/sfw/bin:/...../JAVA631/jdk1.6.0_31/bin/sparcv9:/.../JAVA631/jdk1.6.0_31/lib:/..../JAVA631/jdk1.6.0_31/jre/lib/sparcv9/jli:/...../JAVA631/jdk1.6.0_31/jre/lib/sparcv9:$PATH
    export PATH
    Need ur support.
    Thanks

    Where do you run shell script?
    What's your Oracle's version?
    What's text of your shell script?
    By asking 100 questions and keeping 90 of them "unanswered" you throw yourself to the list of "blacklist users"
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]
    Edited by: Kamran Agayev A. on May 19, 2009 1:28 PM

  • NoClassDefFound java/lang/Object error

    Hi all,
    I just tried to install JRE 1.4.1 on Win98 and encountered this error when I typed in java -version:
    error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object
    After I installed I added SET CLASSPATH = and the path to my rt.jar and tools.jar to my autoexec.bat, but that didn't seem to work.
    Sorry about posting this here if it isn't appropriate, I tried a forum search but kept getting Server Error.
    Steve

    Look at this thread:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=106425
    Think it is reply 3 or 4, where you have to rename the the java.exe file somewhere in your system path

  • Sort(java.util.LinkedList java.lang.Object ) doesn't work

    Why doesn't this work?
    LinkedList<Object> sysPropsKeys = new LinkedList<Object>(System.getProperties().keySet());
    Collections.sort(sysPropsKeys);
    cannot fnd symbol
    symbol : method sort(java.util.LinkedList<java.lang.Object>)
    location: class java.util.Collections

    I will admit to not having Java1.5 installed on my machine. Haven't yet had the chance to play with generics, but the above DOES work in 1.4, and SHOULD work in 1.5
    Maybe I'm naive but, System.getProperties() returns a Properties object right?
    According to the API: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html: Each key and its corresponding value in the property list is a string.
    All the keys SHOULD be strings.
    AFAIK string are comparable, and shouldn't throw class cast exceptions
    Thus the keys returned from getProperties SHOULD be comparable, and compatible for comparision.
    Ok, I can see your point in that some hackers abuse the Properties class by putting non string keys/values into the Properties Map. In that case the code would become more like your above. I'd probably still go with a TreeMap though, rather than a sorted list of keys. Most time you want the keys, you want the values as well. So if the intention is to print out a sorted list of system properties, and their values, keeping it in a map is best.
    Just my 2 cents,
    evnafets

  • Javah error java.lang.Object not found

    Hi guys-
    I'm trying to run a javah command to generate a .h file... I'm using windows2000 & jdk1.1.8... when I run the command from DOS prompt I keep getting the same eror as java.lang.Object not found: aborting.. I've checked all the classpath and it seems ok ... I have CLASSPATH=..;c:\jdk1.1.8\lib\classes.zip
    Can anybody help me with this???
    Thanx

    Maybe try ; right click my computer ,click the advanced tab and select enviroment variables,click on classpath and then edit,check if it's correct.I had the sam problem and that seemed to fix it. :)

  • Weblogic - a web service with java.lang.Object parameter

    hi all,
    i'm creating a web service with a java.lang.Object parameter.
    my question is as follows:
    when a client calls the web service, how to i get the soap message object and convert it to soap message string using the parameter?
    thanks,
    alex

    Here's some code from one of the Axis samples, this shows the basic process of making a call:
    package samples.message;
    import org.apache.axis.client.Service;
    import org.apache.axis.client.Call;
    import org.apache.axis.message.SOAPBodyElement;
    import org.apache.axis.utils.Options;
    import org.apache.axis.utils.XMLUtils;
    import org.w3c.dom.Element;
    import java.net.URL;
    import java.util.Vector;
    public class TestMsg {
    public String doit(String[] args) throws Exception {
    Options opts = new Options(args);
    opts.setDefaultURL("http://localhost:8080/axis/services/MessageService");
    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress( new URL(opts.getURL()) );
    SOAPBodyElement[] input = new SOAPBodyElement[2];
    input[0] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "Hello"));
    input[1] = new SOAPBodyElement(XMLUtils.StringToElement("urn:foo",
    "e1", "World"));
    Vector elems = (Vector) call.invoke( input );
    SOAPBodyElement elem = null ;
    Element e = null ;
    elem = (SOAPBodyElement) elems.get(0);
    e = elem.getAsDOM();
    String str = "Res elem[0]=" + XMLUtils.ElementToString(e);
    elem = (SOAPBodyElement) elems.get(1);
    e = elem.getAsDOM();
    str = str + "Res elem[1]=" + XMLUtils.ElementToString(e);
    return( str );
    public static void main(String[] args) throws Exception {
    String res = (new TestMsg()).doit(args);
    System.out.println(res);

  • Mapping xsd:anyType element to Java.lang.Object

    Hi,
    I am using JAXB to parse a xml and in the XSD we have one element which is of the anyType and returns java.lang.object from JAXB generated classes. The issue is that when the node contains string and we type cast the returned object to string every thing runs fine but when the element contains embeded xml then the object returned can not be type cast to string.
    code snippet:
    *<xsd:element name="SignatureDefinition" type="xsd:anyType" />*
    and the xml I am parsing contains:
    *<SignatureDefinition>
    <a>name</a>
    <b> job</b>
    </SignatureDefinition>*
    That is the element contains a object which is a well formed xml.
    Can any one guide or provide me the pointers.
    Thanks
    Regards,
    Devesh

    Hello Devesh,
    The "SignatureDefinition" portion of the XML document should be unmarshalled as a DOM Element.
    File file = new File("any.xml");
    Root root = (Root) jaxbContext.createUnmarshaller().unmarshal(file);
    Element element = (Element) root.getSignatureDefinition();
    System.out.println(element.getTextContent());
    If "SignatureDefintion" is the root of the XML document, you should get a JAXBElement wrapping a DOM Element.
    File file = new File("any.xml");
    JAXBElement<Element> root = (JAXBElement<Element>) jaxbContext.createUnmarshaller().unmarshal(file);
    System.out.println(root.getValue().getTextContent());
    -Blaise

  • Finalizer.register(java.lang.Object)

    I need to know th use of Finalizer.register(java.lang.Object) method.
    Can someone please help me...Its urgent!!!!
    Thank you!!
    Message was edited by:
    Java_Freak

    I am instantiating a MQQueue object..... When I run
    the memory debugger it says a call is made to the
    Finalizer.register method and the FInalizer object is
    on heap even after the GC...Why is this a problem? If it is a problem again
    1) Consult the bug database
    2) Post formatted code that reproduces your problem.
    Other than that consult these
    http://java.sun.com/developer/technicalArticles/ALT/RefObj/
    http://www.javaworld.com/javaworld/javatips/jw-javatip79.html
    This is the best and only advice I can give you based on your problem description.

  • The first quthor of java.lang.Object

    The biggest mystery for me in Java still exists as to who really coded the mother of all classes java.lang.Object.
    Here�s what the source of it says in JavaDocs
    * Class <code>Object</code> is the root of the class hierarchy.
    * Every class has <code>Object</code> as a superclass. All objects,
    * including arrays, implement the methods of this class.
    * @author unascribed
    * @version 1.61, 01/23/03
    * @see java.lang.Class
    * @since JDK1.0
    public class Object {

    See the annotation @author above, it says �unascribed� which means unknown. Any one who can solve this mystery for me and come up with the real author of this jni implementation class called �Object�
    I mean, the first one to code Object class...Please help me

    cross-post

  • Who is the author of java.lang.Object

    The biggest mystery for me in Java still exists as to who really coded the mother of all classes java.lang.Object.
    Here�s what the source of it says in JavaDocs
    * Class <code>Object</code> is the root of the class hierarchy.
    * Every class has <code>Object</code> as a superclass. All objects,
    * including arrays, implement the methods of this class.
    * @author unascribed
    * @version 1.61, 01/23/03
    * @see java.lang.Class
    * @since JDK1.0
    public class Object {

    See the annotation @author above, it says �unascribed� which means unknown. Any one who can solve this mystery for me and come up with the real author of this jni implementation class called �Object�
    I mean the first one to write java.lang.Object. Please help me...

    Please don't cross-post

Maybe you are looking for

  • Error in bdc uploading for transaction F-02

    Hi all,        Iam uploading transactional data for the transaction F-02 using BDC call transaction. I  have recorded all the screens of F-02 and internal table with fields also declared. While running the program, it is showing the error saying -- "

  • IPhone wifi-network problem- Please Help!

    I have a problem with my iPhone4. It could only connect to the internet for a couple of minute then it dropped off. But it is still connect to the wifi though and in my Mac the wifi seem to be working fine. Any ideas?

  • SD Assign G/L accounts

    Hi Gurus, Question is: I have pricing condition type Z100 for Direct Labor , Z200 for Indirect labor, ZMAK is markup ( %) . In this case, let's say Z100=$40, Z200=$10, ZMAK=10%, So the total reveune is (40+10)*10%=$55 the revenue for Diret Labor is 4

  • BUG: Export DDL and Data fails for mixed case table/column names

    Hi there, I have found a bug in SQL Developer. See details below. Description: When "Export DDL and Data) function is used on a table/columns not named in UPPERCASE, sql generated by SQL Developer is invalid. Steps to reproduce: - open SQL Developer,

  • OS 9 on my G5 for photoshop 7 ?

    I have OS 10.4.10, and my Adobe Photoshop 7.0.1 won't open. It says it needs OS 9. It doesn't make sense to me to install os9 on my g5.... I am afraid that it will mess with stuff. Any thoughts? Forgive my lack of how these things work.