When does the Java main(String args[]) method exit?

Hi all,
I and my colleagues want to know, when does the main() method exit?
we wrote a small code as follows:
import java.awt.*;
public class Test {
public static void main(String[] args) {
Frame f = new Frame("hi");
f.show();
System.out.println("after show");
and ran the program, in which case I could see the printed message "after show", but although there is no code after the System.out.println(), the Java virtual machine does not exit and waits for the Frame to close.
My question is has the main method exited in this case? since it clearly shows that it does not have any more code to execute. Does java create the main method as a thread or as a process?
regards,
Harshad

To make your application terminate you need to add code to cause the AWT thread to handle the termination. In your code, before f.show(), try:
f.addWindowListener(new WindowAdapter() {
  public void windowClosing(WindowEvent e) {
    dispose();
  public void windowClosed(WindowEvent e) {
    System.exit(0);
});Now, at least you can click on the little "X" on the upper right-hand corner of the Frame (at least in Win95/98/NT) environments) to cause your application to receive a window closing event. It is also possible to add a menu with an option to exit; in that case I'd use an EventQueue to cause a window closing event to be sent.

Similar Messages

  • Can't find file when use the main(String[] args) method

    I put a file under the DefaultDomain directory of Weblogic 11.1.1.5 on my local machine. Below is how I look up this file
    FileInputStream fis = new FileInputStream("input.xml");
    I started up the IntegratedWeblogicServer instance and I tested using the below 2 approaches.
    1) When I test a web service program using the below approach, it CAN'T find the input.xml file
    public static void main(String[] args)
    2) When I package it into an EAR file and deploy it onto the server then log into the admin console and use the test client approach then it's able to find the file
    How do I make it so it can find the file using #1 approach?
    Thanks

    That's how relative paths work, and it's nothing particular to Java.
    When you type ls input.xml or dir input.xml does it list the file, or give an error? If it lists the file, then it's in your current directory, and it will work if you run Java from that directory. If it gives an error, then that file is not in your current working directory, and Java won't be able to find it either.

  • How to call java with public static void main(String[] args) throws by jsp?

    how do i call this from jsp? <%spServicelnd temp = new spServicelnd();%> does not work because the program has a main. can i make another 2nd.java to call this spServiceInd.java then call 2nd.java by jsp? if yes, how??? The code is found below...
    import java.net.MalformedURLException;
    import java.io.IOException;
    import com.openwave.wappush.*;
    public class spServiceInd
         private final static String ppgAddress = "http://devgate2.openwave.com:9002/pap";
         private final static String[] clientAddress = {"1089478279-49372_devgate2.openwave.com/[email protected]"};
    //     private final static String[] clientAddress = {"+639209063665/[email protected]"};
         private final static String SvcIndURI = "http://devgate2.openwave.com/cgi-bin/mailbox.cgi";
         private static void printResults(PushResponse pushResponse) throws WapPushException, MalformedURLException, IOException
              System.out.println("hello cze, I'm inside printResult");
              //Read the response to find out if the Push Submission succeded.
              //1001 = "Accepted for processing"
              if (pushResponse.getResultCode() == 1001)
                   try
                        String pushID = pushResponse.getPushID();
                        SimplePush sp = new SimplePush(new java.net.URL(ppgAddress), "SampleApp", "/sampleapp");
                        StatusQueryResponse queryResponse = sp.queryStatus(pushID, null);
                        StatusQueryResult queryResult = queryResponse.getResult(0);
                        System.out.println("Message status: " + queryResult.getMessageState());
                   catch (WapPushException exception)
                        System.out.println("*** ERROR - WapPushException (" + exception.getMessage() + ")");
                   catch (MalformedURLException exception)
                        System.out.println("*** ERROR - MalformedURLException (" + exception.getMessage() + ")");
                   catch (IOException exception)
                        System.out.println("*** ERROR - IOException (" + exception.getMessage() + ")");
              else
                   System.out.println("Message failed");
                   System.out.println(pushResponse.getResultCode());
         }//printResults
         public void SubmitMsg() throws WapPushException, IOException
              System.out.println("hello cze, I'm inside SubmitMsg");          
              try
                   System.out.println("hello cze, I'm inside SubmitMsg (inside Try)");                         
                   //Instantiate a SimplePush object passing in the PPG URL,
                   //product name, and PushID suffix, which ensures that the
                   //PushID is unique.
                   SimplePush sp = new SimplePush(new java.net.URL(ppgAddress), "SampleApp", "/sampleapp");
                   //Send the Service Indication.
                   PushResponse response = sp.pushServiceIndication(clientAddress, "You have a pending Report/Request. Please logIn to IRMS", SvcIndURI, ServiceIndicationAction.signalHigh);
                   //Print the response from the PPG.
                   printResults(response);
              }//try
              catch (WapPushException exception)
                   System.out.println("*** ERROR - WapPushException (" + exception.getMessage() + ")");
              catch (IOException exception)
                   System.out.println("*** ERROR - IOException (" + exception.getMessage() + ")");
         }//SubmitMsg()
         public static void main(String[] args) throws WapPushException, IOException
              System.out.println("hello cze, I'm inside main");
              spServiceInd spsi = new spServiceInd();
              spsi.SubmitMsg();
         }//main
    }//class spServiceInd

    In general, classes with main method should be called from command prompt (that's the reason for main method). Remove the main method, put the class in a package and import the apckage in your jsp (java classes should not be in the location as jsps).
    When you import the package in jsp, then you can instantiate the class and use any of it's methods or call the statis methods directly:
    <%
    spServiceInd spsi = new spServiceInd();
    spsi.SubmitMsg();
    %>

  • What happens when main(String[] args)

    Hi techies,
    I am trying to understand, "how the JVM invokes public static void main(String[] args)".
    I had gone through JVM tutorial, and found that there are 2 different types of classloaders 1. bootstrap loader 2. user defined class loader.
    I had gone through java api for class loader class. i did not find the method main(String[] args).
    I am having confusion whether bootstrap loader calls main(String[] args)(or) userdefined classloader calles main(String[] args).
    Why do we have to give String[] args as argument to main??
    can you guys guide to understand this .
    regards,
    Krishna

    Hi techies,
    I am trying to understand, "how the JVM
    invokes public static void main(String[] args)".
    I had gone through JVM tutorial, and
    found that there are 2 different types of
    classloaders 1. bootstrap loader 2. user defined
    class loader.
    I had gone through java api for class
    loader class. i did not find the method
    main(String[] args).
    I am having confusion whether bootstrap
    loader calls main(String[] args)(or) userdefined
    classloader calles main(String[] args).
    Why do we have to give String[] args as
    argument to main??
    can you guys guide to understand this
    regards,
    Krishnawell, you won't find main(String[] args) in the docs for ClassLoader, since it's not a method on ClassLoader!
    the bootstrap loader loads, verifies, prepares and initializes the class for which you pass the fully.qualified.name into the JVM, and looks for the static method on that class called 'main' which has a single argument, an array of Strings, and no return type ( I'm not 100% sure of that last part actually - I'll try it ) and begins a thread of execution on that method. from there, your program is run
    we have to give an array of Strings in order to pass arguments into the program
    it can't be a user-defined classloader that does this, because most of the time there won't be a user-defined classloader!

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(&#8220;getRealPath = &#8221; + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • Why can't created an object in the "public static void main(String args[])"

    Example:
    public Class Exp {
    public static void main(String args[])
    new Exp2();-------------> To Occur Error
    Class Exp2 {
    public Exp2()

    You can't create an inner class within main, because
    it is a static method. Inner classes can only be
    created by true class methods.This is not correct. You can create an inner class object in a static method. You just have to specify an outer class object that the inner class object should be created within:
    Exp2 exp2 = new Exp().new Exp2();

  • Static main(String args[]) access modifiers possible

    main(String args[]) can have private as access modifier?

    hi,
    yes of course this is possible, because main is at the end only a method like each other. But you have to know, that you cannot use this method from outside. so no application will start, if the main() of the Main-class has a private as modifier.
    You can use this class as an applet.
    So be carefull doing this
    regards

  • Why should i write main(String[] args)?

    Hello,
    I don't know why i am obliged in the main function of the class to send an array of string as parameters?
    Thanks

    Actually I think this is a great question!
    main()
    Any java application has to have a main method to do anything, but as you gain further into java and object orientated practices you will start writing lots of stuff that do NOT have a main method but are *.java and *.class files, neither will they do anything unless they are attached to a program with a main. Andthen as you get DEEPER still you might even have 'private synchronised void main(String[] args)' - though not too often.
    Why an array of strings? Hmmm ...pauses ...thinks, there is no obvious reason, other than the fact that if you're going to pass parameters from 'java ...' command line to the application. This is, logically, the most potentially useful data type to have. There may well be other reasons for this, so the answer to the second part of your question is a logical deduction - it may not be right.

  • Private static void main(String args[]) ... ?????

    even if the main method is declared
    private static void main(String args[])
    //Code Here
    it works fine..can somebody explain the reason behind?

    hi rkippen
    so u mean, since the JVM is calling the main it can
    break all kinds of access specifiers to any class..am
    i right?
    This could be the case.
    However, I tried using 1.4.1 with no development environment (just java.exe) and it gave the following error:
    C:\>java MainTest
    Main method not public.
    So, your development environment might be the cause (e.g. what you use to program your code (e.x. JBuilder)), or the Java version.
    Your development environment might be using reflection to get around Java accessibility checks. For debugging purposes, it is possible to use reflection to obtain refereneces to private methods/fields and invoke those methods and access those fields.
    E.g.
    Vector v = new Vector();
    Field f = v.getClass().getDeclaredField("elementCount");
    f.setAccessible(true); // this is the trick
    f.set(v, new Integer(100));In the presence of a security manager, the setAccessible method will fire a "suppressAccessChecks" permission check.

  • When does the JVM exit and deleteOnExit();?

    I developed a JSP that queries a database, displays the results in a browser, and writes the results to the server as a file. While the user is viewing the JSP, they can click on a download link to save the file that was written to the server. Everything works fine!
    I would like to delete the file that was written to the server (to save space), however, I can't delete the file until the user is finished viewing the JSP. I need some help concerning this method: java.io.File.deleteOnExit() the API states:
    "Requests that the file or directory denoted by this abstract pathname be deleted when the virtual machine terminates. Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification (12.9)."
    If I use this method, When does the JVM exit? I tested it in my home environment using Tomcat and the file was deleted when I stopped Tomcat. If I run this on a web server, does the JVM ever exit? If so when?
    Thanks
    --Scott

    The JVM stays active so long as the Java based webserver (or the servlet engine if your webserver is connected to one) is up. Only when you shutdown your server will the VM terminate. (Similar to what you observed with tomcat)

  • When does the new version of J2EE will be available?

    Hi,
    Do you know, When does the new version of J2EE will be available?
    Who can we ask for improvements or fixes? Or it is just the people that has bought suport?
    I hope they can release 'pingConnectionPool' code, so people can trace jdbc driver problems.
    Thanks,
    Lorenzo Jim�nez

    Thanks for your concern,
    Well, to tell the truth, the same driver is working ok in the application server without a connection pool with "connection = DriverManager.getConnection(url, username, password)".
    Also works ok on IBM websphere, Jakarta Tomcat, with or without pool. Its is just Sun's connection pool. Also I have seen other threads showing JSK 1.4 is not quite compatible like this one:
    http://forum.java.sun.com/thread.jsp?forum=136&thread=499803&tstart=0&trange=15
    I tried every conceivable parameter; even I looked at the proper documentation at
    http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzahh/page1.htm
    and forums, and it seems that no one can know or can help us about this error because is particulary at Sun app server. So this is the server.log:
    [#|2004-06-07T12:17:31.064-0600|INFO|sun-appserver-pe8.0|javax.enterprise.system.tools.admin|_ThreadID=12;|
    com.sun.enterprise.tools.guiframework.exception.FrameworkError: com.sun.enterprise.tools.guiframework.exception.FrameworkException: java.lang.reflect.InvocationTargetException on 'class com.sun.enterprise.tools.admingui.handlers.CommonHandlers.invokeMBean'. This occurred while attempting to process a 'command' event for 'pingButton'.
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.execute(DescriptorViewHelper.java:279)
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.execute(DescriptorViewBeanBase.java:187)
         at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
         at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:822)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:780)
         at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:590)
         at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:951)
         at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:622)
         at com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:186)
         at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:480)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:768)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.GeneratedMethodAccessor69.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:583)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:582)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:305)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:166)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException: java.lang.reflect.InvocationTargetException on 'class com.sun.enterprise.tools.admingui.handlers.CommonHandlers.invokeMBean'. This occurred while attempting to process a 'command' event for 'pingButton'.
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.dispatchEvent(DescriptorViewHelper.java:735)
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.execute(DescriptorViewHelper.java:250)
         ... 59 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandler(DescriptorViewHelper.java:785)
         at com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.dispatchEvent(DescriptorViewHelper.java:731)
         ... 60 more
    Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException: com.sun.enterprise.tools.guiframework.exception.FrameworkException: com.sun.enterprise.tools.guiframework.exception.FrameworkException: javax.management.MBeanException: Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
         at com.sun.enterprise.tools.admingui.handlers.CommonHandlers.invokeMBean(CommonHandlers.java:91)
         ... 66 more
    Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException: com.sun.enterprise.tools.guiframework.exception.FrameworkException: javax.management.MBeanException: Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
         at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:38)
         at com.sun.enterprise.tools.admingui.util.MBeanUtil.invokeMBean(MBeanUtil.java:140)
         at com.sun.enterprise.tools.admingui.handlers.CommonHandlers.invokeMBean(CommonHandlers.java:83)
         ... 66 more
    Caused by: com.sun.enterprise.tools.guiframework.exception.FrameworkException: javax.management.MBeanException: Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
         at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:112)
         at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:35)
         ... 68 more
    Caused by: javax.management.MBeanException: Operation 'pingConnectionPool' failed in 'resources' Config Mbean.
         at com.sun.enterprise.admin.MBeanHelper.extractAndWrapTargetException(MBeanHelper.java:355)
         at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:302)
         at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:823)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
         at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:54)
         at $Proxy1.invoke(Unknown Source)
         at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:282)
         at com.sun.enterprise.tools.admingui.util.MBeanUtil.invoke(MBeanUtil.java:105)
         ... 69 more
    Caused by: javax.resource.ResourceException
         at com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:605)
         at com.sun.enterprise.connectors.ConnectorRuntime.testConnectionPool(ConnectorRuntime.java:520)
         at com.sun.enterprise.admin.mbeans.ResourcesMBean.pingConnectionPool(ResourcesMBean.java:1805)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:287)
         at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:280)
         ... 80 more
    Caused by: javax.resource.ResourceException
         at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:73)
         at com.sun.enterprise.connectors.ConnectorConnectionPoolAdminServiceImpl.testConnectionPool(ConnectorConnectionPoolAdminServiceImpl.java:597)
         ... 88 more
    |#]

  • Standard input - main(String[] args) -- how?

    In eclipse, how do I feed the main with values?
    public static void main(String[] args) {
           System.out.println("Enter value: ");
           args =
        if (args.length != 1) {
    ...Thanks,
    george

    You mean basically command line arguments?
    Look in the run menu. For every run event there's a form that specifies how to invoke the program. Somewhere in there you can specifiy the command line arguments. I can't recall right now but I can look it up if you can't find it.
    Standard input is a completely different thing from command line arguments. Standard input, from the java point of view, is what comes in on System.in.

  • I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5. I am receiving an error problem when doing the following -  I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive whe

    Hi, I am having a little trouble with exporting images to another drive and Catalogue and need some help if anyone can give me some advice
    I am currently using Lightroom 5.6 and operating on a Mac with OSX Ver 10.9.5.
    I am receiving an error problem when doing the following -
    I am exporting selected photos from a particular Catalogue saved on Drive 1 to a folder created on another Drive where a Lightroom Catalogue has been created. In this Catalogue I have arranged for the images once exported to be moved to a different folder - I used the Auto Import process under the File dialogue box.
    When processing the Export I receive an error message for each of the images being exported indicating the following -
    Heading Import Results
    Some import operations were not performed
    Could not move a file to requested location. (1)
    then a description of the image with file name
    Box Save As                                  Box  OK
    If I click the OK button to each image I can then go to the other Catalogue and all images are then transferred to the file as required.
    To click the OK button each time is time consuming, possibly I have missed an action or maybe you can advise an alternative method to save the time in actioning this process.
    Thanks if you can can help out.

    Thank You, but this is a gong show. Why is something that is so important to us all so very, very difficult to do?

  • ABAP Dump is encountered when doing the negative subsequent adjustment

    Hi Experts !!!
    An ABAP Dump is encountered when doing the negative subsequent adjustment (posting a 102 movt type) on a Purchase Order via the Z function module. The dump only happens if the scenario satisfies the following conditions:
    1.Material is either (but may not be limited to) 3000000234, 4000000121, 3000000210 (These are the only reported materials)
    2.Order unit in Purchase Order is in MT
    3.At 2nd weigh, Net Weight is less than PO Order Qty.
    Note: No error occurs if same process is done via MIGO.
    Initial Analysis:
    An exception/error occurs when calling function u201CMB_CREATE_MATERIAL_DOCUMENT_UTu201D .
    Please see below error anlysis report from after executin Zfunction module code.
    Error analysis
       Short text of error message:
       Material 3000000234 / US01 Column 0001: MSEG-BPMNG not in quantity table
       /not consistent
       Long text of error message:
        Diagnosis
            Before the system posts a material document for an HPM/TDP material
            (MARA-CMETH = 1 or 2), it performs the following consistency
            checks:
            o   For each unit of measure in the Unit of Measure Group
                (MARC-UOMGR), a line item  has to be present  in the additional
                quantity appendix table (Table MSEGO2)
            o   For each unit of measure in the main core table MSEG that is
                not initial a line item, has to be present in the additional
                quantity appendix  table (Table MSEGO2) and the corresponding
                packed format quantities have to be identical.
                This way, inconsistent stock level updates can be prevented.
        System Response
            The system stops processing.
        Procedure
            If the error is reproducible, contact your system administrator.
        Procedure for System Administration
            The inconsitency can have several reasons, for example:
            o   Incorrect postings from external systems using function module
                MB_CREATE_GOODS_MOVEMENT
            o   Handling errors
            o   Application programming errors
       Technical information about the message:
    Message class....... "O3"
    Number.............. 359
    Variable 1.......... 3000000234
    Variable 2.......... "US01"
    Variable 3.......... 0001
    Variable 4.......... "BPMNG"
    Please let me know,if you want some other details.

    Problem Issolved

  • How does the ADF support romote call method between two managed server ?

    How does the ADF support romote call method between two managed server ?

    You would usually use this as a WebService through the WSDL that is exposed.
    JDeveloper can help you create a Java Proxy to call the Web service if you point it to the WSDL file that was generated for your AM.
    Some other samples here:
    http://www.connotea.org/user/jdeveloper/tag/Service%20Interface

Maybe you are looking for

  • PUMP process is Running. Not generating message in report.No replication

    Hi, I am using GoldenGate 11g with Oracle database 11g on IBM AIX server at source and Linux at destination. I have created the extract process and the pump process but the pump process is not responding. The report of my PUMP process is as below. I

  • I cant access the root share of a windows server after upgrading to mountain lion

    Hi Guys, Since upgrading to mountain lion i cant access the shared drives on our windows server. For example in a windows machine if i go to run the type \\server\ i get all the visible shares available. in my previous version i was able to do the sa

  • Error while Registering XML Schema

    Hi Team, The mail purpose of my project is to load data from XML feed file into Oracle tables. I did following steps which went perfectly fine ... I did following steps. 1)create DIRECTORY xml_dir as 'c:\xmldata'; 2) create table xmltab of XMLType; 3

  • IPhone / iPad syncing issues.

    What I'm using: iPhone 4S 32GB - iOS 6 iPad 3rd Gen 16GB - iOS 6 MacBook Pro 2011 i7 (OS 10.8.2)  --- iTunes 10.7 When i plug either the iPhone or the iPad in to my computer to sync them both, the iPad/iPhone will vibrate off and on, thinking its plu

  • Home Movies over Apple TV

    Greetings: I have a significant amount of home movies on my windows computer in AVI format.  I want to save a copy of all AVI files.  I also have Quicktime Pro. What is the most efficient (space saving with best resolution) way of playing the AVI mov