Annotations - error in Sun Tutorial?

In the Q&E section of The Sun Tutorial on Annotataions (http://java.sun.com/docs/books/tutorial/java/javaOO/QandE/annotations-answers.html), it says,
Question 2: Compile this program:
interface Closable {
void close();
class File implements Closable {
@Override
public void close() {
//... close this file...
What happens? Can you explain why?
Answer 2: The compiler generates an error complaining that File.close doesn't override any method from its superclass. This is because it is not overriding Closable.close, it is implementing it!
But...
I get no errors (or any other messages) and File.class and Closeable.class files are created.
Is the tutorial wrong? Or something else?
How would you change the sample code to get the answer the tutorial gives?
Thank you.
see also http://java.sun.com/docs/books/tutorial/java/javaOO/QandE/annotations-questions.html

C:\Documents and Settings\ejp\Tests\src\OverridesTest.java:23: method does not override a method from its superclass
Is that the code you actually compiled?

Similar Messages

  • Error: package sun.java2d.cmm does not exist

    I started to use Netbeans IDE 7.0.1 with jdk 7u9. I have an issue with
    import sun.java2d.cmm.ColorTransform;
    import sun.java2d.cmm.PCMM;
    etc.
    If I import from the package sun.java2d.cmm I can run but I can NOT build my project because of error: package sun.java2d.cmm does not exist.
    Please help.

    java -cp .;c:\scientists\darwin.jar
    MyProgramam i supposed to place the above code where i had
    previous put
    import com.darwinsys.util.*;
    No. The command above is how you run your program. I assumed you had already compiled it. To compile it you need the command
    javac -classpath .;c:\javacooksrc2\javacooksrc2.jar MyProgramAll the classpath does is tell the java compiler or the JVM where to find classes that are needed to compile/run your program.

  • Error installing Sun ONE Directory Server 5.2 under Windows 2000 SP3

    Hi,
    When I attempt to install the Sun ONE Directory Server 5.2 under Windows 2000 Server SP3, I get the following errors:
    Installing Sun ONE Server Basic System Libraries
    Installed:C:\WINNT\system32\icudt2.dll
    Installed:C:\WINNT\system32\icuin2.dll
    Installed:C:\WINNT\system32\icuuc2.dll
    Installed:C:\WINNT\system32\libadminutil52.dll
    Installed:C:\WINNT\system32\libadmsslutil52.dll
    Uninstalling C:\WINNT\System32\icudt2.dll
    Uninstalling C:\WINNT\System32\icuin2.dll
    Uninstalling C:\WINNT\System32\icuuc2.dll
    Uninstalling C:\WINNT\System32\libadminutil52.dll
    Uninstalling C:\WINNT\System32\libadmsslutil52.dll
    Uninstalling C:\WINNT\System32\libnspr4.dll
    Uninstalling C:\WINNT\System32\libplc4.dll
    Uninstalling C:\WINNT\System32\libplds4.dll
    Uninstalling C:\WINNT\System32\nsldap32v50.dll
    Uninstalling C:\WINNT\System32\nsldappr32v50.dll
    Uninstalling C:\WINNT\System32\nsldapssl32v50.dll
    Uninstalling C:\WINNT\System32\nss3.dll
    Uninstalling C:\WINNT\System32\sasl32.dll
    Uninstalling C:\WINNT\System32\smime3.dll
    Uninstalling C:\WINNT\System32\ssl3.dll
    Product Install Failed: java.io.FileNotFoundException: C:\WINNT\System32\libnspr4.dll (Access is denied)
    I've checked, and this file does not pre-exist under WINNT\System32.
    Any ideas why I'm getting this error? Is this a bug in the installer?
    Cheers,
    Scott

    IIRC this file, sasl32.dll, should get installed onto %WINDIR%\system32 when you install DS5.2 windows version.
    You may run WinZIP and File/Open "d52diu.zip" (DS5.2 zip image) and look for "nsbasesys.zip", double click to Open it and you should find "sasl32.dll" there.
    Gary

  • Question about a sun tutorial

    Many times on here i have been told that its bad to have more than 1 JFrame in 1 application. I am working on my stuff and i am trying to look at other applications to help me. I came across the suns tutorial relating to Dukes Bakery, which is swing and JDBC. Nearly every class in this tutorial extends a JFrame. I just wanted to get more information on why it is bad to extend more than 1 JFrame and why would they do this in this tutorial.
    cheers

    nick2price wrote:
    Many times on here i have been told that its bad to have more than 1 JFrame in 1 application. I've never seen this as bad, but extending a JFrame may be.
    I am working on my stuff and i am trying to look at other applications to help me. I came across the suns tutorial relating to Dukes Bakery, which is swing and JDBC. Nearly every class in this tutorial extends a JFrame. I just wanted to get more information on why it is bad to extend more than 1 JFrame and why would they do this in this tutorial.
    cheersIf you are using a JFrame as your base for a GUI form, then extending the JFrame itself is considered "bad practice" as you are mixing GUI and coding/program/business logic usually to do so. In cases of building GUI's keep your display and your program code separate. With good designed GUI's you will usually not have to extend your JFrame class, possibly with the exception of Graphics/animations.

  • Infinite loop error after using Java Sun Tutorial for Learning Swing

    I have been attempting to create a GUI following Sun's learning swing by example (example two): http://java.sun.com/docs/books/tutorial/uiswing/learn/example2.html
    In particular, the following lines were used almost word-for-word to avoid a non-static method call problem:
    SwingApplication app = new SwingApplication();
    Component contents = app.createComponents();
    frame.getContentPane().add(contents, BorderLayout.CENTER);I believe that I am accidentally creating a new instance of the gui class repeatedly (since it shows new GUI's constantly and then crashes my computer), possibly because I am creating an instance in the main class, but creating another instance in the GUI itself. I am not sure how to avoid this, given that the tutorials I have seen do not deal with having a main class as well as the GUI. I have googled (a nice new verb) this problem and have been through the rest of the swing by example tutorials, although I am sure I am simply missing a website that details this problem. Any pointers on websites to study to avoid this problem would be appreciated.
    Thanks for your time-
    Danielle
    /** GUI for MicroMerger program
    * Created July/06 at IARC
    *@ author Danielle
    package micromerger;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.swing.JFileChooser;
    import java.lang.Object;
    public class MGui
         private static File inputFile1, inputFile2;
         private static File sfile1, sfile2;
         private static String file1Name, file2Name;
         private String currFile1, currFile2;
         private JButton enterFile1, enterFile2;
         private JLabel enterLabel1, enterLabel2;
         private static MGui app;
         public MGui()
              javax.swing.SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        System.out.println("About to run create GUI method");
                        app = new MGui();
                        System.out.println("declared a new MGui....");
                        createAndShowGUI();
         //initialize look and feel of program
         private static void initLookAndFeel() {
            String lookAndFeel = null;
         lookAndFeel = UIManager.getSystemLookAndFeelClassName();
         try
              UIManager.setLookAndFeel(lookAndFeel);
         catch (ClassNotFoundException e) {
                    System.err.println("Couldn't find class for specified look and feel:"
                                       + lookAndFeel);
                    System.err.println("Did you include the L&F library in the class path?");
                    System.err.println("Using the default look and feel.");
                } catch (UnsupportedLookAndFeelException e) {
                    System.err.println("Can't use the specified look and feel ("
                                       + lookAndFeel
                                       + ") on this platform.");
                    System.err.println("Using the default look and feel.");
                } catch (Exception e) {
                    System.err.println("Couldn't get specified look and feel ("
                                       + lookAndFeel
                                       + "), for some reason.");
                    System.err.println("Using the default look and feel.");
                    e.printStackTrace();
         // Make Components--
         private Component createLeftComponents()
              // Make panel-- grid layout
         JPanel pane = new JPanel(new GridLayout(0,1));
            //Add label
            JLabel welcomeLabel = new JLabel("Welcome to MicroMerger.  Please Enter your files.");
            pane.add(welcomeLabel);
         //Add buttons to enter files:
         enterFile1 = new JButton("Please click to enter the first file.");
         enterFile1.addActionListener(new enterFile1Action());
         pane.add(enterFile1);
         enterLabel1 = new JLabel("");
         pane.add(enterLabel1);
         enterFile2 = new JButton("Please click to enter the second file.");
         enterFile2.addActionListener(new enterFile2Action());
         pane.add(enterFile2);
         enterLabel2 = new JLabel("");
         pane.add(enterLabel2);
         return pane;
         /** Make GUI:
         private static void createAndShowGUI()
         System.out.println("Creating a gui...");
            JFrame.setDefaultLookAndFeelDecorated(true);
            //Create and set up the window.
            JFrame frame = new JFrame("MicroMerger");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //Add stuff to the frame
         //MGui app = new MGui();
         Component leftContents = app.createLeftComponents();
         frame.getContentPane().add(leftContents, BorderLayout.WEST);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
    private class enterFile1Action implements ActionListener
         public void actionPerformed(ActionEvent evt)
              JFileChooser chooser = new JFileChooser();
              int rVal = chooser.showOpenDialog(enterFile1);
              if(rVal == JFileChooser.APPROVE_OPTION)
                   inputFile1 = chooser.getSelectedFile();
                   PrintWriter outputStream;
                   file1Name = inputFile1.getName();
                   enterLabel1.setText(file1Name);
    private class enterFile2Action implements ActionListener
         public void actionPerformed(ActionEvent evt)
              JFileChooser chooser = new JFileChooser();
              int rVal = chooser.showOpenDialog(enterFile1);
              if(rVal == JFileChooser.APPROVE_OPTION)
                   inputFile2 = chooser.getSelectedFile();
                   PrintWriter outputStream;
                   file2Name = inputFile2.getName();
                   enterLabel2.setText(file2Name);
    } // end classAnd now the main class:
    * Main.java
    * Created on June 13, 2006, 2:29 PM
    * @author Danielle
    package micromerger;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class Main
        /** Creates a new instance of Main */
        public Main()
         * @param args the command line arguments
        public static void main(String[] args)
            MGui mainScreen = new MGui();
            //mainScreen.setVisible(true);
            /**Starting to get file choices and moving them into GPR Handler:
             System.out.println("into main method");
         String file1Name = new String("");
             file1Name = MGui.get1Name();
         System.out.println("good so far- have MGui.get1Name()");
        }// end main(String[] args)
    }// end class Main

    um, yeah, you definitely have a recursion problem, that's going to create an infinite loop. you will eventually end up an out of memory error, if you don't first get the OS telling you you have too many windows. interestingly, because you are deferring execution, you won't get a stack overflow error, which you expect in an infinite recursion.
    lets examine why this is happening:
    in main, you call new MGui().
    new MGui() creates a runnable object which will be run on the event dispatch thread. That method ALSO calls new MGui(), which in turn ALSO creates a new object which will be run on the event dispatch thead. That obejct ALSO calls new MGui(), which ...
    well, hopefully you get the picture.
    you should never unconditionally call a method from within itself. that code that you have put in the constructor for MGui should REALLY be in the main method, and the first time you create the MGui in the main method as it currently exists is unnecessary.
    here's what you do: get rid of the MGui constructor altogether. since it is the implicit constructor anyway, if it doesn't do anything, you don't need to provide it.
    now, your main method should actually look like this:
    public static void main( String [] args ) {
      SwingUtilities.invokeLater( new Runnable() {
        public void run() {
          MGui app = new MGui();
          app.createAndShowGUI();
    }// end mainyou could also declare app and call the constructor before creating the Runnable, as many prefer, because you would have access to it from outside of the Runnable object. The catch there, though, is that app would need to be declared final.
    - Adam

  • Error deploying Sun j2ee tutorial

    I want to see some JSF examples and tried to deploy simple WAR files from SUN. These are downloadable via http://java.sun.com/j2ee/1.4/download.html#tutorial
    An example war file I tried is guesNumber.war.
    If I deploy this in Oracle Application Server 10g Release 2 (10.1.2.0.2) it doesn't work - computer says no. Error : Unknown assembly root-tag attribute: xmlns

    Try changing this line in your web.xml <br>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"><br>
    to
    <br>
    <web-app><br>
    Remove the xmlns bits in the tag
    regards
    Vasu

  • Error on Java Sun Tutorial Examples

    Hi,
    I copied codes SwingPaintDemo3 and SwingPaintDemo4 under topic "Performing Custom Painting" but it gives error for "addMouseMotionListener" method.
    Do you know the problem or it's happening from me?
    Thank you.

    It doesn't give error while compiling but it doesn't run correctly for example it must show mouse icon on example 3 but it didn't.
    It says:
    " The method addMouseMotionListener(MouseMotionListener) in the type Component is not applicable for the arguments (new MouseAdapter(){}) "

  • Error in the tutorial OnlineInteractiveForm

    Hi, i´m doing this tutorial that use Adobe Service, i download de program complete for see the application, but when i execute, appear this error:    
    com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Processing exception during a "UsageRights" operation. Request start time: Thu Sep 06 18:10:45 CEST 2007 com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights Exception Stack Trace: com.adobe.ProcessingError: Error while retrieving a password for credential: ReaderRights: java.lang.Exception: Could not retrieve a password for credential: ReaderRights at com.adobe.ads.request.UsageRights.execute(Unknown Source) at com.adobe.BaseADSRequest.doWork(Unknown Source) at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source) at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source) at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source) at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0.java:120) 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.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157) at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79) at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92) at SoapServlet.doPost(SoapServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325) at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887) at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241) at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92) at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148) at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33) at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    What happend?
    Thanks,

    Hi Victor,
                   Before using this application,u need to configure AdobeDocumentService as well as all the credentials need to be installed on ur server.
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/95/5a08cd0e274a0bae559622d6670722/frameset.htm">ADS configuration</a>
    Go to visual admin->services->Document services configuration.Check whether any credential is available or not.If yes then check the expiry date.
    regards
    Sumit

  • Error running WebCenter Tutorial

    Hi,
    I am trying to go through the WebCenter tutorial Oracle® Fusion Middleware Tutorial for Oracle WebCenter Developers 11g Release 1 (11.1.1)
    I have installed JDeveloper Studio Edition Version 11.1.1.4.0 and added the WebCenter Extensions.
    I created the tutorial portal application and tried to run it (as per the tutorial but get the following error:
    03:10:07 PM] Deploying Application...
    <Jan 26, 2011 3:10:17 PM GMT> <Warning> <J2EE> <BEA-160140> <Unresolved optional package references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.apps.common.resource, referenced from: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/tmp/_WL_user/oracle.webcenter.framework/owur7d]. Make sure the referenced optional package has been deployed as a library.>
    <Jan 26, 2011 3:10:20 PM GMT> <Notice> <LoggingService> <BEA-320400> <The log file /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Jan 26, 2011 3:10:20 PM GMT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log00001. Log messages will continue to be logged in /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log.>
    <Jan 26, 2011 3:10:27 PM GMT> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war. Please make sure that the annotations are valid. The error is An I/O error occurred during listing of the directory: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war/WEB-INF/classes>
    <Jan 26, 2011 3:10:27 PM GMT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1296054608923' for task '2'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'MyPortalApplication-Portal-context-root''
    weblogic.application.ModuleException: Failed to load webapp: 'MyPortalApplication-Portal-context-root'
    The environment in Oracle Enterprise Linux 64 bit running in VMware Workstation 7 and is a clean install with a clean install of JDeveloper.
    The other thing I noticed is that on the JDevelopers "Extentions" tab there is a warning:
    oracle.webcenter.app
    Warning: Classpath entry /d01/oracle/javahome/jdk/lib/tools.jar not found.
    I do not know why it would configure /d01/oracle/javahome/jdk/lib as that is not a valid path in the installation.
    The full stack trace is:
    [03:10:07 PM] Deploying Application...
    <Jan 26, 2011 3:10:17 PM GMT> <Warning> <J2EE> <BEA-160140> <Unresolved optional package references (in META-INF/MANIFEST.MF): [Extension-Name: oracle.apps.common.resource, referenced from: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/tmp/_WL_user/oracle.webcenter.framework/owur7d]. Make sure the referenced optional package has been deployed as a library.>
    <Jan 26, 2011 3:10:20 PM GMT> <Notice> <LoggingService> <BEA-320400> <The log file /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <Jan 26, 2011 3:10:20 PM GMT> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log00001. Log messages will continue to be logged in /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/logs/DefaultServer.log.>
    <Jan 26, 2011 3:10:27 PM GMT> <Error> <HTTP> <BEA-101371> <There was a failure when processing annotations for application /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war. Please make sure that the annotations are valid. The error is An I/O error occurred during listing of the directory: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war/WEB-INF/classes>
    <Jan 26, 2011 3:10:27 PM GMT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1296054608923' for task '2'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'MyPortalApplication-Portal-context-root''
    weblogic.application.ModuleException: Failed to load webapp: 'MyPortalApplication-Portal-context-root'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.utils.enumerations.FileEnumeration$NullDirectoryListException: An I/O error occurred during listing of the directory: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war/WEB-INF/classes
         at weblogic.utils.enumerations.FileEnumeration.getNextFile(FileEnumeration.java:150)
         at weblogic.utils.enumerations.FileEnumeration.hasMoreFiles(FileEnumeration.java:102)
         at weblogic.utils.enumerations.FileEnumeration.hasMoreElements(FileEnumeration.java:134)
         at weblogic.utils.enumerations.SequencingEnumerator.hasMoreElements(SequencingEnumerator.java:52)
         at weblogic.utils.enumerations.SequencingEnumerator.hasMoreElements(SequencingEnumerator.java:52)
         Truncated. see log file for complete stacktrace
    >
    <Jan 26, 2011 3:10:27 PM GMT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'MyPortalApplication [Version=V2.0]'.>
    <Jan 26, 2011 3:10:27 PM GMT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: Failed to load webapp: 'MyPortalApplication-Portal-context-root'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:393)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         Truncated. see log file for complete stacktrace
    Caused By: weblogic.utils.enumerations.FileEnumeration$NullDirectoryListException: An I/O error occurred during listing of the directory: /home/oracle/.jdeveloper/system11.1.1.4.37.59.23/o.j2ee/drs/MyPortalApplication/PortalWebApp.war/WEB-INF/classes
         at weblogic.utils.enumerations.FileEnumeration.getNextFile(FileEnumeration.java:150)
         at weblogic.utils.enumerations.FileEnumeration.hasMoreFiles(FileEnumeration.java:102)
         at weblogic.utils.enumerations.FileEnumeration.hasMoreElements(FileEnumeration.java:134)
         at weblogic.utils.enumerations.SequencingEnumerator.hasMoreElements(SequencingEnumerator.java:52)
         at weblogic.utils.enumerations.SequencingEnumerator.hasMoreElements(SequencingEnumerator.java:52)
         Truncated. see log file for complete stacktrace
    >
    [03:10:27 PM] #### Deployment incomplete. ####
    [03:10:27 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    #### Cannot run application MyPortalApplication due to error deploying to IntegratedWebLogicServer.
    [Application MyPortalApplication stopped and undeployed from Server Instance IntegratedWebLogicServer]

    Hi Peter,
    Fixed the problem, I created directories:
    /d01/oracle/javahome
    and
    /d01/oracle/javahome/jdk
    then created a symbolic link:
    ln -s /d01/oracle/middleware/jdk160_21/lib /d01/oracle/javahome/jdk/lib
    When I restarted weblogic it got beyond that but then failed due to "to many open files"
    So I edited /etc/security/limits.conf
    adding the lines:
    oracle hard nofile 4096
    oracle soft nofile 4096
    as per the weblogic installation guide
    The tutorial application then started ...
    Thanks for the responses
    Craig

  • Getting HTTP Status 500 error with sun one application server...

    Hi,
    I am trying to develop a sample application and try to run with sun one application server. I followed the tutorial. My application client is working fine. But my web client is producing the following error. I think we don't need to install Tomcat seperately when we have the application server or do I have to... any suggestions...
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    No Java compiler was found to compile the generated source for the JSP.
    This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK
    to the common/lib directory of the Tomcat server, followed by a Tomcat restart.
    If using an alternate Java compiler, please check its installation and access path.
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:132)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:356)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:420)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:463)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:444)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:557)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:306)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server-PE-8.0 logs.
    Sun-Java-System/Application-Server-PE-8.0

    You do not need to install Tomcat. SJSAS contains a web container. The error you are seeing could be caused by a few reasons. There are many previous threads on this issue, perhaps you could search the forum. I used the following search term, "Unable to compile class for JSP" ,and got many hits.
    http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=J2EE+Software+Development+Kit+%28J2EE+SDK%29&qp=forum%3A136&qt=Unable+to+compile+class+for+JSP

  • Is there an error in the tutorial?

    Hi everybody!
    I've been reading the generics tutorial from Sun and I don't know if thre is an error or I have not understood the documentation.
    That's the tutorial code snippet:
    public interface List<E> {
    void add(E x);
    Iterator<E> iterator();
    and in the method "add" the documentation says it should return a boolean but as you can see here is returned a "void". What doyou think?. Thank you in advance.

    That is certainly an error. Well spotted. This is an understandable mistake bearing in mind that before the days of Lists we used Vectors whose addElement method's return type is void.

  • Error running SwingApplication tutorial

    I'm trying to run the SwingApplication from the 'Compiling and Running Swing Programs' tutorial at http://java.sun.com/docs/books/tutorial/uiswing/start/swingStart12.html.
    When I enter: 'java SwingApplication' I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: SwingApplication
    I'm running Java version 1.3.1_02. Can anyone please help me with this error?
    Thanks in advance.

    Thank you very much for your input. I was running in the wrong directory. When I got into the right directory, ....\jdk\bin, and used the -classpath option, everything worked fine. One more arrow in the back to becoming an expert......... :-)

  • JMS Simple code in Sun tutorial

    I run a simple code (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS4.html) fine in j2sdkee , but fail to use in Openjms/ JBoss.
    try {
    connectionFactory = (ConnectionFactory) jndiContext.lookup("QueueConnectionFactory");
    } catch (Exception e) {
    System.out.println("JNDI API lookup failed: " + e.toString());
    return;
    What's wrong of the above code? Why do I can the following error in Openjms / Jboss?
    JNDI API lookup failed: javax.naming.CommunicationException: Can't find

    OpenJMS by default defines the following: (QueueConnectionFactory is not defined by default!)
    queueName = "queue1"
    queueConnectionFactoryName = "JmsQueueConnectionFactory"
    The creation of the initial context could be done like this
    Hashtable env = new Hashtable ();
    env.put(Context.PROVIDER_URL,
    "rmi://localhost:1099/JndiServer");
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.exolab.jms.jndi.rmi.RmiJndiInitialContextFactory");
    jndiContext = new InitialContext (env);
    Similar modifications are needed for JBoss

  • Annotation error in IDE

    Hi, i'm trying to use annotation in my code, but the compiler show following error message:
    (try -source 1.5 to enable annotations)
    my jdk defaullt is jdk 1.5
    help.

    Duplicate of http://forum.sun.com/jive/thread.jspa?threadID=107047&tstart=15
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • Error Using Sun ONE Application Framework

    I am new to the Sun ONE Application Framework. I started by following the tutorial specifically for Java Studio. I get an error when trying to add a ViewBean.
    Confirm refresh invalid JSP template
    The current default JSP template [DefaultPage] is invalid. Do you want to rename it as [DefaultPage_invalid] and refresh [DefaultPage] from NBM archive?
    I reinstalled the development environment to see if something was corrupted, but I am still receiving the same error. I am running in Windows XP Pro SP 1.
    I installed as test on another machine running WIndows 2000, and it works fine.
    I would appreciate any recommendations.
    Thank you

    I have been continuing to research this error.
    I installed Sun ONE Studio 5 update 1 on a different machine running Windows XP Profressional SP1 and still had the same issue.
    I installed it on RedHat Linux 9 and it worked just fine.
    Just seems to be isolated to using the Sun ONE Application Framework development tools in Windows XP.

Maybe you are looking for