Tutorial 7: Compiling Applications

C:\medrec_tutorial\src\physicianEar>ant -f mybuild.xml
Buildfile: mybuild.xml
build:
[java] Loading source file C:\medrec_tutorial\build\physicianEar\physSessio
nEjbs\com\bea\medrec\controller\PhysicianSessionEJB.java...
[java] Constructing Javadoc information...
[java] EJBGen 2.16
[java] [Info:] Creating C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\com\bea\medrec\controller\PhysicianSessionHome.java
[java] [Info:] Creating C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\com\bea\medrec\controller\PhysicianSession.java
[java] [Info:] Creating C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\\ejb-jar.xml
[java] [Info:] Creating C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\\weblogic-ejb-jar.xml
[java] [Info:] Creating C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\ejbgen-build.xml2 warnings
[move] Moving 2 files to C:\medrec_tutorial\build\physicianEar\physSessionE
jbs\META-INF
[javac] Compiling 3 source files to C:\medrec_tutorial\build\physicianEar\ph
ysSessionEjbs
[wlcompile] C:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec
\controller\PhysicianSession.java:23: package javax.xml.rpc.soap does not exist
[wlcompile] import javax.xml.rpc.soap.SOAPFaultException;
[wlcompile] ^
[wlcompile] C:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec
\controller\PhysicianSessionEJB.java:13: package javax.xml.rpc.soap does not exi
st
[wlcompile] import javax.xml.rpc.soap.SOAPFaultException;
[wlcompile] ^
[wlcompile] C:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec
\controller\PhysicianSessionEJB.java:296: cannot resolve symbol
[wlcompile] symbol : class SOAPFaultException
[wlcompile] location: class com.bea.medrec.controller.PhysicianSessionEJB
[wlcompile] throws RemoteException, SOAPFaultException, Exception
Marc

I have the same problem. It is WL platform 8.1 sp3. webservices.jar is included in classpath.
D:\medrec_tutorial\src\physicianEar>ant -f mybuild.xml
Buildfile: mybuild.xml
build:
[java] Loading source file D:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianSessionEJB.java...
[java] Constructing Javadoc information...
[java] EJBGen 2.16
[java] [Info:] Creating D:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianSessionHome.java
[java] [Info:] Creating D:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianSession.java
[java] [Info:] Creating D:\medrec_tutorial\build\physicianEar\physSessionEjbs\\ejb-jar.xml
[java] [Info:] Creating D:\medrec_tutorial\build\physicianEar\physSessionEjbs\\weblogic-ejb-jar.xml
[java] [Info:] Creating D:\medrec_tutorial\build\physicianEar\physSessionEjbs\ejbgen-build.xml13 warnings
[move] Moving 2 files to D:\medrec_tutorial\build\physicianEar\physSessionEjbs\META-INF
[javac] Compiling 3 source files to D:\medrec_tutorial\build\physicianEar\physSessionEjbs
[wlcompile] D:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianSessionEJB.java:3: package com.bea.medrec.utils does not exist
[wlcompile] import com.bea.medrec.utils.MedRecUtils;
[wlcompile] ^
[wlcompile] D:\medrec_tutorial\build\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianSessionEJB.java:4: package com.bea.medrec.value does not exist
[wlcompile] import com.bea.medrec.value.Record;
[wlcompile] ^
[wlcompile] D:\medrec_tutorial\src\physicianEar\physSessionEjbs\com\bea\medrec\controller\PhysicianClientUtils.java:262: cannot resolve symbol
[wlcompile] symbol : class PrescriptionWS
[wlcompile] location: class com.bea.medrec.controller.PhysicianClientUtils
[wlcompile] PrescriptionWS[] rxWS = null;
[wlcompile] ^
[wlcompile] 100 errors
BUILD FAILED
file:D:/medrec_tutorial/src/physicianEar/mybuild.xml:4: Compile failed; see the compiler error output for details.
How solve this?

Similar Messages

  • Problems with tutorial: Building an Application

    Hi,
    I made the step by step tutorial (Building an Application Part 1: Application Objects,
    http://developer.java.sun.com/developer/onlineTraining/new2java/divelog/part1/page8.jsp)
    There is a problem. If I compile the DiveLog.java Code as it calls on page 8 at the end of Part 1. Errormessages appears as follows:
    DiveLog.java cannot resolve symbol
    symbol: class Diver
    location: divelog.DiveLog new Diver()
    The same messages appear for the classes: Dives,Welcome,Statistics,WebSite and Resources.
    I have followed the steps on page 7, but it didn't work.
    I mean, I wrote the classes Diver.java, Dives.java and so on. Then I saved them in the divelog directory (and compiled them).
    Has somebody an idea?
    (I use a Win 98 platform)
    Thanks in advance,
    joletaxi

    i think it is because you wrote wrong commands.
    the right is :
    javac -classpath h:\ DiveLog.java
    i have put the DiveLog.java in h:\divelog\DiveLog.java
    do you understand me ?
    another question:
    i can't see the part 2 of the book.could you see it?

  • How To: Reference LabVIEW VIs in Memory from a Compiled Application?

    Hello all! This is my first post on these boards despite the fact that I have been doing LabVIEW for almost 8 years...so go easy on me!
    Basically my issue is this: I want to write a compiled application for my team to use to help us have a standardized tool to push VI help tip information. So I created a nice front panel, gave it memory storage via XML to remember info you might want to not have to type over and over again. I also gave it some formatting options, etc. Overall, a nice tool to speed up a repetitive task.
    However, it runs great as a VI, but compiled does not work at all and I am sure many of you can see where this is going. I have cobbled together some snippets of code found on these boards to collect a list of references and names of all the VIs in memory that are not currently running. Then I use a ring control to parse which VI I want to target and then push the parsed and formatted help tip to that VI. But the reality is apparently that LabVIEW and a compiled application do not share the same memory allocation, because they are separate application instances.
    Is there ANY way around this?
    I tried one thing that seemed to make sense, but so far has resulted in the same thing. I tried to do a type def call by reference with an asynchronous call and a wait on asynchronous call function to return the reference list. However, even though this bit of code is still a VI and NOT part of the compiled code, it still somehow picks up the application instance of the owning app, and therefore does not see any of the open VIs in memory that LabVIEW controls.
    Any help would be immense, as I am going nuts trying to figure this out!
    Info: LabVIEW 2012.f3
    I am also attaching a screen cap of the block diagram of the VI that collects the references.
    Thanks in advance!
    South West Applied Technologies
    Senior LabVIEW Developer

    Well you run into a security limitation of VI server here. Many methods and properties are not possible to be accessed through a remote application instance. Any Application instance that is opened with an address is considered a remote instance. Basically if you leave the address open in the Open Application, LabVIEW shortcuts to the internal instance. If you connect some address even if it is "localhost", LabVIEW goes through the TCP/IP socket for any and all methods and proeprties and the application instance is considered a remote instance.
    Open your floating help window, and place your cursor above your property. Notice the text in there: Remote Access disallowed: Yes.
    The reason for this is, that if this method was available over remote connections, anyone with access to your network could connect to that LabVIEW instance and basically discover any and every VI you have currently loaded and even download them to their own computer. And this can not be fixed. This security is not possible to circumvent other than hacking into LabVIEW itself.
    I guess this kills your entire idea. An executable can't connect to another executable or the LabVIEW development environment other than through a remote connection! That is due to strict process isolation rules in all modern OSes. The only possible workaround I could think is to create VIs for all remote access protected methods and properties, copying them to every LabVIEW installation you want to access with your shell (and that likely would have to be done through the network as the according methods in the VI server interface are also remote access protected) and then call those VIs through VI server.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Run compiled application (LV 8.6) without run-time engine

    Hi,
    I just recently wrote a small 200KB program that performs simple calculations that I'd like to use on several different computers.  The application works perfectly, but the problem is that I really don't want to go through the download/install/reboot process of installing the LabVIEW Run-time 8.6 software on every single computer (especially since downloading a 100MB file to run a 200KB program seems counter-intuitive).   Is there a way to get the application to run without the engine?  Previous searches resulted in old posts of people simply copying the engine files from the shared folder into the application directory, but that did not work when I tried it.  Is this no longer possible on LV 8.6?   I'll have no choice but to rewrite the application in a different programming language if LabVIEW isn't capable of running standalone compiled applications.
    Thanks,
    Anthony 

    I made the test with LV 8.6 on Windows.
    I used a VI which does not need any drivers neither serial nor any other hardware execpt the graphics card.
    I made an application from this VI on my normal development machine and checked that it will start and work as expected.
    I setup a NI free partition with Win XP Prof. SP2. I have some non NI programs installed like a virus scanner, defragmentation tool, Adobe Reader, a drive imageing tool and WLAN drivers. The .NET Framework 2.0 is installed.
    I copied the application and all files under National Instruments\shared\LabVIEW Run-Time\8.6 to the machine in a temporary folder.
    I booted the machine into this partition. The application will start and work as expected. You do not need to make a complete runtime installation until you do not need any drivers.
    The above mentioned folder has a size of about 64 MByte. Dependent on the application and desired languages you can remove parts of it.
    Dennis,
    during the various LV 8.x versions it was possible to do it as described above exepct one version, 8.2 I think, which needed an ini-File in the Windows folder.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • VISA resource name control will not function in my compiled application

    Hi
    I am having a great deal of difficulty.
    I have compiled my application which drives an instrument over a serial interface. 
    In my uncompiled top level vi I can easily change the VISA control to a port the PC recognizes (the control has a drop down list of available ports).  Unfortunately in the compiled version this control is disabled.
    I really can't figure out what the problem is.  One thing to note is that when I run the complied application on my PC which has the full development version of LabVIEW (LabVIEW version 7.1) the control will work.  It is only when I try to run the compiled application on other PC's which have only the LabVIEW run time engine installed.  (Note: I know that the communications link is OK on these other PC's as I am still able to send commands to the instrument over HyperTerminal).
    I hope somebody can help, I am really stumpt on this one.
    Many thanks
    Ash

    Hi,
      you've said that you've built the installer, and are installing the serial driver, but have you installed the VISA run-time on the target machine?
    Thanks
    Sacha Emery
    National Instruments (UK)
    // it takes almost no time to rate an answer

  • LabVIEW 2011 compiled application icon missing

    Previously when I built an application the VI Icon would appear in the top right corner exactly the same in the compiled executable as it did in the VI.
    Since upgrading to LabVIEW 2011SP1 all I get is a blank/question mark, icon missing indicator.
    This happens for all of my compiled applications regardless of what icon I specify, even if I leave it as the default.
    VI icon looks like this               Application icon looks like this.
    Just to be extra clear, there is no problem with how the exe icon appears in windows explorer and shortcuts.
    I am ONLY talking about how the front panel icon in the top right corner appears.
    The application works, it just looks ugly/unprofessional.
    Is this a bug? Do I have something configured incorrectly? Is there a workaround? Has anyone else noticed this?
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle
    Solved!
    Go to Solution.

    I tried building on another computer. It works properly.
    My usual development machine is running Windows XP SP3.
    The other computer I just tried a build on is running Windows 7 and that works fine.
    I'm trying a repair of the XP installation now (I'll get back to you in a couple of hours!).
    One other possible difference is that on the XP machine I installed the LabVIEW 2011 SP1 f1 patch.
    Now I can't remember if I uninstalled it again afterwards. How can you tell if the patch has been applied or not?
    I can't remember if I did it on the Windows 7 machine too???
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • Compiling applications which access referencepartitions

    Hi,
    in our project we have two server applications (lets call them ServApp1 and
    ServApp2): ServApp2 partitions are compiled, installed on an Unix box and
    are configured as reference partitions to ServApp1 (which in turn is
    installed on an NT box); in ServApp2 we access C wrapped libraries and the
    DB while ServApp1 is basically a frontend IIOP listener.
    When we use ServApp1 in interpreted mode everything works fine, but when we
    try to compile it we get compile errors saying that the compiler does not
    manage to find the libraries used by ServApp2.
    Now, those libraries are only used by ServApp2 and their plans are not in
    the supplier plan list of ServApp1; in addition, looking at the C++ classes
    generated for ServApp1 we found that the code generator included code
    relative to the services included in ServApp2 (even DB services).
    By the way, we have the same behaviour if we try to install and compile
    ServApp1 on an Unix box different from the one used by ServApp2.
    Do you think this is normal or is there any particular way to avoid it we
    might have overlooked?
    Thanks a lot for your cooperation
    Ernesto Moscatelli
    SEMAGROUP Italy
    PS: we use Forte' Rel. 3.0.j
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Ernesto,
    I understand your problem, When you deploy your Fort&eacute; application you decide
    the right partitioning schema, as an example Partition Server1 and Server2
    and you think that you will have in Server 1 just the code useful for the
    object running in that patition.
    Unfortunately that is not the reality, doesn't matter if you use or not use
    a reference partition when you use services from a service object.
    The thing that you have to understand is the Fort&eacute; supplier plan management.
    In your concrete deployment you have two partition ServApp1 & ServApp2, in
    order to reference a service object in ServApp2 from ServApp1 you must have
    defined the project that contains this SO as supplier plan of the caller
    project in ServAPP1.
    By doing that, at deployment time, Fort&eacute; wil put in your ServAPP1 partition
    the definition of the project that you reference from ServAPP2 and all the
    inheritance chain of supplier plan indirectly referenced by that project.
    That the reason why you see all the code related to ServAPP2 in your
    ServAPP1 deployment.
    You can avoid that by breaking the Supplier Plan Chain appllying a Design
    Pattern.
    If you want more detail about the pattern you can contact me and we will be
    able to speak directly in Italian.
    Hope this help,
    Cheers, Max.
    Massimiliano Delsante
    Object Technology Manager
    O.T. Consulting S.r.l
    Via della Previdenza Sociale N&deg; 11
    42100 Reggio Emilia
    Tel : 0522 271550
    Fax : 0522 230710
    Mobile : 0335 6670268
    www.otconsulting.com
    -----Messaggio originale-----
    Da: [email protected] <[email protected]>
    A: [email protected] <[email protected]>
    Data: venerd&igrave; 23 aprile 1999 10.54
    Oggetto: Compiling applications which access reference partitions
    Hi,
    in our project we have two server applications (lets call them ServApp1 and
    ServApp2): ServApp2 partitions are compiled, installed on an Unix box and
    are configured as reference partitions to ServApp1 (which in turn is
    installed on an NT box); in ServApp2 we access C wrapped libraries and the
    DB while ServApp1 is basically a frontend IIOP listener.
    When we use ServApp1 in interpreted mode everything works fine, but when we
    try to compile it we get compile errors saying that the compiler does not
    manage to find the libraries used by ServApp2.
    Now, those libraries are only used by ServApp2 and their plans are not in
    the supplier plan list of ServApp1; in addition, looking at the C++ classes
    generated for ServApp1 we found that the code generator included code
    relative to the services included in ServApp2 (even DB services).
    By the way, we have the same behaviour if we try to install and compile
    ServApp1 on an Unix box different from the one used by ServApp2.
    Do you think this is normal or is there any particular way to avoid it we
    might have overlooked?
    Thanks a lot for your cooperation
    Ernesto Moscatelli
    SEMAGROUP Italy
    PS: we use Forte' Rel. 3.0.j
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Compiling Application Help Needed

    Ok, I try compiling with TextPad my first application from the application tutorial (http://developer.java.sun.com/developer/onlineTraining/new2java/divelog/part1) and i get this error:
    C:\Documents and Settings\Nancy Schott\My Documents\Matt's Stuff\Programming\Divelog\DiveLog.java:50: cannot resolve symbol
    symbol : class Welcome
    location: class divelog.DiveLog
    tabbedPane.addTab("Welcome", null, new Welcome(), "Welcome to Dive Log");
    (the error is at the new Welcome() spot)
    1 error
    but it is with all of the tabbedPane.addTab stuff. Could someone help me, because I can not figure it out and the troubleshooting thing at the end of it didn't help.
    I compile useing the default TextPad command. It is something like
    javac $FileDir $File
    which means that for this it is saying
    javac C:\My Documents\Matt's Stuff\Programming\Divelog DiveLog.java
    Please Help!! Thanks

    here is my code for divelog:
    package divelog;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class DiveLog
         private JFrame dlframe; //not assigned yet
         private JTabbedPane tabbedPane; //not assigned yet
         public DiveLog()
              // Create a frame object to add the application GUI components to.
              dlframe = new JFrame("A Java Technology Dive Log");
              // Closes from title bar
              //and from menu
              dlframe.addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        System.exit(0);
         // Tabbed pane with panels for Jcomponents
         // Instantiate JTabbedPane with keyword new
         tabbedPane =new JTabbedPane(SwingConstants.LEFT);
         // Calls method to set color
         tabbedPane.setBackground(Color.blue);
         tabbedPane.setForeground(Color.white);
         populateTabbedPane();
         dlframe.getContentPane().add(tabbedPane);
         dlframe.pack();
         dlframe.setSize(765, 690);
         dlframe.setBackground(Color.white);
         dlframe.setVisible(true);
         }// Ends constructor
         // Method header
         private void populateTabbedPane()
              //creates tabs with titles
              tabbedPane.addTab("Welcome", null, new Welcome(), "Welcome to Dive Log");
              //tabbedPane.addTab("Diver Data", null, new Diver(), "Click here to enter diver data");
              //tabbedPane.addTab( "Log Dives", null, new Dives(), "Click here to enter dives");
              //tabbedPane.addTab("Statistics", null, new Statistics(), "Click here to calculate" + " dive statistics");
              //tabbedPane.addTab("Favorite Web Site", null, new WebSite(), "Click here to see a web site");
              //tabbedPane.addTab("Resources", null, new Resources(), "Click here to see a list " + "of resources");
         }//Ends populateTabbedPane method
         private void buildMenu()
              // Opens buildMenu method
              JMenuBar mb = new JMenuBar();
              JMenu menu = new JMenu("File");
              JMenuItem item = new JMenuItem("Exit");
              //Closes the application from the Exit menu item.
              item.addActionListener(new ActionListener()
                   // Opens addActionListener method
                   public void actionPerformed(ActionEvent e)
                        // Opens actionPerformed method
                        System.exit(0);
                   } // Closes actionPerformed method
              }); // Closes addActionListener method
              menu.add(item);
              mb.add(menu);
              dlframe.setJMenuBar(mb);
         } //Ends the buildMenu method
         public static void main(String[] args)
              DiveLog dl = new DiveLog();
    }//Ends Class
    And here is my welcome class
    package divelog;
    import javax.swing.*;
    import java.awt.*;
    public class Welcome extends JPanel
    { // Opens class
    } // Closes class

  • Execution failure of compiled application

    Hello Forte users,
    I am faced with a very serious problem for which I would appreciate any
    help. We have an application that we compiled (using VC++ 5.0) and created
    executables. The application has been deployed with 1 server partition, 1
    server router partition and 1 client partition (all three compiled). When
    I try to bring this application to "ONLINE" from the Environment Console,
    it fails giving the following exception:
    SYSTEM ERROR: Unable to completely start application RG_GE300_GenesisBat.
    Received exception while starting partition
    RG_GE300_GenesisBat_cl0_Part1.
    Class: qqsp_ResourceException
    Error #: [1301, 33]
    Detected at: qqem_ApplicationAgent::Startup at 2
    Last TOOL statement: method ApplicationVM.StartUp
    Error Time: Wed Dec 02 13:44:56
    Distributed method called: qqsm_ApplicationAgentProxy.ExecuteCommand!54
    (object name Unnamed) from partition "EnvManager_cl0_Client",
    (partitionId
    = 4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1c8:0x2, taskId =
    [4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1c8.3]) in application
    "FTLaunch_cl0", pid 296 on node CLTTRNAPP in environment env3rt
    Exception occurred (remotely) on partition "Node Manager", (partitionId
    =
    4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1a9, taskId =
    [4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1c8:0x2.13]) in application
    "System Manager", pid 98 on node CLTTRNAPP in environment env3rt.
    SYSTEM ERROR: Unable to start partition RG_GE300_GenesisBat_cl0_Part1
    from
    its executable.
    Class: qqsp_ResourceException
    Error #: [1301, 101]
    Detected at: qqem_IPartitionAgent::Startup at 2
    Error Time: Wed Dec 02 13:44:56
    Exception occurred (remotely) on partition "Node Manager", (partitionId
    =
    4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1a9, taskId =
    [4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1c8:0x2.13]) in application
    "System Manager", pid 98 on node CLTTRNAPP in environment env3rt.
    SYSTEM ERROR: Giving up on start of partition RG_GE300_GenesisBat_cl0_Part1
    from executable d:\vendsoft\3rt\forteg3\userapp\rg_ge300\cl0\rg_ge31.exe.
    Most likely, the executable could not be started due to lack of some
    system
    resource. Check the node manager log for node CLTTRNAPP for more
    information
    about the specific problem.
    Class: qqsp_ErrorDescriptor
    Detected at: qqem_IPartitionAgent::Startup at 2
    Error Time: Wed Dec 02 13:44:56
    Exception occurred (remotely) on partition "Node Manager", (partitionId
    =
    4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1a9, taskId =
    [4407E5F0-7FFA-11D2-A4EA-2AAB0D57AA77:0x1c8:0x2.13]) in application
    "System Manager", pid 98 on node CLTTRNAPP in environment env3rt.
    We have tried all the suggestions in Technote 10861, but still get the
    error.
    I would appreciate any help regarding this error message as it is critical
    for our installation.
    The really interesting thing is that when I go through the NT explorer and
    double click on the actual executable, it works!
    Thanks,
    Anand.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    what phone do you have? .exe files will not install on symbian (nokia) phones
    Giving more detail will let others help you better

  • J2EE Tutorial examples compile problems

    I wanna try to compile the examples that came with the tutorial but I
    don't succeed.
    Here are the error messages:
    [root:/usr/local/j2eetutorial/examples]$ ant all
    Buildfile: build.xml
    init:
    BUILD FAILED
    /usr/local/j2eetutorial/examples/build.xml:19: /usr/local/j2eetutorial/examples/
    build.xml:19: java.lang.StringIndexOutOfBoundsException: String index out of ran
    ge: -1
    --- Nested Exception ---
    /usr/local/j2eetutorial/examples/build.xml:19: java.lang.StringIndexOutOfBoundsE
    xception: String index out of range: -1
    --- Nested Exception ---
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1480)
         at org.apache.tools.ant.taskdefs.Property.loadEnvironment(Property.java:
    248)
         at org.apache.tools.ant.taskdefs.Property.execute(Property.java:172)
         at org.apache.tools.ant.Target.execute(Target.java:153)
         at org.apache.tools.ant.Project.runTarget(Project.java:898)
         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
         at org.apache.tools.ant.Main.runBuild(Main.java:421)
         at org.apache.tools.ant.Main.main(Main.java:149)
    Total time: 1 second
    [root:/usr/local/j2eetutorial/examples]$
    I set the environment according the instructions in the tutorial:
    J2EE_HOME=/usr/local/j2sdkee1.3.1
    JAVA_HOME=/usr/local/j2sdk1.4.1_01
    ANT=/usr/local/jakarta-ant-1.3
    PATH=$PATH:$J2EE_HOME/bin:$JAVA_HOME/bin:$ANT/bin
    export J2EE_HOME JAVA_HOME ANT PATH
    but I suspect the problem lies within 'build.xml'. These are lines 19
    through 24:
    <property environment="myenv" />
    <property name="j2eepath" value="${myenv.J2EE_HOME}/lib/j2ee.jar" />
    <property name="webpath" value="${webejb}" />
    <property name="connector-lib" value="${myenv.J2EE_HOME}/lib/connector" />
    <property name="cloud-lib" value="${myenv.J2EE_HOME}/lib/cloudscape" />
    <property name="system-lib" value="${myenv.J2EE_HOME}/lib/system" />
    Line 19 mentions "myenv" but I never set anything like that. Maybe I
    should edit this line?
    Any ideas?
    Thanks
    Nick.

    Had the same error myself. Seems to be an issue with ant, I upgraded to ant 1.5.3.beta1 and it built fine. Hope this helps somewhat.
    --Rice                                                                                                                                                                                                                                                                                           

  • Visual Studio 2012 MFC C++ Win32 Compiled Application wouldn't run on Windows XP... FIXED!

    Converted a large Visual Studio 2005 MFC C++ Win32 Application to Visual Studio 2012.
    The compiled Win32 Application worked fine in Windows 7 and Windows 8 but not Windows XP.
    Found these 2 links which were very helpful on fixing the issue.
    http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx
    http://stackoverflow.com/questions/13051605/winforms-not-a-valid-win32-application
    So now my application compiles and works properly in Windows XP, Windows 7, and Windows 8.
    Just thought this might be helpful to someone else that may end up with the same issue.
    BillNew
    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

    VF,
    Sounds like a plan.
    We are experimenting with Visual Studio 2012 on the Metro Style for our applications. So far, Windows 8 and Metro Style are extremely frustrating to me.
    Have VS2003 and VS2005 which is where most of our executable program code has been generated.
    We also have VS2008, VS2010, and VS2012.
    The ultimate goal was / is to convert a very large MFC C++ Program from VS2005 into VS2012 Metro Application... and VS2012 is fighting me every step of the way... Mostly linker errors at the moment... and that is just trying to do the DirectX Initialization
    for a Video Window without building the Video Graph.
    Oh well... The fight continues!
    BillNew
    DirectShow Filter Graph Spy: http://alax.info/blog/777 Extremely helpful for finding deep details for DirectShow Graphs.

  • Compile application using command line

    I want to be able to compile a personal profile application using the command line. Up until now I've used an IDE (WSDD) to compile and test my application but I need to be able to compile it using just the command line.
    Any help on the matter is much appreciated, thanks
    MBliss

    Thanks for the reply but unfortunately i'm not trying to compile a MIDP application, which is what the link refers to. I did however find out the -bootclasspath arguments i needed.

  • Compiling applications

    i am having trouble compiling multipul class aplications, single class programs r fine bet wil more then one class i end up with loads of errors, any help would be great
    anthony

    using JCreater i am trying to compile this
    package divelog;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class DiveLog
    { //Opens DiveLog class
    private JTabbedPane tabbedPane;
    private JFrame dlframe;
    public DiveLog()
    { //Opens DiveLog constructor
    //Create a frame object to add the application
    //GUI components to.
    dlframe = new JFrame("A Java(TM) Technology Dive Log");
    // Closes from title bar
    //and from menu
    dlframe.addWindowListener(new WindowAdapter()
    { // Opens addWindowListener method
    public void windowClosing(WindowEvent e)
    { // Opens windowClosing method
    System.exit(0);
    } // Closes windowClosing method
    }); // Closes addWindowListener method
    // Tabbed pane with panels for Jcomponents
    tabbedPane = new JTabbedPane(SwingConstants.LEFT);
    tabbedPane.setBackground(Color.blue);
    tabbedPane.setForeground(Color.white);
    // Calls a method that adds individual tabs to the
    //tabbedpane object.
    populateTabbedPane();
    //Calls the method that builds the menu
    buildMenu();
    dlframe.getContentPane().add(tabbedPane);
    dlframe.pack();
    dlframe.setSize(765, 690);
    dlframe.setBackground(Color.white);
    dlframe.setVisible(true);
    } // Ends class constructor
    private void populateTabbedPane()
    { // Opens populateTabbedPane method definition
    // Create tabs with titles
    tabbedPane.addTab("Welcome",
    null,
    new Welcome(),
    "Welcome to the Dive Log");
    tabbedPane.addTab("Diver Data",
    null,
    new Diver(),
    "Click here to enter diver data");
    tabbedPane.addTab("Log Dives",
    null,
    new Dives(),
    "Click here to enter dives");
    tabbedPane.addTab("Statistics",
    null,
    new Statistics(),
    "Click here to calculate dive statistics");
    tabbedPane.addTab("Favorite Web Site",
    null,
    new WebSite(),
    "Click here to see a web site");
    tabbedPane.addTab("Resources",
    null,
    new Resources(),
    "Click here to see a list of resources");
    } //Ends populateTabbedPane method
    private void buildMenu()
    { // Opens buildMenu method definition
    JMenuBar mb = new JMenuBar();
    JMenu menu = new JMenu("File");
    JMenuItem item = new JMenuItem("Exit");
    //Closes the application from the Exit
    //menu item.
    item.addActionListener(new ActionListener()
    { // Opens addActionListener method
    public void actionPerformed(ActionEvent e)
    { // Opens actionPerformed method
    System.exit(0);
    } // Closes actionPerformed method
    }); // Closes addActionListener method
    menu.add(item);
    mb.add(menu);
    dlframe.setJMenuBar(mb);
    }// Closes buildMenu method
    // main method and entry point for app
    public static void main(String[] args)
    { // Opens main method
    DiveLog dl = new DiveLog();
    } // Closes main method
    } //Ends class DiveLog
    ////////////////////// the errors i get are these /////////////////////
    C:\divelog\Divelog\Divelog.java:63: cannot resolve symbol
    symbol : class Welcome
    location: class divelog.DiveLog
    new Welcome(),
    ^
    C:\divelog\Divelog\Divelog.java:69: cannot resolve symbol
    symbol : class Diver
    location: class divelog.DiveLog
    new Diver(),
    ^
    C:\divelog\Divelog\Divelog.java:74: cannot resolve symbol
    symbol : class Dives
    location: class divelog.DiveLog
    new Dives(),
    ^
    C:\divelog\Divelog\Divelog.java:79: cannot resolve symbol
    symbol : class Statistics
    location: class divelog.DiveLog
    new Statistics(),
    ^
    C:\divelog\Divelog\Divelog.java:84: cannot resolve symbol
    symbol : class WebSite
    location: class divelog.DiveLog
    new WebSite(),
    ^
    C:\divelog\Divelog\Divelog.java:88: cannot resolve symbol
    symbol : class Resources
    location: class divelog.DiveLog
    new Resources(),
    ^
    6 errors
    Process completed.
    any help would be great, i know its something to do with the class path but i can't find where to set it in JCreater
    help please
    thankfully
    anthony

  • "asant build" for bookstore1 example in j2ee tutorial gives "compile error"

    Hello everybody,
    I am trying to run "asant build" command to build package for bookstore1 example given in j2ee tutorials.
    I installed my j2ee tutorial 1.4 in "c:\java\j2eetutorial14" and my example is in "c:\java\j2eetutorial\examples\web\bookstore1".
    My j2ee SDK with appliation server is installed in C:\sun\appserver.
    When i run the "asant build" command in "c:\java\j2eetutorial\examples\web\bookstore1" directory i get compile error with last few lines as follows.
    [javac] location: class servlets.ShowCartServlet
    [javac] } catch (BookNotFoundException ex) {
    [javac] ^
    [javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
    :136: cannot resolve symbol
    [javac] symbol : class ShoppingCartItem
    [javac] location: class servlets.ShowCartServlet
    [javac] ShoppingCartItem item = (ShoppingCartItem) i.next();
    [javac] ^
    [javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
    :136: cannot resolve symbol
    [javac] symbol : class ShoppingCartItem
    [javac] location: class servlets.ShowCartServlet
    [javac] ShoppingCartItem item = (ShoppingCartItem) i.next();
    [javac] ^
    [javac] C:\Java\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCartServlet.jav
    :137: cannot resolve symbol
    [javac] symbol : class BookDetails
    [javac] location: class servlets.ShowCartServlet
    [javac] bd = (BookDetails) item.getItem();
    [javac] ^
    [javac] 69 errors
    BUILD FAILED
    file:C:/Java/j2eetutorial14/examples/web/bookstore1/build.xml:68: Compile failed; see the compiler error output for details.
    Total time: 2 seconds
    Can some one please help me.
    thanks

    When i run the "asant build" command in
    "c:\java\j2eetutorial\examples\web\bookstore1"
    directory i get compile error with last few lines as
    follows.Did you package the bookstore common files as described in Chapter 3? My guess is that you didn't include bookstore.jar from <INSTALL>/j2eetutorial14/examples/build/web/bookstore/dist/.
    -Ian Evans
    Sun Microsystems
    J2EE Tutorial team

  • Unable to compile application in eclipse

    Please help me compile and run a servlet HelloWorld project in Eclipse.
    I am trying to compile a sample helloWorld Servlet in Eclipse 3.x Europa and Tomcat 6. When I click on Run a window comes up asking do I want to run it as a java application or Applet. If I selet Applet, it said that there is no applet avaible. If I select Java Application is will ask to select an item from the list. The following three items appeasr in a list
    jspC �
    SDCInstaller -
    SmapGenerater �
    If I go to projec to build the class, it is grey out. However, the option Build Automatically is checked.
    If I look in my working directory, I can see a blank bin, src, and work folder. In the WEB-INF directory, I see a empty lib, the scr has the HelloWorld.java, and the class has the Helloworld.class. Please Help me!!!

    Thanks,
    I was able to compile it. First, I start tomcast, and I stop it right away. Then, I click on run, and it run it. However, I am getting the error message. I think it may have to do with the xml file that I am using. I notice the web-app and servlet name are hilight as if they were spelled wrong. If I change web-app to WEB-APP, it does not show me the error but it does not work either. Below is a copy of my web.xml file and the error message that I am getting when I type the url http://localhost:8080/HelloWorld/hello
    " type Status report
    message This application is not currently available
    description The requested service (This application is not currently available) is not currently available.
    Also, I see an exeption in the application see below the class file
    <strong > -- XML FILE </strong>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"> -->
    <web-app>
    <servlet>
    <servlet-name>Hello</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Hello</servlet-name>
    <url-pattern>/HelloServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    <strong> class </strong>
    import java.io.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    public class HelloServlet extends HttpServlet {
    public void doGet (HttpServletRequest req,
    HttpServletResponse res)
    throws ServletException, IOException
    PrintWriter out = res.getWriter();
    out.println("Hello, Brave new World!");
    out.close();
    <strong > error Message </strong>
    Jan 10, 2008 10:52:02 AM org.apache.catalina.core.AprLifecycleListener init
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_14\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre1.6.0_03\bin\client;C:\Program Files\Java\jre1.6.0_03\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_14\bin;C:\JDBC\sqljdbc_1.2\enu\sqljdbc.jar;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Tomcat;C:\Tomcat\bin;C:\eclipse\Workspace;c:/.;C:\Tomcat\lib\servlet-api.jar;C:\Tomcat\lib\jsp-api.jar
    Jan 10, 2008 10:52:02 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    Jan 10, 2008 10:52:02 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 896 ms
    Jan 10, 2008 10:52:02 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    Jan 10, 2008 10:52:02 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
    Jan 10, 2008 10:52:02 AM org.apache.tomcat.util.modeler.Registry registerComponent
    SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/HelloWorld,J2EEApplication=none,J2EEServer=none
    Jan 10, 2008 10:52:02 AM org.apache.catalina.startup.HostConfig deployDescriptor
    SEVERE: Error deploying configuration descriptor HelloWorld.xml
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
         at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1064)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
         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:585)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Jan 10, 2008 10:52:03 AM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    Jan 10, 2008 10:52:03 AM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    Jan 10, 2008 10:52:03 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    Jan 10, 2008 10:52:03 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1348 ms
    Jan 10, 2008 10:52:13 AM org.apache.tomcat.util.modeler.Registry registerComponent
    SEVERE: Null component Catalina:type=JspMonitor,name=jsp,WebModule=//localhost/HelloWorld,J2EEApplication=none,J2EEServer=none
    Jan 10, 2008 10:52:13 AM org.apache.catalina.startup.HostConfig deployDescriptor
    SEVERE: Error deploying configuration descriptor HelloWorld.xml
    java.lang.UnsupportedClassVersionError: Bad version number in .class file
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:108)
         at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:58)
         at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:297)
         at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1064)
         at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4239)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1206)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
         at java.lang.Thread.run(Thread.java:595)

Maybe you are looking for

  • Error while uploading data from ODS to Cube

    Hi All, Will you please help out this issue.As this is a priority high issue,please reply if you know the answers. I am facing an error while loading the data from ODS to CUBE,the error is <b>1.Name is not in the namespace for generated BW Metaobject

  • Report Painter - Totals are different on face of report & line item details

    Hello, We have a report designed in report painter. Thye lIbrary table is GLPCT. When we run the report system gives e.g. 100 $ on face of report. However when we double click on that line to get a line item details reoprt the value is different. It

  • Amount showing in BPC without decimals.

    Hi BPC Gurus,   I have uploaded data from BI Cube to BPC Cube successfully. When seen the report I am surprised to find that the amount in the Amount column has no decimal point i.e. Rs.500000 where as it should be Rs.5000.00/- . So my report is misl

  • KSPP -Scheduled Activity are not updated for last 2 periods

    Hi All, When we run KSPP by using LTP, noticed that for one cost center and activity type the plan scheduled Acivities are not updated for last 2 period's.(shows Zero) Do we miss any thing. Regards, Raj

  • Problems installing vista ultimate

    I have vista home on my x61, but want ultimate, when I put in the DVD (in USB-dvd reader), the computer only does a normal start-up, I went to bios and made "usb-dvd" first priority on start-up... What am I dont wrong? Thinkpad X61 7675-A48. 2.5 Ghz,