NullpointerException in SoapUI.jar

Hi .
I'm facing below null pointer exception sometimes.
2012-04-12 09:01:09,187 INFO  [STDOUT] Configuring log4j from [jar:file:/usr/cdhs/adobe_livecycle_es3/tmp/adobejb_server1/ArchiveStore/5029/soapui-2.0. 2.jar!/soapui-log4j.xml]
2012-04-12 09:01:09,188 INFO  [STDOUT] Configuring log4j from [jar:file:/usr/cdhs/adobe_livecycle_es3/tmp/adobejb_server1/ArchiveStore/5029/soapui-2.0. 2.jar!/soapui-log4j.xml]
2012-04-12 09:01:09,193 INFO  [STDOUT] Configuring log4j from [jar:file:/usr/cdhs/adobe_livecycle_es3/tmp/adobejb_server1/ArchiveStore/5029/soapui-2.0. 2.jar!/soapui-log4j.xml]
2012-04-12 09:01:09,202 INFO  [STDOUT] Configuring log4j from [jar:file:/usr/cdhs/adobe_livecycle_es3/tmp/adobejb_server1/ArchiveStore/5029/soapui-2.0. 2.jar!/soapui-log4j.xml]
2012-04-12 09:01:09,245 ERROR [STDERR] java.lang.NullPointerException
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.DefaultSoapUICore.initSettings(DefaultSoapUICore.java:129)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.DefaultSoapUICore.getSettings(DefaultSoapUICore.java:192)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.SoapUI.getSettings(SoapUI.java:1019)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.impl.wsdl.AbstractWsdlModelItem.setConfig(AbstractWsdlModelItem.java:1 16)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.adobe.idp.dsc.webservice.MyWsdlProject.setConfig(WebServiceSoapUIInvoker.java:572)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.adobe.idp.dsc.webservice.MyWsdlProject.setConfig(WebServiceSoapUIInvoker.java:567)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:190)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:126)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:116)
2012-04-12 09:01:09,248 ERROR [STDERR]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:106)
2012-04-12 09:01:09,249 ERROR [STDERR]  at com.adobe.idp.dsc.webservice.MyWsdlProject.<init>(WebServiceSoapUIInvoker.java:568)
And the line number 129 of DefaultSoapUICore.java is
log.warn( "Failed to load settings from [" + e.getMessage() + "], creating new" );
The only thing can be null is log object. Also you can see that livecycle is trying to initialize log4j before the exception. And as the log message, it seems like there are 4 threads to initialize the log4j instance.
I'm doubting some DefaultSoapUICore instance trying to access log instance before it's initialized.
My question is my doubtion is correct? If so, how can I avoid this problem?
Second, if I want to use my own soapui.jar file to avoid this problem after changing code of DefaultSoapUI.java then what I need to do? I generated new soapui.jar file but I don't know where I need to put it.
Regards
- Denis

Sorry, don't know what happened there
I already have the images in a sub-directory to the one where the JAR file is, they are also included in the
jar file using
jar -cvfm ChatClient.jar manifest.txt *.class imagesSo the images are where they should be I think. You mention including the image directory in the
Class-Path in the manifest. I'm not too familiar with JAR's and Manifests, this is the first time I used them,
Could you explain a bit more what you mean?

Similar Messages

  • Multiple operations + complex XSD?

    Hey all,
    I have a very simple web service(Netbeans --> new web service--> add operation, add operation --> return hardcoded string --> deploy), with two operations. Inputs are strings, outputs are strings. This works fine.
    As soon as I change the input of operation1 to HR-XML (a very complex XSD with extensions, which I use jaxb to turn into java classes ), I get a nullPointerException in SoapUI (also an error in NetBeans). The only thing that changes in the WSDL is the <xsd:import namespace = /> section.
    As a side note, If I make a new wsdl (input is HR-XML, output is a string) --> new web service from wsdl --> deploy, it works correctly, but I can't figure out how to add another operation to it (that's callable via SOAP).
    If anyone can lend any help, please do.
    Thanks,
    --Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Here is some more info on the above:
    Method that works as strings:_
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService()
    public class wsTestWS {
        @WebMethod(operationName = "operation1")
        public String operation1(@WebParam(name = "input") String input) {
            return ("Found operation1");
        @WebMethod(operationName = "operation2")
        public String operation2(@WebParam(name = "operation2")    String operation2) {
            return("w00t, operation2");
        }and the wsdl:
    <definitions targetNamespace="http://work.please.com/" name="wsTestWSService">
    &#8722;
    <types>
    &#8722;
    <xsd:schema>
    <xsd:import namespace="http://work.please.com/" schemaLocation="http://hctunx04.us.tgr.net:20010/testWebApp/wsTestWSService?xsd=1"/>
    </xsd:schema>
    </types>
    &#8722;
    <message name="operation1">
    <part name="parameters" element="tns:operation1"/>
    </message>
    &#8722;
    <message name="operation1Response">
    <part name="parameters" element="tns:operation1Response"/>
    </message>
    &#8722;
    <message name="operation2">
    <part name="parameters" element="tns:operation2"/>
    </message>
    &#8722;
    <message name="operation2Response">
    <part name="parameters" element="tns:operation2Response"/>
    </message>
    &#8722;
    <portType name="wsTestWS">
    &#8722;
    <operation name="operation1">
    <input message="tns:operation1"/>
    <output message="tns:operation1Response"/>
    </operation>
    &#8722;
    <operation name="operation2">
    <input message="tns:operation2"/>
    <output message="tns:operation2Response"/>
    </operation>
    </portType>
    &#8722;
    <binding name="wsTestWSPortBinding" type="tns:wsTestWS">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    &#8722;
    <operation name="operation1">
    <soap:operation soapAction=""/>
    &#8722;
    <input>
    <soap:body use="literal"/>
    </input>
    &#8722;
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    &#8722;
    <operation name="operation2">
    <soap:operation soapAction=""/>
    &#8722;
    <input>
    <soap:body use="literal"/>
    </input>
    &#8722;
    <output>
    <soap:body use="literal"/>
    </output>
    </operation>
    </binding>
    &#8722;
    <service name="wsTestWSService">
    &#8722;
    <port name="wsTestWSPort" binding="tns:wsTestWSPortBinding">
    <soap:address location="http://hctunx04.us.tgr.net:20010/testWebApp/wsTestWSService"/>
    </port>
    </service>
    </definitions>
    and now defined with the HR-XML(changes only):_
    code:_
    public String operation1(@WebParam(name = "input") org.hr_xml.ns._2007_04_15.NewHireType input) {
            return ("Found operation1");
        }and the wsdl changes:
    (just the import namespaces at the top. my glassfish just died and im having trouble bringing it back to life.)

  • Images in .jar file , "NullPointerException"

    Hi,
    How do I show images which are present in .jar file.
    e.g
    Toolkit tKit = Toolkit.getDefaultToolkit();
    URL logo = MyTool.class.getResource("images/icon.gif");
    Image g1=tKit.getImage(logo);
    this.setIconImage(globalleafs1);
    this works both in c:\java MyTool
    and while created in a .jar file
    But when I use it for ImageIcon in a button, I get "NullPointerException" while working in a .jar file.
    Here are the methods that I have tried to get it worked
    1.
    new2 = new JButton(new ImageIcon(ClassLoader.getResource("images/new.gif")));
    2.
    URL newim = MyTool.class.getResource("images/new.gif");
    new2 = new JButton(new ImageIcon(newim));
    But it too dont work. Please help me.

    This came up recently -it was solved with MedaiTracker()
    Check back a few pages

  • NullPointerException when validating module *.jar using WebLogic Builder

    Hi,
    When using WebLogic Builder to validate module ceiba.jar, it shows the following errors. How to fix it? Thanks a lot. Attachment is the deployment descriptors.
    Validating module ceiba.jar
    Compiling input jar D:\gzdswebproject\gzdsweb\ceiba.jar
    Processing input descriptor
    ERROR: Error processing input descriptor
    ERROR: Error from ejbc: null
    java.lang.NullPointerException     at weblogic.ejb20.deployer.SessionBeanInfoImpl.assignDefaultTXAttributesIfNecessary(SessionBeanInfoImpl.java:291)     at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeTransactionAttribute(MBeanDeploymentInfoImpl.java:807)     at weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:240)     at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:155)     at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:415)     at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:397)     at weblogic.ejbc20.runBody(ejbc20.java:517)     at weblogic.utils.compiler.Tool.run(Tool.java:146)     at weblogic.utils.compiler.Tool.run(Tool.java:103)     at weblogic.marathon.tasks.EJBCTask.runBackground(EJBCTask.java:140)     at weblogic.tools.jellybeans.core.task.TaskThread.execute(TaskThread.java:127)     at weblogic.tools.jellybeans.core.task.TaskThread.run(TaskThread.java:64)

    following is the ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <display-name>Bblm</display-name>
    <ejb-name>Bblm</ejb-name>
    <home>com.foresee.ceiba.bbxz.BblmHome</home>
    <remote>com.foresee.ceiba.bbxz.Bblm</remote>
    <ejb-class>com.foresee.ceiba.bbxz.BblmBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>Bbnr</display-name>
    <ejb-name>Bbnr</ejb-name>
    <home>com.foresee.ceiba.bbxz.BbnrHome</home>
    <remote>com.foresee.ceiba.bbxz.Bbnr</remote>
    <ejb-class>com.foresee.ceiba.bbxz.BbnrBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>Fjxx</display-name>
    <ejb-name>Fjxx</ejb-name>
    <home>com.foresee.ceiba.comm.FjxxHome</home>
    <remote>com.foresee.ceiba.comm.Fjxx</remote>
    <ejb-class>com.foresee.ceiba.comm.FjxxBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>Yhzxx</display-name>
    <ejb-name>Yhzxx</ejb-name>
    <home>com.foresee.ceiba.comm.YhzxxHome</home>
    <remote>com.foresee.ceiba.comm.Yhzxx</remote>
    <ejb-class>com.foresee.ceiba.comm.YhzxxBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>GsbsProcess</display-name>
    <ejb-name>GsbsProcess</ejb-name>
    <home>com.foresee.ceiba.gsbs.ejb.GsbsProcessHome</home>
    <remote>com.foresee.ceiba.gsbs.ejb.GsbsProcess</remote>
    <ejb-class>com.foresee.ceiba.gsbs.ejb.ejb.GsbsProcessBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>BGDJ</display-name>
    <ejb-name>BGDJ</ejb-name>
    <home>com.foresee.ceiba.swdj.bg.BGDJHome</home>
    <remote>com.foresee.ceiba.swdj.bg.BGDJ</remote>
    <ejb-class>com.foresee.ceiba.swdj.bg.BGDJBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>PersonalRegister</display-name>
    <ejb-name>PersonalRegister</ejb-name>
    <home>com.foresee.ceiba.swdj.gr.PersonalRegisterHome</home>
    <remote>com.foresee.ceiba.swdj.gr.PersonalRegister</remote>
    <ejb-class>com.foresee.ceiba.swdj.gr.PersonalRegisterBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>ProjectRegister</display-name>
    <ejb-name>ProjectRegister</ejb-name>
    <home>com.foresee.ceiba.swdj.xm.ProjectRegisterHome</home>
    <remote>com.foresee.ceiba.swdj.xm.ProjectRegister</remote>
    <ejb-class>com.foresee.ceiba.swdj.xm.ProjectRegisterBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>SqjlCjwtLm</display-name>
    <ejb-name>SqjlCjwtLm</ejb-name>
    <home>com.foresee.ceiba.sqjl.SqjlCjwtLmHome</home>
    <remote>com.foresee.ceiba.sqjl.SqjlCjwtLm</remote>
    <ejb-class>com.foresee.ceiba.sqjl.SqjlCjwtLmBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>SqjlCjwtNr</display-name>
    <ejb-name>SqjlCjwtNr</ejb-name>
    <home>com.foresee.ceiba.sqjl.SqjlCjwtNrHome</home>
    <remote>com.foresee.ceiba.sqjl.SqjlCjwtNr</remote>
    <ejb-class>com.foresee.ceiba.sqjl.SqjlCjwtNrBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>Xxlm</display-name>
    <ejb-name>Xxlm</ejb-name>
    <home>com.foresee.ceiba.xxfb.XxlmHome</home>
    <remote>com.foresee.ceiba.xxfb.Xxlm</remote>
    <ejb-class>com.foresee.ceiba.xxfb.XxlmBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>Xxnr</display-name>
    <ejb-name>Xxnr</ejb-name>
    <home>com.foresee.ceiba.xxfb.XxnrHome</home>
    <remote>com.foresee.ceiba.xxfb.Xxnr</remote>
    <ejb-class>com.foresee.ceiba.xxfb.XxnrBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <session>
    <display-name>ZCDJ</display-name>
    <ejb-name>ZCDJ</ejb-name>
    <home>com.foresee.ceiba.swdj.zc.ZCDJHome</home>
    <remote>com.foresee.ceiba.swdj.zc.ZCDJ</remote>
    <ejb-class>com.foresee.ceiba.swdj.zc.ZCDJBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>Bblm</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>Bbnr</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>Fjxx</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>Yhzxx</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>GsbsProcess</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>BGDJ</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>PersonalRegister</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ProjectRegister</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>SqjlCjwtLm</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>SqjlCjwtNr</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>Xxlm</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>Xxnr</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>ZCDJ</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>

  • NullPointerException thrown in PKCS12KeyStore when verifying a signed JAR

    Hi,
    java -versionjava version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)
    (WinXP)
    I've signed a JAR with a new pkcs12 certificate using:
    jarsigner -keystore mystore.p12 -storetype pkcs12 -verbose my.jar myaliasNo errors or warnings were generated and each class file was listed as it was signed. When I attempt to verify the JAR, I get a NullPointerException from jarsigner, as it attempts to read the first signed entry (.class):
    jarsigner -keystore mystore.p12 -storetype pkcs12 -verbose -verify -debug my.jar5450 Sun Oct 05 07:53:06 EST 2008 META-INF/MANIFEST.MF
    0 Sun Oct 05 07:52:22 EST 2008 com/my/package/subpackage1
    0 Sun Oct 05 07:52:22 EST 2008 com/my/package/subpackage2
    jarsigner: java.lang.NullPointerException
    java.lang.NullPointerException
    at com.sun.net.ssl.internal.pkcs12.PKCS12KeyStore.engineGetCertificateAl
    ias(PKCS12KeyStore.java:721)
    at java.security.KeyStore.getCertificateAlias(KeyStore.java:1092)
    at sun.security.tools.JarSigner.inKeyStore(JarSigner.java:791)
    at sun.security.tools.JarSigner.verifyJar(JarSigner.java:491)
    at sun.security.tools.JarSigner.run(JarSigner.java:193)
    at sun.security.tools.JarSigner.main(JarSigner.java:74)
    Anyone seen anything like this before or can suggest what might cause it? Is there something wrong with my new certificate?
    Thanks
    Brett

    The jarsigner -verify command only verfies the authenticity of the signed JAR file using the certificate inside the .DSA file in the JAR.That's not true. See the Javadoc for the 'jarsigner' tool, in 'verify' mode, 'keystore' option.

  • NullPointerException while accessing .Properties from JAR

    Hi,
    I have created a JAR file which contains the .class as well as .properties in my application. Similarly when generating the JAR i have included the respective JAR's as well as the Main class of the app. in the Manifest.MF file.
    Below is the code i am using to load the properties from the LoggerConstants.
    if (properties == null) {
                   try {
                        properties = new Properties();
                        properties.load(Thread.currentThread().getContextClassLoader()
                                  .getResourceAsStream (LoggerConstants.LOGGER_PROPERTIES_PATH));
                        PropertyConfigurator.configure(properties);
                   } catch (IOException ioe) {
                        throw new LoggerException("unable to load file="
                                  + LOGGER_PROPERTIES_PATH, ioe);
    When i access the JAR in other app. by putting that in the build path, i am getting the following exception:-
    Exception in thread "main" java.lang.NullPointerException
         at java.util.Properties$LineReader.readLine(Properties.java:418)
    It seems that it is not able to pick the .properties which is there in the JAR file? But it is able identify the .class file?
    I tried by copying the same in the ANT Class path in eclipse, but still the problem persists. What i need to make sure that the .properties will be identified by the other app (App. 2)? Please shed some light into this.
    Thanks,
    Rithu

    Thanks Guys, the logger.properties will be under the classpath in the eclipse which will be under " src/com/example/logger.properties" directory. To brief , i am going to give this logger app. by compressing it in the JAR and will send to another machine , they need to use this JAR in their application and make use of the LogLevels i have created. The same will be done for other app. as well. So a Single Logger comp. which is build independently will be used by other standalone app. which needs to log the information.
    1) So, when i give the "LoggerComponent" JAR to other application. they should not modify any code (or create any classes) to use the .class or the .properties of the JAR?
    2) .class may not be a problem, but with .properties which may be a problem, hence are you saying that we need to load the logger.properties again in the referenced app. explictly, like wise do it for other app. which is going to use it? Because from my side i will give the Logger Comp. JAR to the other machines, just they need to use it as it is, without any modification in their code.
    3) Moreover when i create a JAR whether i need to package log4j.jar as well as other dependent JAR for the logger app.? So that the other reference app. dont have their own log4j.jar in their system to make use of it? Whether that makes sense or we should package a JAR with other JAR's(dependent JAR of the app.)?
    4) Ok. say if i am going to access the properties in my JAR in the reference app., like:-
    String sConfigFile = "src/com/example/logger.properties";
    InputStream in = LoggerTest.class.getClassLoader().getResourceAsStream(sConfigFile);
    if (in == null) {
         //File not found! (Manage the problem)
    Properties props = new java.util.Properties();
    props.load(in);
    LogManager logManager = new LogManager(); // Main class in the LoggerApplication JAR used in the reference app.
    logManager.logMessage("Test log msg");
    I will load properties and invoke the main class in JAR like above? Please clarify these queries. Thanks for the support
    Thanks,
    rithu

  • Jar NullPointerException

    This program runs fine when compiled and run anyway but in a jar file. The following code is where the problem lies:
    public void setPanelPicture(String picName)
            /* sets the picture being displayed. picName is the name of the file, for
             *instance "intro.jpg"
        URL url = getClass().getResource("/images/"+picName);
        picture.setIcon(new ImageIcon(url));
    }where picture is a JLabel previously initialized.
    when the same code is run to play a midi file, it works fine, both for the jar and otherwise, that code is only slightly different, using a AudioClip instead of an ImageIcon. Why doesn't it work in jar files?

    what I mean is, the code compiles and WORKS <u> great </u> until I place it into a jar file. once in a jar file though, I get a string of errors pointing to these lines and several in ImageIcon. NullPointerException. That means that it can't find the location, even though a similar line of code works fine with sound files, the sound code looks like this:
    try
                URL url = getClass().getResource("/music/intro.mid");
                currentMusic=JApplet.newAudioClip(url);
            } catch (Exception e) {System.out.println(e.toString());}I don't see how this is any different from the code above, this works in both normal mode- when compiled and run, and when placed in jar format. Any help would be greatly appreciated.

  • I am getting a NullPointerException when trying to use the Service class

    I am getting a NullPointerException which is as follows
    java.lang.NullPointerException
    file:/K:/Learner/JavaFx2/ProductApplication/dist/run166129449/ProductApplication.jar!/com/product/app/view/viewsingle.fxml
      at com.product.app.controller.ViewSingleController.initialize(ViewSingleController.java:70)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
    And my View SingleController is as follows
    package com.product.app.controller;
    import com.product.app.model.Product;
    import com.product.app.service.ViewProductsService;
    import com.product.app.util.JSONParser;
    import com.product.app.util.TagConstants;
    import java.net.URL;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.ResourceBundle;
    import javafx.collections.ObservableList;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.fxml.FXML;
    import javafx.fxml.Initializable;
    import javafx.scene.control.ProgressIndicator;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.Region;
    import javafx.stage.Stage;
    import javax.swing.JOptionPane;
    import org.apache.http.NameValuePair;
    import org.apache.http.message.BasicNameValuePair;
    import org.json.JSONArray;
    import org.json.JSONObject;
    * FXML Controller class
    * @author Arun Joseph
    public class ViewSingleController implements Initializable {
        private static String action = "";
        @FXML
        private TextField txtID;
        @FXML
        private TextField txtName;
        @FXML
        private TextField txtPrice;
        @FXML
        private TextArea txtDesc;
        @FXML
        private Region veil;
        @FXML
        private ProgressIndicator p;
        private ViewProductsService service = new ViewProductsService();
        private JSONObject product = null;
        private JSONParser parser = new JSONParser();
        private int pid = 1;
        public void setPid(int pid) {
            this.pid = pid;
         * Initializes the controller class.
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.4)");
            p.setMaxSize(150, 150);
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
            Product product = new Product();
            service.start();
            ObservableList<Product> products = service.valueProperty().get();
            products.get(pid);
            txtID.textProperty().set(String.valueOf(products.get(pid).getPid()));
            //product = service.valueProperty().get().get(pid);
            //txtID.setText(String.valueOf(product.getPid()));
            txtName.textProperty().set(product.getName());
            txtPrice.textProperty().set(String.valueOf(product.getPrize()));
            txtDesc.textProperty().set(product.getDescription());
        private SomeService someService = new SomeService();
        @FXML
        private void handleUpdateButtonClick(ActionEvent event) {
            action = "update";
            someService.start();
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
        @FXML
        private void handleDeleteButtonClick(ActionEvent event) {
            action = "delete";
            someService.start();
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
        @FXML
        private void handleCancelButtonClick(ActionEvent event) {
            closeStage();
        private void closeStage() {
            ViewSingleController.stage.close();
        private static Stage stage = null;
        public static void setStage(Stage stage) {
            ViewSingleController.stage = stage;
        private class SomeService extends Service<String> {
            @Override
            protected Task<String> createTask() {
                return new SomeTask();
            private class SomeTask extends Task<String> {
                @Override
                protected String call() throws Exception {
                    String result = "";
                    int success = 0;
                    List<NameValuePair> params = new ArrayList<NameValuePair>();
                    switch (action) {
                        case "update":
                            params.add(new BasicNameValuePair("pid", txtID.getText()));
                            params.add(new BasicNameValuePair("name", txtName.getText()));
                            params.add(new BasicNameValuePair("price", txtPrice.getText()));
                            params.add(new BasicNameValuePair("description", txtDesc.getText()));
                            product = parser.makeHttpRequest(TagConstants.url_update_product_with_id, "POST", params);
                            success = product.getInt(TagConstants.TAG_SUCCESS);
                            if (success == 1) {
                                result = "Successfully Updated the product";
                                JOptionPane.showMessageDialog(null, result);
                                closeStage();
                            break;
                        case "delete":
                            params.add(new BasicNameValuePair("pid", txtID.getText()));
                            product = parser.makeHttpRequest(TagConstants.url_delete_product_with_id, "POST", params);
                            success = product.getInt(TagConstants.TAG_SUCCESS);
                            if (success == 1) {
                                result = "Successfully Deleted the product";
                                JOptionPane.showMessageDialog(null, result);
                                closeStage();
                            break;
                    return result;

    Time Machine has its own mechanism for deleting files. The number you are seeing may represent a "underflow" or a number of files which exceeds the limit and becomes negative.
    The best way to remove TM files is via the TM interface: select the files and click the Gear and select delete from all backups.
    If you are deleting files on an external drive which once included TM files, it is best to use the terminal and just delete them directly. They go bye-bye without ever seeing the trash bucket.
    Of course, using the terminal is not for everyone.
    What you might be able to do is restore the files from trash and then delete them properly or in smaller bundles.

  • Images in Jar files

    Hi,
    I am creating a recipe book application. Everything is exactly how I want to so I am trying to make a jar file with it.
    On the first screen that loads there is one image, when I make the jar file it doesn't seem to be able to find the image once I am outside of eclipse and running the jar.
    I have created a folder in called resources in my scr folder (src/resources) this is where I am storing the image.
    The method near the bottom (private void addPic()) is where I am having troubles.
    package recipe1_5;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    import javax.imageio.*;
    import java.awt.image.*;
    * This provides an entry point into the program
    * as well as the first window
    * the main() function is at the bottom
    public class Main implements ActionListener {
         JFrame f = new JFrame();
         Container p = f.getContentPane();
         JButton newR = new JButton("Add a New Recipe");
         JButton oldR = new JButton("Look Up An Old Recipe");
         JLabel title = new JLabel("Please make a selection");
         public void actionPerformed(ActionEvent e){
              String whichButton = e.getActionCommand();
              if(whichButton.equals("Add a New Recipe")){
                   @SuppressWarnings("unused")
                   Recipe newRecipe = new Recipe();
                   f.setVisible(false);
                   f.dispose();
              if(whichButton.equals("Look Up An Old Recipe")){
                   @SuppressWarnings("unused")
                   OldRecipeChooser orc = new OldRecipeChooser();
                   f.setVisible(false);
                   f.dispose();
         }//END actionPerformed
         public Main(){
              f.setSize(200,300);
              f.setLocation(500,100);
              f.setTitle("Recipe Magic");
              p.setLayout(new FlowLayout());
              p.add(title);
              p.add(newR);
              p.add(oldR);
              newR.addActionListener(this);
              oldR.addActionListener(this);
              addPic();
              f.setVisible(true);
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         }//END contr ChooseWindow()
         private void addPic(){
              try{
                   String imgLocal = System.getProperty("user.dir");
                   if(System.getProperty("os.name").contains("Windows")){
                        imgLocal += "\\RecipeMagic1_5.gif";
                        JOptionPane.showMessageDialog(null, imgLocal);
                   else
                        imgLocal += "/RecipeMagic1_5.gif";
                   BufferedImage image = ImageIO.read(new File(System.getProperty("user.dir" + imgLocal)));
                   JLabel pic = new JLabel(new ImageIcon(image));
                   p.add(pic);
              catch(Exception e){
                   JOptionPane.showMessageDialog(null, "Image Load Error","ERROR", JOptionPane.ERROR_MESSAGE);
                   e.printStackTrace();
         public static void main(String args[]){
              Main m = new Main();
    }//END class ChooseWindowI have tryed this two different ways. The first how it is. And the second with something like this:
    ImageIcon ii = new ImageIcon(getClass().getResource("resources/RecipeMagic1_5"));Any insight on how to get the image from inside of the jar file would be great
    Forgot to add, it either throws a NullPointerException or a FileNotFoundException in the catch clause of addPic()
    Edited by: tyelford on Dec 15, 2010 11:46 AM

    Ok, so it works good on Mac, but if I try to use it on Windows it will not load the image,
    Here is the code that works on Mac but not windows:
    private void addPic(){
              try{
                   String imgLocal = System.getProperty("user.dir");
                   if(System.getProperty("os.name").contains("Windows")){
                        imgLocal = "resources\\RecipeMagic1_5\\RecipeMagic1_5.gif";
                   else
                        imgLocal = "resources/RecipeMagic1_5/RecipeMagic1_5.gif";
                   ImageIcon ii = new ImageIcon(getClass().getResource(imgLocal));
                   JLabel pic = new JLabel(ii);
                   p.add(pic);
              catch(Exception e){
                   JOptionPane.showMessageDialog(null, "Image Load Error","ERROR", JOptionPane.ERROR_MESSAGE);
                   e.printStackTrace();
         }I get an Image Load Error on Windows, but the same file on Mac runs perfect

  • Unable to load any XML from JAR - Please help!!

    Hi All,
    I am a student in the final days of my degree. I have been working on my final project for some time now, an applet which converts input text to a signal plot for line encoding schemes - AMI, NRZ etc. It is pretty much finished, but one small bug threatens to scuttle the entire project! I have been searching the web all day long for answers with little success, and as the castor forum still appears to be down I am posting here. Any suggestions or advice would be greatly appreciated.
    The applet uses the castor databinding framework to load various XML data. I am using Eclipse 3.01 for development - when the program is run locally as an applet, everything works fine. When the program is bundled into a JAR file and nested into a clean folder with a html page and the jar file, when the command to read in XML is given, a NullPointerException occurs, indicating that castor was unable to access the XML files.
    Below is one of the methods used to make castor load XML data:
         public CodeSet loadCodeXML(String _codesetFilename)
              String _mappingURI = "schema/codes/codesets-mapping.xml";
              String _codesetURI = "schema/codes/" + _codesetFilename;
                    // Create a new Castor mapping object
              Mapping mapping = new Mapping();                         
            try                                                                 // Attempt to load in the selected XML character set
                 mapping.loadMapping(_mappingURI);                    // Initialize 'mapping' with the map file
                Unmarshaller unmar = new Unmarshaller(mapping); // Create a new XML Unmarshaller that uses 'mapping'
                // The line below creates a new CharSet object called _codeset and populates it with the XML data
                CodeSet _codeset = (CodeSet)unmar.unmarshal(new InputSource(new FileReader(_codesetURI)));
                // The character set was successfully loaded, so pass new CharSet object back to caller and end
                return _codeset;
            } catch (Exception e) {
                 // If an error occurs while extracting the XML data, this block will execute:
                JOptionPane.showMessageDialog(null, e);               // Display a message dialog containing the exception error
                return null;                                             // Do not return a CharSet object to caller
         }It would seem to me the problem lies within
              String _mappingURI = "schema/codes/codesets-mapping.xml";
              String _codesetURI = "schema/codes/" + _codesetFilename;I have read that files inside a JAR can be accessed in this way ( http://archive.codehaus.org/castor/user/msg00025.html ) but it won't appear to work.
    If these are set to a full system path (outside any JAR) i.e. "/home/me/proj/schema/codes/codesets-mapping.xml", the application operates fine. Clearly this is no good however, as the XML data must reside within the JAR package. I have tried many permutations such as "jar://schema/..." , "/schema/..", "schema/..", with no success. I have read of using InputStream and getResource methods to access files within the jar but have had no success. I have checked the schema dir is being put into the JAR archive.
    Could anyone suggest an appropriate way of loading XML files from within a JAR file in this context?
    Thanks in advance for any replies.

    Hi, me again..
    Re: mr_doghead - the filename of the file is passed from the calling function
    public CodeSet loadCodeXML(String _codesetFilename)eg loadCodeXML(ami.xml) will return a CodeSet object containing the ami xml data
    Anyway, I've manged to fix it up. The problem actually lies within castor, not my code at all. This is a known bug in castor that the dev's deemed 'not important' to fix, but I have to say the work around is EXTREMLY poorly documented online. Hence, this post is just to say how to fix it up if ne1 else is having trouble...
    To load mappings, use:
    mapping.loadMapping(getClass().getResource(_mappingURI).toString());where _mappingURI is a string such as "/xml/mapfile.xml"
    However, the unmarshalling method takes in a file object, so getResourceAsStream must be used:
    CharSet _charset = (CharSet)unmar.unmarshal(new InputSource(getClass().getResourceAsStream(_charsetURI)));Where CharSet is your custom object you are marshalling into, and _charsetURI is a relative path to your xml file.
    Ugly as hell? Very.
    Does it work? Perfectly.
    take it ez guys, time for me to go hand this sht in! ;D

  • "bc4j.xcfg" file not in classpath  (and not in JAR file)

    Hi, this is a very similar problem to one reported today. I have created a JClient application that connects to a DB and displays some info in a JFrame. Running the application through JDeveloper, all is fine. But, if I create a jar file and run it directly through the jar file, I get this error message:
    C:\Work\Client\View\deploy>java -jar my_client.jar
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file /combit/common/bc4j.xcfg in the classpath
    at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java: 344)
    at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:331)
    at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:532)
    at oracle.jbo.client.Configuration.createRootApplicationModule(Configura tion.java:1320)
    at
    oracle.jbo.client.Configuration.createRootApplicationModule(Configura tion.java:1298)
    at view.Login.jbInit(Login.java:81)
    at view.Login.<init>(Login.java:39)
    at view.MainFrame.<clinit>(MainFrame.java:26)
    at view.Combit.<init>(Combit.java:13)
    at view.Combit.main(Combit.java:50)
    In fact, the bc4j.xcfg file is not inside my JAR file (it belongs to the BC4J project, so when I created the JAR file for my "View" project, it never came into.
    How should I create the JAR file to have this file inside and fix my problem??
    Thanks a lot,
    David

    I'm having a similar problem -- but I am just trying to run the BC4J project -- not a project dependent on the BC4J components... where is the classpath being incorrectly set?
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-33001: Cannot find the configuration file infra\mainmenu\bc4j\common\bc4j.xcfg in the classpath
         void oracle.jbo.JboException.<init>(java.lang.Throwable)
              JboException.java:344
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:481
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file infra\mainmenu\bc4j\common\bc4j.xcfg in the classpath
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:314
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    oracle.jbo.JboException: JBO-33000: Cannot find the configuration file registerConnectionsFromDocument
         void oracle.jbo.client.Configuration.registerConnectionsFromDocument()
              Configuration.java:871
         void oracle.jbo.client.Configuration.loadFromStream(java.io.InputStream)
              Configuration.java:248
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:308
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484
    ## Detail 0 ##
    java.lang.NullPointerException
         void oracle.jbo.client.Configuration.registerConnectionsFromDocument()
              Configuration.java:860
         void oracle.jbo.client.Configuration.loadFromStream(java.io.InputStream)
              Configuration.java:248
         void oracle.jbo.client.Configuration.loadFromClassPath(java.lang.String)
              Configuration.java:308
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.createPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:272
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.PoolMgr.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              PoolMgr.java:457
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.common.ampool.ContextPoolManager.findPool(java.lang.String, java.lang.String, java.lang.String, java.util.Properties)
              ContextPoolManager.java:166
         oracle.jbo.common.ampool.ApplicationPool oracle.jbo.uicli.mom.JUMetaObjectManager.createPool(java.lang.String, java.util.Properties)
              JUMetaObjectManager.java:471
         oracle.jbo.common.ampool.SessionCookie oracle.jbo.http.HttpContainer.findSessionCookie(javax.servlet.http.HttpSession, java.lang.String, java.lang.String, java.util.Properties)
              HttpContainer.java:638
         oracle.jbo.common.ampool.SessionCookie oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, oracle.cabo.data.jbo.def.RootAppModuleDef)
         oracle.jbo.ApplicationModule oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(oracle.cabo.servlet.BajaContext, java.lang.String)
         void oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page, oracle.cabo.ui.RenderingContext)
         void oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         void oracle.cabo.servlet.AbstractPageBroker.renderPage(oracle.cabo.servlet.BajaContext, oracle.cabo.servlet.Page)
         oracle.cabo.servlet.Page oracle.cabo.servlet.PageBrokerHandler.handleRequest(oracle.cabo.servlet.BajaContext)
         void oracle.cabo.servlet.UIXServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
              HttpServlet.java:740
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              HttpServlet.java:853
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
              ServletRequestDispatcher.java:721
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
              ServletRequestDispatcher.java:306
         boolean com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:767
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:259
         void com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run()
              HttpRequestHandler.java:106
         void EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run()
              PooledExecutor.java:803
         void java.lang.Thread.run()
              Thread.java:484

  • Getting "java.lang.NullPointerException" error message when trying to run an OATS OpenScript file from Eclipse to Create a record in Oracle EBS

    Hello,
    I'm trying to run a simple OpenScript script in Eclipse that creates a record (a Supplier in this case) in Oracle E-Business Suite. So I copied the the script file from OpenScript and created it as a Class in Eclipse.  Then I created a main class to call the methods within the script class but no matter what method I call (initialize, run or finalize) I'm getting the java.lang.NullPointerException message. The error doesn't seem to be related with any specific line in the script but with the way that I'm calling it.
    Should I call the OpenScript class from my main class in a different way? (see my examples below)
    BTW, all external .jar files coming with OATS have been added to my project in Eclipse.
    1) Here's the main class I created to call the OpenScript method (Eclipse auto-corrected my main class adding a Try and Catch around the method call):
    public class Test {
        public static void main(String[] args) {
            nvscript nvs = new nvscript();
            try {
                nvs.initialize();
            } catch (Exception e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
    2) Here's the script from OpenScript (the actual script has more steps but I'm just using the first one for a proof of concept):
    import oracle.oats.scripting.modules.basic.api.*;
    import oracle.oats.scripting.modules.browser.api.*;
    import oracle.oats.scripting.modules.functionalTest.api.*;
    import oracle.oats.scripting.modules.utilities.api.*;
    import oracle.oats.scripting.modules.utilities.api.sql.*;
    import oracle.oats.scripting.modules.utilities.api.xml.*;
    import oracle.oats.scripting.modules.utilities.api.file.*;
    import oracle.oats.scripting.modules.webdom.api.*;
    import oracle.oats.scripting.modules.formsFT.api.*;
    import oracle.oats.scripting.modules.applet.api.*;
    public class nvscript extends IteratingVUserScript {
        @ScriptService oracle.oats.scripting.modules.utilities.api.UtilitiesService utilities;
        @ScriptService oracle.oats.scripting.modules.browser.api.BrowserService browser;
        @ScriptService oracle.oats.scripting.modules.functionalTest.api.FunctionalTestService ft;
        @ScriptService oracle.oats.scripting.modules.webdom.api.WebDomService web;
        @ScriptService oracle.oats.scripting.modules.applet.api.AppletService applet;
        @ScriptService oracle.oats.scripting.modules.formsFT.api.FormsService forms;
        public void initialize() throws Exception {
            this.getSettings().set("formsft.useformsonly",true);
            browser.launch();
        public void run() throws Exception {
            beginStep(
                    "[1] E-Business Suite Home Page Redirect (/ebs12cloud.winshuttle.com:8000/)",
                    0);
                web.window(2, "/web:window[@index='0' or @title='about:blank']")
                        .navigate("http://ebs12.xxxxxxx.com:8000/");
                web.window(4, "/web:window[@index='0' or @title='Login']")
                        .waitForPage(null);
                    think(4.969);
                web.textBox(
                        7,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_text[@id='usernameField' or @name='usernameField' or @index='0']")
                        .setText("winshuttle_user");
                    think(2.0);
                web.textBox(
                        8,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .click();
                    think(1.109);
                web.textBox(
                        9,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:input_password[@id='passwordField' or @name='passwordField' or @index='0']")
                        .setPassword(deobfuscate("kjhkjhkj=="));
                    think(1.516);
                web.button(
                        10,
                        "/web:window[@index='0' or @title='Login']/web:document[@index='0']/web:form[@id='DefaultFormName' or @name='DefaultFormName' or @index='0']/web:button[@id='SubmitButton' or @value='Login' or @index='0']")
                        .click();
            endStep();
        public void finish() throws Exception {       
    3) Here's the error messages I'm getting based on the method I call from my main class:
    3.a) when calling Initialize():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.getSettings(IteratingVUserScript.java:723)
        at nvscript.initialize(nvscript.java:22)
        at Test.main(Test.java:9)
    3 b) when calling Run():
    java.lang.NullPointerException
        at oracle.oats.scripting.modules.basic.api.IteratingVUserScript.beginStep(IteratingVUserScript.java:260)
        at nvscript.run(nvscript.java:30)
        at Test.main(Test.java:9)
    Any help and/or constructive comment will be appreciated it.
    Thanks.
    Federico.

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • Loading all jars in a folder at runtime

    Hi...
    Suppose , i have a folder in which there are many jars which depends upon each others....
    I need to load all the jars at one go ....
    I am using below code
    public URLClassLoader loaderNEW(String jarFileName) {
              File file = new File("D:\\ESTED JAR\\");
         String libDir="D:\\ESTED JAR\\";
         try {
              File dependencyDirectory = new File(libDir);
                   File[] files = dependencyDirectory.listFiles();
                   URL[] urls = new URL[20];
                   for (int i = 0; i < files.length; i++) {
                   if (files.getName().endsWith(".jar")) {
                   urls[i]=(files[i].toURL());
                   //urls.add(files[i].toURI().toURL());
         // Convert File to a URL
         // Create a new class loader with the directory
         ClassLoader loader = new URLClassLoader(urls);
         // Load in the class; Class.childclass should be located in
         // the directory file:/c:/class/user/information
         Class cls = loader.loadClass("user.informatin.Class");
         } catch (MalformedURLException e) {
         return loader;
    its is giving error
    Exception in thread "main" java.lang.NullPointerException
         at sun.misc.URLClassPath$3.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getLoader(Unknown Source)
         at sun.misc.URLClassPath.getResource(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 java.lang.ClassLoader.loadClass(Unknown Source)
         at LoadClass.loaderNEW(LoadClass.java:33)
         at LoadClass.main(LoadClass.java:10)
    Please help me out......
    Thanks in advance

    Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    } catch (MalformedURLException e) {
    }Never swallow exceptions.
    at LoadClass.loaderNEW(LoadClass.java:33)Something is null that shouldn't be at line 33 of LoadClass.java
    Better go through some beginner tutorials before you play around with ClassLoaders and the like. Identifying the cause of a NullPointerException is much more fundamental than
    Loading all jars in a folder at runtimedb

  • Error in executing servlet JSPRunner: java.lang.NullPointerException

    I have some problems with my jsp files.
    I am using iAS6sp4 and iWS 6 on W2K.
    I created a EJB jar file and an empty WAR file (No JSP, Servlet, just web.xml & ias-web.xml) and pack them into a ear file for deployment. It was successful.
    Then I copy some jsp files to <iasinstall>/ias6/ias/APPS/<app name>/<war name>
    and restart the ias and iws server.
    When I try the URL: "http://myserver/NASApp/<app name>/myjsp.jsp", I got this error message from kjs.
    JSPRunner: init
    Exception: SERVLET-execution_failed: Error in executing servlet JSPRunner: java.lang.NullPointerException
    My jsp didn't include any java code, just pure htm code. I want to give it a test. But even though I tried with a proper jsp i still got this message. pls advise.
    Alan

    Hi,
    I got this working. Here are the steps that I followed and the output...
    Steps
    1. Deployed the helloworld application
    2. Invoked the application to see if it works fine
    3. Copied the myjsp.jsp to the C:\iPlanet\ias6\ias\APPS\helloworld\helloworld directory
    4. Shutdown the iAS and iWS and started again
    5. Invoked the .jsp file by typing http://sundts2.india.sun.com:81/NASApp/helloworld/myjsp.jsp in the browser.
    Output of KJS
    [16/Mar/2002 14:46:06:5] info: ENGINE-ready: ready: 10819
    **********Registered ebnls interceptor ...!
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:22:4] info: JSPRunner: init
    [16/Mar/2002 14:46:22:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    [16/Mar/2002 14:46:26:4] info: jsp.APPS.helloworld.myjsp: init
    [16/Mar/2002 14:46:26:4] info: --------------------------------------
    The myjsp.jsp coding is...
    <HTML>
    <BODY>
    <H1>This is a .jsp file for testing</H1>
    </BODY>
    </HTML>
    I believe the problem in your case must be that the .jsp file has been placed in a directory where iAS is not able to recognise. I'm sure this will help. Please feel free to raise questions on this.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Error with running a jar, but not when i run it in eclispe?

    I built this program which works without any errors in eclispe, it is within a package called com.dceg.rules..
    but when i packaged it into a jar, i get this error...
    java.lang.ClassNotFoundException: com.dceg.rules (file:\C:\Source\dom\Validator Package\Validator.jar!\com\dceg\rules
    ) does not appear to be a valid package
    What can be wrong?
    Here is the manifest file
    Manifest-Version: 1.0
    Class-Path: jargs.jar log4j-1.2.13.jar dnsjava-2.0.2.jar com/dceg/rule
    s/
    Created-By: 1.5.0_06 (Sun Microsystems Inc.)
    Main-Class: com.dceg.rules.Validator
    Here is where the errors comes up from..
    public void getClasses(String pckgname) throws ClassNotFoundException {
    // This will hold a list of directories matching the pckgname. There may be more than one if a package is split over multiple jars/paths
    ArrayList<File> directories = new ArrayList<File>();
    try {
    ClassLoader cld = Thread.currentThread().getContextClassLoader();
    if (cld == null) {
    logger.error(new ClassNotFoundException("Can't get class loader."));
    String path = pckgname.replace('.', '/');
    // Ask for all resources for the path
    Enumeration<URL> resources = cld.getResources(path);
    //System.out.println("r: "+resources.nextElement());
    while (resources.hasMoreElements()) {
    directories.add(new File(URLDecoder.decode(resources.nextElement().getPath(), "UTF-8")));
    } catch (NullPointerException x) {
    logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Null pointer exception)"));
    } catch (UnsupportedEncodingException encex) {
    logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Unsupported encoding)"));
    } catch (IOException ioex) {
    logger.error(new ClassNotFoundException("IOException was thrown when trying to get all resources for " + pckgname));
    // For every directory identified capture all the .class files
    for (File directory : directories) {
    if (directory.exists()) {
    // Get the list of the files contained in the package
    String[] files = directory.list();
    for (String file : files) {
    // we are only interested in .class files
    if (file.endsWith(".class")) {
    // removes the .class extension
    classes.put( file.substring(0, file.length() - 6) , (pckgname + '.' + file.substring(0, file.length() - 6)) );
    } else {
    **********throw new ClassNotFoundException(pckgname + " (" + directory.getPath() + ") does not appear to be a valid package");******* <-- error here
    Message was edited by:
    hamham3001

    Heres the code again.. looks better now
    public void getClasses(String pckgname) throws ClassNotFoundException {
            // This will hold a list of directories matching the pckgname. There may be more than one if a package is split over multiple jars/paths
              ArrayList<File> directories = new ArrayList<File>();
            try {
                ClassLoader cld = Thread.currentThread().getContextClassLoader();
                if (cld == null) {
                     logger.error(new ClassNotFoundException("Can't get class loader."));
                String path = pckgname.replace('.', '/');
                // Ask for all resources for the path
                Enumeration<URL> resources = cld.getResources(path);
                //System.out.println("r: "+resources.nextElement());
                while (resources.hasMoreElements()) {
                    directories.add(new File(URLDecoder.decode(resources.nextElement().getPath(), "UTF-8")));
            } catch (NullPointerException x) {
                 logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Null pointer exception)"));
            } catch (UnsupportedEncodingException encex) {
                 logger.error(new ClassNotFoundException(pckgname + " does not appear to be a valid package (Unsupported encoding)"));
            } catch (IOException ioex) {
                 logger.error(new ClassNotFoundException("IOException was thrown when trying to get all resources for " + pckgname));
            // For every directory identified capture all the .class files
            for (File directory : directories) {
                if (directory.exists()) {
                    // Get the list of the files contained in the package
                    String[] files = directory.list();
                    for (String file : files) {
                        // we are only interested in .class files
                        if (file.endsWith(".class")) {
                            // removes the .class extension
                            classes.put( file.substring(0, file.length() - 6) , (pckgname + '.' + file.substring(0, file.length() - 6)) );
                } else {
                    throw new ClassNotFoundException(pckgname + " (" + directory.getPath() + ") does not appear to be a valid package");
        }

Maybe you are looking for