• hokie_high
  • NEWBIE
  • 0 Points
  • Member since 2004

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hello, this might sounds very simple to you but I'm new to java, it seems I can't get the "Case" query working. I got the Enterprise sample running and it has samples for "Account", "Contact and "Task" so I know how to work with those objects. But work with "Case" seems different. I can't declear something like: Case myCase = (Case) qr.getRecords()[i]; since java can't resolve Case class.

Could someone post some sample code for "Case" object to get me started? I want to be able to run Case Update/Insert. Thanks a lot!

-Alex

Please bear with my noob question:

I installed Axis, import enterprise.wsdl, then I copied Samples.java from \EnterpriseSamples4_0\EnterpriseSamples\src\com\salesforce\samples to my working directory.

I try to compile Enterprise Samples4.0 using "javac Samples.java" and it went fine. I got "Samples.class" file but I can't run it. I got following error:

D:\My Documents\SalesForce>java Samples
Exception in thread "main" java.lang.NoClassDefFoundError: Samples (wrong name:
com/salesforce/samples/Samples)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

I appreciate for any comments.

BTW, I can run "QuickStart4_0" sample using the batch file, but if I compiles quickstart.java and try to run it, I got the same error.

 

Hello, this might sounds very simple to you but I'm new to java, it seems I can't get the "Case" query working. I got the Enterprise sample running and it has samples for "Account", "Contact and "Task" so I know how to work with those objects. But work with "Case" seems different. I can't declear something like: Case myCase = (Case) qr.getRecords()[i]; since java can't resolve Case class.

Could someone post some sample code for "Case" object to get me started? I want to be able to run Case Update/Insert. Thanks a lot!

-Alex

Please bear with my noob question:

I installed Axis, import enterprise.wsdl, then I copied Samples.java from \EnterpriseSamples4_0\EnterpriseSamples\src\com\salesforce\samples to my working directory.

I try to compile Enterprise Samples4.0 using "javac Samples.java" and it went fine. I got "Samples.class" file but I can't run it. I got following error:

D:\My Documents\SalesForce>java Samples
Exception in thread "main" java.lang.NoClassDefFoundError: Samples (wrong name:
com/salesforce/samples/Samples)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

I appreciate for any comments.

BTW, I can run "QuickStart4_0" sample using the batch file, but if I compiles quickstart.java and try to run it, I got the same error.