FirstWizard sample compile error

Hi,
I have installed Jdeveloper 9.0.3 (downloaded 2002-10-27). I also installed the AddinKit.zip (http://otn.oracle.com/products/jdev/htdocs/partners/addins/AddinKit.zip). From AddinKit.zip, I installed addin-api-samples.zip
I tried building the projects but in FirstWizard, I get:
Error(30,31): cannot access class oracle.jdeveloper.util.CharacterEncodingMapping; file oracle\jdeveloper\util\CharacterEncodingMapping.class not found
Error(134,30): variable CharacterEncodingMapping not found in class samples.oracle.addin.firstwizard.GenerateJSPFile
I can't seem to locate oracle.jdeveloper.util.CharacterEncodingMapping.
As a side issue, there seems to be a couple of problems with the packaging of AddinKit.zip. Firstly, it includes a zipped version of itself (or a previous version of itself) so it is about twice as big as necessary. Secondly, it contains zipped versions of the jar files as well as the jar files themselves. Since these are delivered in a zip file, compress less well than the jar files, again causing unnecessary bloat.
Thanks,
Neil

I haven't updated the extension sdk for 9.0.3 yet, I'm finishing it up now and will get a new build put online shortly (also fixing the duplication of JAR files, etc)
Replace the line which won't compile with the following:
String ianaCharsetName = IdeUtil.getIdeIanaEncoding();
Also, add the following import:
import oracle.ide.util.IdeUtil;
Hope this helps, I'll put an announcement in here and the jdev page when I put up a new esdk release.
Rob

Similar Messages

  • [svn] 3870: Fixing compiler error in my sample.

    Revision: 3870
    Author: [email protected]
    Date: 2008-10-24 08:57:35 -0700 (Fri, 24 Oct 2008)
    Log Message:
    Fixing compiler error in my sample. I accidentally copy/pasted a line.
    Modified Paths:
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/example s/TextViewExample.mxml

    I believe I see at least two problems:
    (1) CXXOUTPUT_FLAGS="-0 %OutFile%
    i.e. You've specified -0 [dash zero] where I imagine you want -o [dash oh]
    I guess it's possible that your posting has a typographical error and that your build really does have -o [and not -0]. If that's the case, I imagine that your problem is the double quotation marks. It's possible or even likely that due to the quotations in "-o %OutFile%", the compiler attempts to interpret this whole string as an option - which of course it can't.
    (2) LINK=cc
    i.e. You've specified cc (the C compiler/linker) instead of CC (the C++ compiler/linker).

  • [svn:osmf:] 15446: Fix FB4 compile error in sample ( by removing an unsupported style ref).

    Revision: 15446
    Revision: 15446
    Author:   [email protected]
    Date:     2010-04-15 11:51:32 -0700 (Thu, 15 Apr 2010)
    Log Message:
    Fix FB4 compile error in sample (by removing an unsupported style ref).
    Modified Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/src/CaptioningSample.mxml

  • JPDK Sample Provider compile error

    Hi
    I have installed 'OracleAS Containers for J2EE Pre-configured PDK', version 9.0.4.
    The Portlal tools are running fine, but the 'JPDK Sample Provider' fails with a compile error:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\pdk-container2\j2ee\home\application-deployments\jpdk\jpdk\persistence\_pages\_htdocs\_testpage\_TestPage.java.
    I have set the PART and JAVA_HOME environment to point to a jsdk:
    java -version
    java version "1.4.2_05"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode).
    Any ideas???

    By setting the home, are you setting the JAVA_HOME to a proper JDK installation, and not to the JRE installation?
    thanks,
    Harsha

  • Compiled Error in Xcode for iphone game and other questions

    Dear all,
    Hi, I am a newbie of xcode and objective-c and I have a few questions regarding to the code sample of a game attached below. It is written in objective C, Xcode for iphone4 simulator. It is part of the code of 'ball bounce against brick" game. Instead of creating the image by IB, the code supposes to create (programmatically) 5 X 4 bricks using 4 different kinds of bricks pictures (bricktype1.png...). I have the bricks defined in .h file properly and method written in .m.
    My questions are for the following code:
    - (void)initializeBricks
    brickTypes[0] = @"bricktype1.png";
    brickTypes[1] = @"bricktype2.png";
    brickTypes[2] = @"bricktype3.png";
    brickTypes[3] = @"bricktype4.png";
    int count = 0;`
    for (int y = 0; y < BRICKS_HEIGHT; y++)
    for (int x = 0; x < BRICKS_WIDTH; x++)
    - Line1 UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]];
    - Line2 bricks[x][y] = [[[UIImageView alloc] initWithImage:image] autorelease];
    - Line3 CGRect newFrame = bricks[x][y].frame;
    - Line4 newFrame.origin = CGPointMake(x * 64, (y * 40) + 50);
    - Line5 bricks[x][y].frame = newFrame;
    - Line6 [self.view addSubview:bricks[x][y]]
    1) When it is compiled, error "ImageCache undeclared" in Line 1. But I have already added the png to the project. What is the problem and how to fix it? (If possible, please suggest code and explain what it does and where to put it.)
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    For instance, returns one of the file name bricktype1.png to the image object? If true, what is the max value of "count", ends at 5? (as X increments 5 times for each Y). But then "count" will exceed the max 'index value' of brickTypes which is 3!
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    Thanks
    North

    Hi North -
    macbie wrote:
    1) When it is compiled, error "ImageCache undeclared" in Line 1. ...
    UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]]; // Line 1
    The compiler is telling you it doesn't know what ImageCache refers to. Is ImageCache the name of a custom class? In that case you may have omitted #import "ImageCache.h". Else if ImageCache refers to an instance of some class, where is that declaration made? I can't tell you how to code the missing piece(s) because I can't guess the answers to these questions.
    Btw, if the png file images were already the correct size, it looks like you could substitute this for Line 1:
    UIImage *image = [UIImage imageNamed:brickTypes[count++ % 4]]; // Line 1
    2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
    brickTypes[count ++ % 4]
    Though you don't show the declaration of brickTypes, it appears to be a "C" array of NSString object pointers. Thus brickTypes[0] is the first string, and brickTypes[3] is the last string.
    The expression (count++ % 4) does two things. Firstly, the trailing ++ operator means the variable 'count' will be incremented as soon as the current expression is evaluated. Thus 'count' is zero (its initial value) the first time through the inner loop, its value is one the second time, and two the third time. The following two code blocks do exactly the same thing::
    int index = 0;
    NSString *filename = brickTypes[index++];
    int index = 0;
    NSString *filename = brickTypes[index];
    index = index + 1;
    The percent sign is the "modulus operator" so x%4 means "x modulo 4", which evaluates to the remainder after x is divided by 4. If x starts at 0, and is incremented once everytime through a loop, we'll get the following sequence of values for x%4: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...
    So repeated evaluation of (brickTypes[count++ % 4]) produces the sequence: @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", ...
    3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
    Line 2 allocs an object of type UIImageView and specifies the data at 'image' as the picture to be displayed by the new object. Since we immediately assign the address of the new UIImageView object to an element of the 'bricks' array, that address isn't stored in any named variable.
    The new UIImageView object is not associated with the name of the png file from which its picture originated. In fact the UIImage object which inited the UIImageView object is also not associated with that png filename. In other words, once a UIImage object is initialized from the contents of an image file, it's not possible to obtain the name of that file from the UIImage object. Note when you add a png media object to a UIImageView object in IB, the filename of the png resource will be retained and used to identify the image view object. But AFAIK, unless you explicitly save it somewhere in your code, that filename will not be available at run time.
    4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
    5) What does Line 4 do?
    In Line 2 we've set the current element of 'bricks' to the address of a new UIImageView object which will display one of the 4 brick types. By default, the frame of a UIImageView object is set to the size of the image which initialized it. So after Line 2, we know that frame.size for the current array element is correct (assuming the image size of the original png file was what we want to display, or assuming that the purpose of [ImageCache loadImage:...] is to adjust the png size).
    Then in Line 3, we set the rectangle named newFrame to the frame of the current array element, i.e. to the frame of the UIImageView object whose address is stored in the current array element. So now we have a rectangle whose size (width, height) is correct for the image to be displayed. But where will this rectangle be placed on the superview? The placement of this rectangle is determined by its origin.
    Line 4 computes the origin we want. Now we have a rectangle with both the correct size and the correct origin.
    Line 5 sets the frame of the new UIImageView object to the rectangle we constructed in Lines 3 and 4. When that object is then added to the superview in Line 6, it will display an image of the correct size at the correct position.
    - Ray

  • Compiling Error While Viewing XML Data in Word

    I received the following message, "Compile error in hidden module: Module_starter" while trying to load sample xml data to view within MS Word while using BI Publisher. Any ideas of what causes this and how to fix it would be greatly appreciated.
    Thanks.
    G. Wright

    Getting this error as well.
    I've read the announcement from Tim, and also the Metalink article: Note:457235.1
    However, our desktops at work are locked down to such an extent that I don't have an 'all programs' entry on my start menu.
    I tried what I thought might be the 'Template Builder for Word Language' executable but that also gave me an error (changeUILang.exe).
    Error is: Runtime error '9'. Subscript out of range.
    Could someone please confirm what the shortcut:
    "All Programs --> Oracle BI Publisher Desktop --> Template Builder for Word Language "
    actually points to.
    As to the other option (uninstalling the security patch) this is just a non-starter where I work.
    Thanks for your help,
    Ben

  • Is it possible to Integrate dos with Java to create a sample compiler?

    Is it possible to Integrate dos with Java to create a sample compiler, or do I have to write the compiler from scratch? In theory, I would like to have users enter sample code in a java text field, hit a java button that would compile/run the code, by calling a dos command prompt that would run it, and display any error messages back to the java text field. Does anyone know if this is possible? Any help would be greatly appreciated.
    Tflav23

    There is a Compiler class you might be able to use also:
    C:\jdk1.3.1_01\docs\api\java\lang\Compiler.html
    So perhaps there is no need to create a process to compile code. But I don't know if you can get information about compiler errors.

  • "success with compilation error" ?

    Hopefully someone can shed light on this. Here is the sample code...
    SQL> create or replace procedure pr_TEST
    2 as
    3 begin
    4 execute immediate 'create or replace trigger tr_test after insert or update or delete on test
    for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar(32)
    ; begin insert into test values (v_col1, v_col2) ;end; /';
    5
    6 end;
    7 /
    Procedure created.
    SQL> exec pr_test;
    ERROR:
    ORA-24344: success with compilation error
    ORA-06512: at "ROOT.PR_TEST", line 4
    ORA-06512: at line 1
    Have you ever heard of an ORA-24344 ? Any suggestions on what to correct ?
    thx in advance,
    RP.

    You don't want the slash at the end of the string:
    sql>create or replace procedure pr_test
      2  as
      3  begin
      4   execute immediate 'create or replace trigger tr_test after insert or update or delete on test
      5  for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar
    (32);
      6   begin insert into test values (v_col1, v_col2) ;end;';  -- no slash here at end
      7  end;
      8  /
    Procedure created.

  • Oracle JDBC Driver Compile Errors

    I'd like to try out this new Preview Edition but I get the following errors:
    Error(22,8): class oracle.jdbc.driver.OracleCallableStatement is not public; cannot be accessed from outside of package oracle.jdbc.driver
    Error(23,8): class oracle.jdbc.driver.OracleTypes is not public; cannot be accessed from outside of package oracle.jdbc.driver
    These erors occur at the import statements:
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    when I attempt to compile a JDev 10.1.3 project in the 11g Technology Preview Edition. Any idea why?
    TIA,
    Jeff

    We don't support project migration from 10.1.3 to the
    technology preview.
    Does the problem reproduce if you create a new
    project in 11tp?Shay,
    Thanks for the quick response. I created a new application in 11tp from scratch. I created a View Object and pasted the offending code into it and got the same compile errors. I actually got the code about a year ago from Steve's Not Yet Documented Applications. He has since removed the App from the page, changed the code and added it to the Dev Guide. The sample app showed how to bind a View object to a REF Cursor returned from a stored procedure and it looked something like this:
    CallableStatement cs = conn.prepareCall("{?=call package.name(P_CODIGO => ?)}");
    cs.rgisterOutParameter(1,OracleTypes.CURSOR);
    cs.setInt(2,16782);
    cs.executeQuery();
    ResultSet result = ((OracleCallableStatement)cs).getCursor(1);
    Changing the code to look more like what is now in the DEV GUIDE will more than likely work because he eliminates the need for the OracleCallableStatement.
    This brings me to my next point. If migration is not currently supported, will it be when the production release of JDEV 11g is available? Shame on me for just quickly skimming the release notes but when the import wizard ran on my project it did not warn me that the feature is not supported or that problems are likely. Upon resolving the issues with the callable statement, I had significant other compile errors in my jspx pages that will probably not be as trivial to fix. If project upgrades are not performed "easily" it will certainly push the 11g adoption date out considerably.
    Thanks again, your comments are always encouraged.
    Jeff

  • Reports compilation errors (6i to 9i)

    Hello,
    When migrating a report from Oracle 6i to Oracle 9i, I get a number of errors.
    Here are 2 sample functions and the associated errors at compile time:
    function AfterReports return boolean is
    begin
    /* Delete referenced files */
    update lot
    set ref_file = null;
    ref_filenum = null;
    where co = :p_co
    and (lot.surveyor = :p_surveyor or :p_surveyor is null)
    and ref_filenum = :p_project;
    /* Flag the project to indicate that work order as been printed */
    update thproject
    set prtwrkord = 'Y'
    where co = :p_co
    and nvl(prtwrkord,'N') = 'N'
    and project = :p_project;
    return (TRUE);
    end;
    When trying to compile this function under Reports Oracle 9i, I get the following errors:
    Error 201 at line 4, column 11
    identifier 'LOT' must be declared
    Error 0 at line 4, column 4
    SQL statement ignored
    Error 201 at line 12, column 9
    identifier 'TBPROJECT' must be declared
    Error 0 at line 12, column 2
    SQL Statement ignored.
    =====
    function BeforeReport return boolean is
    trouver BOOLEAN;
    CURSOR CURS is select c c.co
    from company c, userco u
    where c.co = u.co
    and u.userid = user;
    begin
    open curs;
    fetch curs into :p.co
    trouver := curs%FOUND;
    close curs;
    return (trouver);
    end;
    Error 201 at line 4, column 12
    identifier 'COMPANY' must be declared
    Error 0 at line 3, column 20
    SQL Statement ignored.
    =====
    1) How can I go about resolving these compilation errors and generate the corresponding *.REP file ?
    Paolo

    At first glance it seems to me that you are missing a comma between ref_file and ref_filenum as below
    /* Delete referenced files */
    update lot
    set ref_file = null;
    ref_filenum = null;
    where co = :p_co
    and (lot.surveyor = :p_surveyor or :p_surveyor is null)
    and ref_filenum = :p_project;
    should be:
    /* Delete referenced files */
    update lot
    set ref_file = null,
    ref_filenum = null;
    where co = :p_co
    and (lot.surveyor = :p_surveyor or :p_surveyor is null)
    and ref_filenum = :p_project;
    HTH

  • Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.ora

    Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.oracle.demos......?
    I am currently testing a simple sample application with a java code similar to the one shown at
    the bottom of this post.
    However during deployment/compilation the compiler gives an error:
    Error(26,23): XMLElement not found in class com.oracle.demos.orderbooking.ApproveImpl
    Additionally similar other errors appear:
    Error(23,66): JAXBException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(51,58): UnmarshalException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(9,92): Element not found in interface com.oracle.demos.orderbooking.Approve
    What's wrong?
    It seems to me that I have to add some (more) *.jar files/libraries to the project?
    Which *.jars and where should I add them in JDeveloper?
    source code:
    package com.oracle.demos.orderbooking;
    public class ApproveImpl extends com.oracle.demos.orderbooking.ApproveTypeImpl implements com.oracle.demos.orderbooking.Approve
    public ApproveImpl(oracle.xml.parser.v2.XMLElement node)
    super(node);
    }

    Hai James this the response I am getting can you please tell what should I write inside ora:getNodeValue() to get the value of node <genReturnText>
    The drag and dropping the variable name is not working, I have to write the path manually but I dont know how.
    <ns1:getRoutingAndFrameJumpersResponse xmlns:ns1="com.NetworkInstallations">
    -<com.GetRoutingAndFrameJumpersOutput>
    <destination>
    SW
    </destination>
    <e2EData>
    busProcOriginator
    </e2EData>
    <genReturnCode>
    40777
    </genReturnCode>
    <genReturnText>
    EMW_Get_Routing_And_FrameJumpers_Succeeded
    </genReturnText>
    <supplCode>
    ISY002
    </supplCode>
    <supplText>
    Transaction successfully completed.
    </supplText>
    <severityCode>
    S
    </severityCode>
    <retriable>
    false
    </retriable>
    </com.GetRoutingAndFrameJumpersOutput>
    </ns1:getRoutingAndFrameJumpersResponse>

  • Compiler bug in 10.1.3 EA1?  get "Internal compilation error" with EnumSet

    The code sample below generates "Error: Internal compilation error, terminated with a fatal exception" when doing make. It's a very simple example, it creates an EnumSet with one element and dumps it via the "toString()" method.
    If I change the line:
    "EnumSet set = EnumSet.of(Buttons.ONE);"
    To:
    "EnumSet set = EnumSet.allOf(c);"
    It works fine. For some reason the "of" method of "EnumSet" crashes the compiler.
    Any ideas?
    ========================================
    package mypackage;
    import java.util.EnumSet;
    public class EnumDemo
    enum Buttons { ONE, TWO, THREE }
    public EnumDemo()
    public void dump()
              Class c = Buttons.class;
              EnumSet set = EnumSet.of(Buttons.ONE);
              System.out.println(set.toString());
    public static void main(String[] args)
    EnumDemo cls = new EnumDemo();
    cls.dump();
    ==============================

    package com.esp.main;
    import java.awt.Dimension;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.JTree;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    import javax.swing.event.TreeSelectionEvent;
    import javax.swing.event.TreeSelectionListener;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreePath;
    public class TreeNavigator extends JTree {
    private FormMain fm;
    public TreeNavigatorNode selectedTreeNode;
    public TreePath selectedTreePath;
    public JTree thisTree;
    public TreeNavigator(FormMain pFM) {
    fm = pFM;
    thisTree = this;
    addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
    selectedTreeNode = (TreeNavigatorNode)thisTree.getLastSelectedPathComponent();
    if (selectedTreeNode == null) {
    return;
    selectedTreePath = e.getPath();
    addMouseListener(new MouseAdapter() {
    public void mouseReleased(MouseEvent e) {
    if (e.getClickCount() == 1) {
    doPopup(e.getX(), e.getY());
    String nodeInternalFrameClassName = selectedTreeNode.getInternalFrameClassName();
    String nodeNodeTypeDesc = selectedTreeNode.getNodeTypeDesc();
    if ((selectedTreeNode != null) && (nodeNodeTypeDesc.equals("FORM") || nodeNodeTypeDesc.equals("GRAPH"))) {
    fm.showInternalFrame(nodeInternalFrameClassName, fm, null);
    } else if (e.getClickCount() == 1) {
    TreePath path = thisTree.getClosestPathForLocation(e.getX(), e.getY());
    thisTree.setSelectionPath(path);
    public void doPopup(int x, int y) {
    if ((selectedTreeNode != null) && selectedTreeNode.nodeTypeDesc.equals("MODULE")) {
    fm.cm.sendString("Do Nothing");
    } else {
    fm.cm.sendString("Launch form");
    setEditable(false);
    setMaximumSize(new java.awt.Dimension(3200, 3200));
    setPreferredSize(new java.awt.Dimension(800, 100));
    setShowsRootHandles(false);
    setLargeModel(false);
    setRootVisible(false);
    setDragEnabled(false);
    DefaultTreeModel treeNavigatorModel = new DefaultTreeModel(fm.treeNavigatorNodeArray[fm.rootNode], true);
    treeModel.addTreeModelListener(new NavigatorTreeModelListener());
    setModel(treeNavigatorModel);
    expandAll(this);
    try {
    jbInit();
    } catch (Exception e) {
    e.printStackTrace();
    public void expandAll(JTree tree) {
    int row = 0;
    while (row < tree.getRowCount()) {
    tree.expandRow(row);
    row++;
    private void jbInit() throws Exception {
    this.setSize(new Dimension(286, 383));
    TreeNavigatorCellRenderer renderer = new TreeNavigatorCellRenderer(fm);
    this.setCellRenderer(renderer);
    class NavigatorTreeModelListener implements TreeModelListener {
    public void treeNodesChanged(TreeModelEvent e) {
    TreeNavigatorNode node;
    node = (TreeNavigatorNode)(e.getTreePath().getLastPathComponent());
    * If the event lists children, then the changed
    * node is the child of the node we've already
    * gotten. Otherwise, the changed node and the
    * specified node are the same.
    try {
    int index = e.getChildIndices()[0];
    node = (TreeNavigatorNode)(node.getChildAt(index));
    } catch (NullPointerException exc) {
    public void treeNodesInserted(TreeModelEvent e) {
    public void treeNodesRemoved(TreeModelEvent e) {
    public void treeStructureChanged(TreeModelEvent e) {
    }

  • Ejb compilation error

    I am trying to compile the following sample code. Compilation error message is
    ShoppingCartBean.java:2: cannot find symbol
    symbol: class EJB
    location package javax.annotation
    import java.util.HashMap;
    import javax.annotation.EJB;
    import javax.ejb.Remote;
    import javax.ejb.Remove;
    import javax.ejb.Stateful;
    @Stateful
    @Remote(ShoppingCart.class)
    public class ShoppingCartBean implements ShoppingCart, java.io.Serializable {
    private HashMap<String, Integer> cart = new HashMap<String, Integer>();
    @EJB
    private Calculator calculator;
    private Calculator set;
    @EJB(beanName="CalculatorBean")
    public void setCalculator(Calculator c) {
    set = c;
    public void buy(String product, int quantity) {
    if(cart.containsKey(product)) {
    int currq = cart.get(product);
    currq = calculator.add(currq, quantity);
    cart.put(product, currq);
    else cart.put(product, quantity);
    public HashMap<String, Integer> getCartContents() {
    return cart;
    @Remove
    public void checkout() {
    System.out.println("To be implemented");
    }

    ague wrote:
    @Stateful
    @Remote(ShoppingCart.class)
    public class ShoppingCartBean implements ShoppingCart, java.io.Serializable {The annotation is used incorrectly; should look liek -
    @Remote ({ShoppingCart.java})
    afaik

  • Proxy Authentication Compilation Error

    Hi Java Expert,
    I am sampling the following code from http://www.javaworld.com/javaworld/javatips/jw-javatip46.html in an effort to authenticate the proxy that is situated behind the firewall:
    C:\Documents and Settings\htran\DnldURL\src\proxy\URLPassword.java
    1 package proxy;
    2
    3 import java.io.*;
    4 import java.net.*;
    5 import java.awt.*;
    6 import java.awt.event.*;
    7
    8 public class URLPassword extends Frame {
    9
    10     private TextField tf = new TextField();
    11     private TextArea ta = new TextArea();
    12
    13     public URLPassword() {
    14         super("URL Password");
    15         // Install Authenticator
    16         Authenticator.setDefault(new MyAuthenticator());
    17         // Setup screen
    18         add(tf, BorderLayout.NORTH);
    19         ta.setEditable(false);
    20         add(ta, BorderLayout.CENTER);
    21         tf.addActionListener(new ActionListener() {
    22
    23             public void actionPerformed(ActionEvent e) {
    24                 String s = tf.getText();
    25                 if (s.length() != 0) {
    26                     ta.setText(fetchURL(s));
    27                 }
    28             }
    29         });
    30         addWindowListener(new WindowAdapter() {
    31
    32             public void windowClosing(WindowEvent e) {
    33                 dispose();
    34                 System.exit(0);
    35             }
    36         });
    37     }
    38
    39     private String fetchURL(String urlString) {
    40         StringWriter sw = new StringWriter();
    41         PrintWriter pw = new PrintWriter(sw);
    42         try {
    43             URL url = new URL(urlString);
    44             InputStream content = (InputStream) url.getContent();
    45             BufferedReader in =
    46                     new BufferedReader(new InputStreamReader(content));
    47             String line;
    48             while ((line = in.readLine()) != null) {
    49                 pw.println(line);
    50             }
    51         } catch (MalformedURLException e) {
    52             pw.println("Invalid URL");
    53         } catch (IOException e) {
    54             pw.println("Error reading URL");
    55         }
    56         return sw.toString();
    57     }
    58
    59     public static void main(String args[]) {
    60         Frame f = new URLPassword();
    61         f.setSize(300, 300);
    62         f.setVisible(true);
    63     }
    64
    65     class MyAuthenticator extends Authenticator {
    66         protected PasswordAuthentication getPasswordAuthentication() {
    67             final Dialog jd = new Dialog(URLPassword.this, "Enter password", true);
    68             jd.setLayout(new GridLayout(0, 1));
    69             Label jl = new Label(getRequestingPrompt());
    70             jd.add(jl);
    71             TextField username = new TextField();
    72             username.setBackground(Color.lightGray);
    73             jd.add(username);
    74             TextField password = new TextField();
    75             password.setEchoChar('*');
    76             password.setBackground(Color.lightGray);
    77             jd.add(password);
    78             Button jb = new Button("OK");
    79             jd.add(jb);
    80             jb.addActionListener(new ActionListener() {
    81
    82                 public void actionPerformed(ActionEvent e) {
    83                     jd.dispose();
    84                 }
    85             });
    86             jd.pack();
    87             jd.setVisible(true);
    88             return new PasswordAuthentication(username.getText(), password.getText());
    89         }
    90     }
    91 }However, I could not compile it due to the following error from the last line:
    Compiling 1 source file to C:\Documents and Settings\htran\DnldURL\build\classes
    C:\Documents and Settings\htran\DnldURL\src\proxy\URLPassword.java:88: cannot find symbol
    symbol  : constructor PasswordAuthentication(java.lang.String,java.lang.String)
    location: class java.net.PasswordAuthentication
    return new PasswordAuthentication(username.getText(), password.getText());
    *1 error*
    BUILD FAILED (total time: 1 second)
    Netbeans also suggested to Add @Overwrite Annotation to getPasswordAuthentication() method on line 66. Any reason why?
    This appears to be using nested class that I am not familiar with.
    I am running Netbeans 6.0, jdk1.6.0_03 on Windows XP platform.
    Thanks a lot,
    Jack

    Hi,
    Your suggestion has resolved the compilation error.
    Thanks for your help,
    Jack

  • AspectJ usage for compilation error on field/class Member type

    Hello,
    I have stuck up with impleamentation of functionality to achieve following-
    I have class ABC and have multiple members in that. I want to give compiler error if the field type is List or non-primitive. I am trying this with AspectJ. But could not accomplish the task. Can somebody please suggest me some method or way to get this done ?
    Thanks.

    anj77 wrote:
    Hello,
    I have stuck up with impleamentation of functionality to achieve following-
    I have class ABC and have multiple members in that. I want to give compiler error if the field type is List or non-primitive. I am trying this with AspectJ. But could not accomplish the task. Can somebody please suggest me some method or way to get this done ?Yes, that kind of check pretty straightforward to implement with an annotation processor.
    I suggest using JDK 6 and javac for this task. To get started, see the packages javax.annotation.processing and javax.lang.model.*; also the JDK comes with an example checker in
    sample/javac/processing/src/CheckNameProcessor.java

Maybe you are looking for

  • How do I keep together items in a group footer?

    I have a report that has a line of detail, followed by a subreport, and then another subreport all in the group footer.  The report is also formatted to be displayed in two columns.  The problem I am having is that even with the keep together checkbo

  • Order status is seen as "processing items" for about a week.

    I ordered Iphone 4S on November 21 st, but when I check the order status, it's been written as "Processing Items". I also checked my credit card bill and I couldn't see any payment on November 21st. I wonder if any trouble occured during payment. Or

  • Can't control Canon Elura 100 DV Cam in PPro CS4

    Hi, I am comparing Final Cut Express vs. Premiere Pro CS4 trial, and I cannot get Premiere to control and import from my DV Cam, which is a Canon Elura 100. Has anybody been able to use this camera? My system is a MacBook Pro, running Snow Leopard. T

  • AS3 event model broken?

    Recently I posted a question on this forum regarding the mouseclick event. After some experimenting I finally figured out that the AS3 event model might be broken. I include two classes to illustrate my point. The first has a sprite inside a sprite.

  • Why can't i tap the wifi button on my ipod touch 4g?

    When i go to "Settings" the wifi button is greyed out and i can't tap it. Help me please!!