Coldfusion having trouble while loading classes in Jar file

Hi everybody.
I have some weird problem with Coldfusion.
I try to use a Jar file, that i put in the Coldfusion classpath. It works well (i can call some classes in the Jar file using the createObject() function ), but not every classes.
For example,
<cfset ServiceObject = createObject("java", "com.google.api.ads.dfp.v201204.NetworkServiceInterface")>
<cfdump var="#ServiceObject#">
this call works well, and i can the see the dump file.
<cfset dfpServiceObject2 = createObject("java", "com.google.api.ads.dfp.v201204.NetworkServiceSoapBindingStub")>
<cfdump var="#ServiceObject2#">
This call fails, and i got a 500 error :
ROOT CAUSE:
java.lang.NoClassDefFoundError: Could not initialize class com.google.api.ads.dfp.v201204.NetworkServiceSoapBindingStub
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java: 39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorIm pl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at coldfusion.runtime.java.JavaProxy.createObjectWithDefaultConstructor(JavaProxy.java:191)
If i check in the Jar file, i can see the NetworkServiceSoapBindingStub class. Moreover, when i do the same thing directly in a java application, it works well. Nevertheless, Coldfusion is not able to load this class. How can this be possible? Do you have any idea to help me?

I have not been able to resolve this to date. Does anyone have half a clue as to what I might be doing wrong?
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alison Stohrer ([email protected]):
Were you able to resolve this? I am having the same problem.<HR></BLOCKQUOTE>
null

Similar Messages

  • Errors generated while loading classes in jar file

    Hello all,
    I am attempting to install the xml parser using the loadjava utility. Here is my commandline call:
    loadjava -user user/password -r -v xmlparserv2.jar
    where user and password are the appropriate.
    I made sure my CLASSPATH was not set to anything.
    When I run this against Oracle 8.1.5 I get the following for quite a few of the classes in the JAR file.
    resolving: oracle/xml/parser/v2/XMLExternalReader
    Errors in oracle/xml/parser/v2/XMLExternalReader:
    ORA-29534: referenced object XCOM.oracle/xml/parser/v2/XMLNode could not be resolved
    ORA-29545: badly formed class: java.lang.NullPointerException
    Some the classes compile without problems, but the majority report this error. Also it takes some time to compile and reach this conclusion.
    On my first run loadjava reported 227 errors.
    What am I doing wrong. Any and all feedback would be highly appreciated.
    Thanks,
    Bediako George
    null

    I have not been able to resolve this to date. Does anyone have half a clue as to what I might be doing wrong?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Alison Stohrer ([email protected]):
    Were you able to resolve this? I am having the same problem.<HR></BLOCKQUOTE>
    null

  • How to load class from jar file dynamically?

    After I run my Java applicatoin, I need configuring the classpath of jvm to load some classess inside a jar file into the same jvm.How can I achive that?
    I mean, when I run my Java application, I don't know where the jar file is, what the jar file name is. All depends on the user to tell the jvm the details through some UI. I've tried to write: System.setProperty("java.class.path", "c:\myClass.jar");Class.forName("MyClass"); but failed.
    Can you tell my why and how?
    Thx

    After I run my Java applicatoin, I need configuring
    the classpath of jvm to load some classess inside a
    jar file into the same jvm.How can I achive that?
    I mean, when I run my Java application, I don't know
    where the jar file is, what the jar file name is. All
    depends on the user to tell the jvm the details
    through some UI. I've tried to write:
    System.setProperty("java.class.path",
    "c:\myClass.jar");Class.forName("MyClass"); but
    failed.That won't work. By the time it gets to your code it already has a copy of the original. You can't change it (short of modifying the JVM.)
    Can you tell my why and how?The usual way is to use a custom classloader.
    You can start by looking at java.net.URLClassLoader.

  • Problem While Loading mp3 From Jar File?

    Hello There
    I've Made a jar File That Contains mp3 file That Should be Played When the jar is opened
    but the file doesn't play?
    and my code snippet to load from the jar
    URL url=getClass().getResource("/file.mp3");
    MediaLocator ml=new MediaLocator(url);
    final Player player = Manager.createRealizedPlayer(url);
    I don't Know where's The Error
    Could any one Help?

    First_knight wrote:
    Hello
    -Yes I Use NetBeans 6.1 To create The Jar With The Following Steps:
    First I've Add The Sound File To a Package In NetBeans 6.1
    And Then Called The Sound From The Package And The Program Runs Okay Then I Made The jar
    and after making the jar now i have to call the sound file from the jar by the code mentioned above
    i used it and run the program it run okay but when i try to open the jar i hear no sound????????????
    I Don't know whyyyyyyyyy This seems to indicate that your app is finding the mp3 file. You would probably get a null pointer exception if the file wasn't found. Something else seems to be going on.
    -How are you launching the jar outside of NetBeans?...By Double Click On It
    I suggest trying to launch the jar using the command promptjava   -cp   YourJarFile.jar  YourMainClassAnd if that works, try java   -jar   YourJarFile.jarAnd if that works, your computer's file association is not set up correctly.

  • Unable to load classes from jar files inside APP-INF/lib in EAR.

    Weblogic version: 10.3.3
    Platform: Linux x86-64 bit
    We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
    for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
    in 10.3.2 version of weblogic.
    We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
    Any pointers would be appreciated.

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • Having trouble understanding Abstract class. Help!!!!!!

    Having trouble understanding Abstract class. when is Abstract class used and for what.

    Having trouble understanding Abstract class. when is
    Abstract class used and for what.An abstract class is used to force the developer to provide a subclass, to implement the abstract methods, while still keeping the methods that were provided.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • HT1725 I am having trouble down loading a uv digital copy of a movie that i recently purchased. I keep getting error code (-50) has anyone else got this and how do you resolve it?

    I am having trouble down loading a uv digital copy of a movie that i recently purchased. I keep getting error code (-50) has anyone else got this and how do you resolve it?

    Hi,
    Try the following steps:
    1. Check windows updates.
    2. Try the Microsoft Fix it in this kb to remove previous install completely:
    http://support.microsoft.com/kb/2739501/en-us
    3. Reboot.
    4. Try installing again.
    This seems helpful on the issue.
    As always, thank you for your suggestion, Don:)
    Regards,
    Melon Chen
    TechNet Community Support

  • I am having trouble down loading apps

    I am having trouble down loading apps on my iPad, why?

    What do you mean you are having trouble? What is happening and where?

  • I am having trouble while downloading apps it has decline my payment method

    i am having trouble while downloading apps it has decline my payment method how should i slove this

    To Contact iTunes Support and request assistance Click  Here

  • Hi folks, I am having trouble down loading an app that is only available in the United States? should I create a new apple ID account for the U.S.?

    Hi folks, I am having trouble down loading an app onto my IPhone that is only available in the United States? should I create a new apple ID account for this U.S. application

    Sorry... But... You cannot use other countries itunes stores.
    You must be within the Country with a Valid Billing Address and Credit Card for that Country to use the iTunes Store of that Country..
    iTunes Store Terms of Service
    http://www.apple.com/legal/itunes/us/terms.html#SERVICE

  • I'm having trouble down loading my apps on my iphone

    I am having trouble down loading my apps I need help troubleshooting?

    What happens when you try to download apps?  Any error messages?  Are you connected to a Wi-Fi network with Internet access?
    B-rock

  • IO Error while deploying application client jar file ???????

    Hi,
    In my .ear file, one application-client jar(which contains all helper classes which are used in whole application) file is there. While deploying .ear file, all ejb are getting deployed well, while deploying application client jar file(Global.jar file here) it is giving the following message:
    IO Error deploying Global.jar: D:\oracle9ias\oc4j_extended\j2ee\home\applications\trainiumear\Global.jar
    Here is application-client.xml of Global.jar file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application-client_1_2.dtd'>
    <application-client>
    <display-name>TrainiumClientApp</display-name>
    <description>Application description</description>
    </application-client>
    My Environment: Oracle9iAS (9.0.3.0.0), Windows-NT
    Please let me know Why i am getting 'IO Error' , where i may done wrong ?
    Thanks in Advance
    Srinivas

    Srinivas,
    Before we continue, PLEASE tell me if you've looked through the available
    documentation, code samples, "how-to" documents, etc., for OC4J. It
    seems to me that you're mixing things up a bit. I use the "deploy"
    command to deploy my EARs, example (partial):
    java -jar admin.jar ormi://<host> admin <password> -deploy ...
    And my EAR file is not in the "application-deployments" directory
    when I issue that command.
    Perhaps you could also show me the contents of your "application.xml"
    file for this application you are having trouble with.
    But I repeat, please tell me if you have already looked at the
    available documents regarding OC4J!
    Thanks,
    Avi.

  • How to load an applet jar file?

    Hello everyone,
    I have an applet that uses my own jar file and approximately 6 third party jar files. I set up jar indexing (jar -i) which will download the jar files when they are needed. All seems to work well, but now I want to manually load the jar files which I cannot get working.
    When the applet starts, about 1/2 of the jar files are downloaded (because they are needed at startup). I then want to load the additional jar files in the background, after the gui is initialized. I have tried this using the below thread which is executed from within the applet's start method:
    // Try to load additional jar files in background by loading a class from each jar file.
    Thread loadClass = new Thread() {
      public void run() {
        System.out.println("Loading classes...");
        try {
          // Tried loading classes this way, doesn't work.
          getClass().getClassLoader().loadClass("pkg1.Class1");
          getClass().getClassLoader().loadClass("pkg2.Class2");
          getClass().getClassLoader().loadClass("pkg3.Class4");
          getClass().getClassLoader().loadClass("pkg4.Class4");
          /* Loading classes this way doesn't work either.
          Class.forName("pkg1.Class1");
          Class.forName("pkg2.Class2");
          Class.forName("pkg3.Class3");
          Class.forName("pkg4.Class4");
        catch(ClassNotFoundException e) {
          // First attempt to load a class (pkg1.Class1) throws exception.
          System.out.println("Can't find class: " + e.getMessage());
    loadClass.start();As you can see from above I am trying to load a class from each of the jar files so that the jar files would load into memory/cache. Unfortunately, it cannot find the classes. These are the errors from the java console:
    Loading classes...
    Loading: pkg1.Class1
    Connecting http://my.server.com/my_dir/pkg1/Class1.class with no proxy
    Connecting http://my.server.com/my_dir/pkg1/Class1.class with cookie "JSESSIONID=some_big_long_char_list"
    Can't find class: pkg1.Class1
    So it appears the jar file is not being downloaded. When I take away the dynamic jar loading (removing the "jar -i" & adding them all to the applet archive list) the thread executes correctly. So I know the class names, etc, are correct. How does one load an applet jar file?
    Any help/suggestions are appreciated.

    The above error I posted was because I forgot to index the jar files. That is why it couldn't find the jar file. I thought I was getting farther along with my problem, but I apparently just forgot to index the jars. I am now getting the problem that I got yesterday...
    The applet freezes/hangs when it hits the thread. The GUI never opens (even though I'm running this thread right after the gui shows). The java console quits responding and the applet just stays the grey screen. I also tried the invoke later that you suggested.
    public void start() {
      // ...initialize gui...
      // Applet freezes and remains grey, also the java console freezes.
      javax.swing.SwingUtilities.invokeLater(new Runnable() {
        public void run() {
          System.out.println("Loading classes...");
          try {
            // When I comment out the below forName calls, the thread will still run evidenced through the done print statement.
            Class.forName("pkg1.Class1");
         Class.forName("pkg2.Class2");
         Class.forName("pkg3.Class3");
         Class.forName("pkg4.Class4");
            System.out.println("...Done loading classes");
          catch(Exception e)     {
            System.out.println("Can't find class: " + e.getMessage());
    }

  • Can I increase heap memory without specify any class or jar file??

    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    can I increase heap memory without specify any class or jar file??
    thx

    chiara wrote:
    Hi,
    I tried to increase my heap memory in this way :
    java -Xms256m -Xmx256m
    but I got an error ... it's seem that I must specify a class java or a .jar file ...
    This is the error :
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    can I increase heap memory without specify any class or jar file??The job of java.exe is to execute java bytecode.
    What is it supposed to do with your request to use 256m of memory for heap
    when you are not giving it a class or a jar to run?

  • Loading library from jar file

    Hi all,
    My question is can we load library from jar file using System.load() method.
    ex:
    myJar.jar
    |
    |----com.test.common.Util
    which conatins a method to load library from jar file itself, before that i used to load from File
    |---libraries/MozillaParser/......
    Iam able load from Local system,
    File parserLibraryFile = new File("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    File mozillaDistBinDirectory = new File("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(parserLibraryFile.getAbsolutePath() , mozillaDistBinDirectory.getAbsolutePath());
    but i am unable to load from jar file
    URL url = ClassLoader.getSystemClassLoader().getResource("libraries/MozillaParser" + EnviromentController.getSharedLibraryExtension());
    URL url1 = ClassLoader.getSystemClassLoader().getResource("libraries/mozilla.dist.bin."+EnviromentController.getOperatingSystemName());
    MozillaParser.init(url.toString(), url1.toString());
    Thanks in advance.

    That's a really confusing post.
    The easiest way to make sure you can use the classes in a jar file is to copy the jar file to the "/jre/lib/ext" subfolder of your JDK. These classes will be visible to all applications.

Maybe you are looking for

  • Re: Multiple users on one home computer wanting to...

    Can a windows PC (Windows 7) be set up such that each User Account has its own (automatic) log in to Skype where ONLY that User's Skype details are visible, including their Contact List and settings, no-one elses?

  • Can't print to my HP D2460 over the network anymore, after upgrade to SL.

    Hi, I upgraded to Snow Leopard today. Now I can't print to my HP D2460 Deskjet printer anymore. The printer is shared from my Windows XP system via SMB. When I try to print I see the following message in the print queue on the Windows XP system: "Rem

  • Attempting to download the trial version

    I've been attempting unsuccessfully to download the 180day trial version of SharePoint from http://www.microsoft.com/en-us/evalcenter/ I've registered I see it in the evaluation center but it does not allow me to download it. Is there a direct link t

  • Managing applications in WGM at localhost.

    Hi, I'am trying to restrict access to particular Applications through WGM, which is installed localy on client machine., i.e. localhost. I'am doing this from local admin account. Applications are following: Mail.app, Utilities folder, WGM itself. Try

  • Can I use one of the Creative Cloud apps on our other mac at home?

    If I'm not using it on my primary Mac (i.e., if I'm doing disk maintenance or my wife is web browsing on it), can I launch one of the CC apps on our other mac? A given app would be launched on only one of the computers at a time.