Compiling error reading RMI implemntation fil

i want to my 1st rmi program but cant compile
1st file Hello.java
package examples.hello;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Hello extends Remote {
String sayHello() throws RemoteException;
this file compiles correctly
but 2nd one HelloImp1.java
package examples.hello;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.RMISecurityManager;
import java.rmi.server.UnicastRemoteObject;
public class HelloImpl extends UnicastRemoteObject
implements Hello {
public HelloImpl() throws RemoteException {
super();
public String sayHello() {
return "Hello World!";
public static void main(String args[]) {
// Create and install a security manager
if (System.getSecurityManager() == null) {
     System.setSecurityManager(new RMISecurityManager());
try {
     HelloImpl obj = new HelloImpl();
     // Bind this object instance to the name "HelloServer"
     Naming.rebind("HelloServer", obj);
     System.out.println("HelloServer bound in registry");
} catch (Exception e) {
     System.out.println("HelloImpl err: " + e.getMessage());
     e.printStackTrace();
wont compile it gives error
cannot read file HelloImp1.java
error 1
Plz help me

Looks like you have a discrepancy in the file name vs the class it contains - hellImpl vs helloImp1

Similar Messages

  • Error reading setup initialization file

    I am trying to download and install
    J2SE v 1.4.2_04 SDK and
    J2SE v 1.4.2_04 JRE
    on a Windows XP platform SP1. The machine is a dual XEON 3.0 G machine with 1G of memory.
    I downloaded the software and saved it to my desktop. When I double clicked on either application I get a dialog box with the following message...
    "Error reading setup initialization file"...This message appears in a dialog box with no header and no lettering in the button to dismiss the dialog box.
    I tried looking through the forums and contacting SUN without any success....Can someone help me?

    Update to previous post
    I found the source of the error. Either the firewall server or proxy server that our site is using had altered the file. Both servers do some type of 'content' filtering for viruses, etc. To confirm this, I downloaded the file while at another site and then compared the two files. There was differences between the two files. The alteration wasn't enought to completely break the executable, but enough so that InstallShield couldn't run properly.

  • Installing JRE 1.4.2_04 error: Error reading setup initialization file

    I'm getting the following error when trying to install the Java 2 Runtime Environment.
    Diaglog box containing message: Error reading setup initialization file.
    I get this error on any of the installers for Java 2 Runtime Environment, Standard Edition 1.4.2_0x; Windows Platform; Windows Offline Installation and Windows Installation.
    I do not get this error with the installer for Java 2 Runtime Environment, Standard Edition 1.4.2.
    According to the InstallShield web site, this error is caused by an invalid setting for the MSI Engine Location property in the release. See Q105447 on the InstallShield web site Knowledge Base.

    I doubt that the root cause is the modification of the file because of the following:
    - I have a machine (XP) on which I downloaded j2sdk-1_4_2_09-windows-i586-p.exe and was able to run the install without issue.
    - I then mounted a drive on a windows2003 machine and copied the same file to it, the file size was exactly the same. When I ran the install, I got the error "Error reading setup initialization file" and the button with no text.
    - I searched through google and found this thread. I used pkzip to package the file and on the original platform, copied it to the 2003 machine and unzipped it. Once again, the same error showed up.
    The explanation for the error provided in this thread is not plausible because:
    - there are no firewalls/proxy in play in a file share
    - the same thing happens when the install is transferred through a zip. Something would need to alter the zipped file in transit without corrupting the zip itself for this explanation to be valid. This is simply not plausible.
    There is clearly something going on that has yet to be explained. An explanation of the problem and (even better) a workaround would be welcome.

  • Export with Table Splitting : ORA-01115: IO error reading block from file

    Hello,
    We are in perfroming the last dryrun of our CU&UC conversion.
    The are now in the process of exporting the ECC6 system (Oracle 10.2.0.4.0, HPUX ia64) using sapinst features, "table splitting preparation"
    When doing so, we are facing critical errors :
    Creating file /export_uni/sapinst_splitting/ora_query3_tmp3_1.sql.
    ERROR 2010-08-11 10:27:28.881
    CJS-00084  SQL statement or script failed. DIAGNOSIS: Error message: ORA-12801: error signaled in parallel query server P002
    ORA-01115: IO error reading block from file 90 (block # 16640)
    ORA-27072: File I/O error
    HPUX-ia64 Error: 22: Invalid argument
    Additional information: 4
    Additional information: 16640
    Additional information: -1
    ORA-01115: IO error reading block from file 90 (block # 16640)
    ORA-27072: File I/O error
    HPUX-ia64 Error: 22: Invalid argument
    ORA-06512: at "SAPR3.TABLE_SPLITTER", line 775
    ORA-06512: at line 1
    I have therefore perfmed a dbverify ; no corruption has been recorded.
    When trying to perfrom the EXPORT, without table splitting ; it works fine ...but the processing time is extremely long, as you can imagine. Any help would be highly appreciated.Regards.
    Raoul

    Thank you Stefan,
    Our HPUX Release seems to be indeed 11v3,
    [root@:/root]# uname -a
    HP-UX B.11.31 U ia64 2566039091 unlimited-user license
    I'll check the installation of the  patch and keep you informed
    Thank you
    Raoul
    Edited by: Raoul Shiro on Aug 11, 2010 11:57 AM

  • Download of Premier Elements grt error mess: "Error reading initialization setup file" . Any advice?

    Download of Premier Elements grt error mess: "Error reading initialization setup file" . Any advice?

    Please keep in mind that this is a public forum.  If you need immediate assistance please contact our support team.
    As for your error it sounds like the install files are corrupted.  Please download a new copy of the install files.

  • Palm Desktop 6.2 Install - "Error reading setup initialization file"

    I am trying to install Palm Desktop 6.2 and HotSync Manager on Win Vista Home Premium 32-bit.
    When I execute PalmDesktopWin62.exe I get a message “Error reading setup initialization file.”
     I am installing this to sync my Sprint Centro via usb.
     Thanks for any help
    Post relates to: Centro (Sprint)
    Post relates to: Centro (Sprint)

    I had this problem as well. I solved it by using an old Palm Desktop download instead of the one that Palm is providing now. My old copy was provided as a zip archive and the single file in the archive was named simply setup.exe. I guess the only difference between my old file and the file that Palm provides now has something to do with the installation software (it may be InstallShield; I don't remember for sure). In any case, if you are having this problem you might be able to find a usable file out there somewhere.

  • Error Reading setup Intialization file on client side

    Hi Expert,
    When i install the Client setup at client side it's give me the error "Error Reading setup Intialization file".
    I take the setup from the Server B1_shr folder.
    Please reply ASAP.
    Thanks & Regards,
    Tushar Nathwani

    Hi Tushar Nathwani,
    "Error Reading setup Initialization file" implies the setup file is corrupted. You have to find a working copy of it.
    There is no other way around.
    Thanks,
    Gordon

  • Compiling error in my test file for Reader class.

    I did a small program trying to test Reader class, here is my code:
    package testfilereader;
    import java.io.*;
    import java.io.Reader;
    import java.io.InputStream;
    * Title:
    * Description:
    * Copyright: Copyright (c) 2001
    * Company:
    * @author
    * @version 1.0
    public class FileTest {
    public static void main(String args[]){
    Byte buff[] = new Byte[80];
    try{
    InputStream r = new FileInputStream("test.txt");
    int i = r.read(buff);
    String s = new String(buff);
    System.out.println(s);
    }catch(NullPointerException e){}
    catch(IOException e2){}
    But I continue to get compiling errors:
    C:\>javac FileTest.java
    FileTest.java:19: cannot resolve symbol
    symbol : method read (java.lang.Byte[])
    location: class java.io.InputStream
    int i = r.read(buff);
    ^
    FileTest.java:20: cannot resolve symbol
    symbol : constructor String (java.lang.Byte[])
    location: class java.lang.String
    String s = new String(buff);
    Please advise what is wrong here.

    Replace Byte with byte - the methods
    expect arrays of byte; not Byte (which is a simple
    class wrapper for byte).Hi, I changed to:
    byte buff[] = new byte[80];
    Same errors, any other ideas?

  • Compilation error when deploying EAR file on standalone OC4J...

    Hi All,
    I am getting the following error when trying to deploy an EAR File describing a web service from the Jdeveloper IDE to the stanalone OC4J server instance.
    ==========================================================
    Uploading file JavaWebServiceEmp-GetDates-WS.ear ...
    Application Deployer for JavaWebServiceEmp-GetDates-WS STARTS.
    Copy the archive to C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear
    Initialize C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear begins...
    Unpacking JavaWebServiceEmp-GetDates-WS.ear
    Done unpacking JavaWebServiceEmp-GetDates-WS.ear
    Unpacking WebServices.war
    Done unpacking WebServices.war
    Initialize C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS.ear ends...
    Starting application : JavaWebServiceEmp-GetDates-WS
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Initializing EJB sessions
    Committing ClassLoader(s)
    Initialize WebServices begins...
    Initialize WebServices ends...
    Started application : JavaWebServiceEmp-GetDates-WS
    Binding web application(s) to site default-web-site begins...
    Binding WebServices web-module for application JavaWebServiceEmp-GetDates-WS to site default-web-site under context root JavaWebServiceEmp-GetDates-context-root
    Operation failed with error:
    Error compiling :C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home\applications\JavaWebServiceEmp-GetDates-WS\WebServices: compilation error occurred
    Deployment failed
    Elapsed time for deployment: 1 minute, 50 seconds
    ==========================================================
    Please could somebody help me out with this? Basically I am not able to understand how to deploy the EAR file created under the MyWork folder under jdeveloper\jdev to the applications folder of j2ee\home. I am new to both EAR deployment as well as web services and would like to get a good understanding of the working of a web service which includes SOAP components and the like.
    Any help with regards to building and deploying a web service on standalone OC4J would be appreciated. Thanks a lot.

    Initially I followed the following steps to start up OC4J:-
    Settings :-
    1) Jdeveloper is setup under C:\Lester\Testing as Jdev10.1.3 folder
    2) I downloaded the extended oc4j zip folder and unzipped it under a new folder oc4j at the location C:\Lester\Testing\Jdev10.1.3
    Steps followed to run oc4j and deploy application
    1) Setup a standalone oc4j from the jdeveloper ide giving C:\Lester\Testing\Jdev10.1.3\oc4j as the root folder for oc4j.
    2) While doing step 1 added password and deployed it. Changed server.xml under C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/config
    to include the following:-
    <shared-library name="global.libraries" version="1.0" library-compatible="true">
    <code-source path="C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/applib"/>
    </shared-library>
    AND
    <java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" bindir="C:\Jdeveloper\jdk" extdirs="C:\Jdeveloper/jdk" />
    3) Opened a command prompt and went to the location C:\Lester\Testing\JDev10.1.3\oc4j\j2ee\home and ran the following command:-
    --> java -jar oc4j.jar
    4) Deployment: Then I deployed my primewebservice application from command prompt at C:\Lester\Smart Cylinder\Example code\prime\PrimeNumberService>
    using:-
    --> java -jar C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/admin.jar ormi://172.20.13.164:8888 oc4jadmin welcome -deploy -file PrimeNumberService.ear -deploymentName DocStyleWebService
    5) Web Binding: Then I bound my primewebservice application from command prompt at C:\Lester\Smart Cylinder\Example code\prime\PrimeNumberService>
    using:-
    --> java -jar C:\Lester/Testing/JDev10.1.3/oc4j/j2ee/home/admin.jar ormi://172.20.13.164:8888 oc4jadmin welcome -bindWebApp DocStyleWebService PrimeNumberService_web http-web-site /docws
    6) Steps 4 and 5 went through without error.
    7) However when trying to access the web service using the following link I get the standard HTTP 404 (Page not found) error:-
    http://localhost:8888/docws/prime
    This was before I tried deploying the web service through jdeveloper IDE.
    I had tried the document web service given at the following link:-
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/docservice/index.html
    from the web services how to links
    http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/index.html
    Please could somebody help me out? Also periodically I recieve the ojc.exe not found error when trying to deploy an application using jdeveloper ide. There are two conflicting jdeveloper versions one comes with this exe and one without.
    Message was edited by:
    Lester N

  • Compiler Error when Loading JAR File

    I am attempting to load a third party JAR file into an Oracle 8.1.6 database. Most of the packages in the JAR loaded, however one did not. It generated the following Oracle error: ORA-29545: badly formed class: sendData overrides a final method.
    The loadjava command that I used was:
    loadjava -u myid/mypass@mydb:1521:orcl -t -r myjar.jar.After examining the JAR file, the error statement is true. The class with the error was overriding the sendData final method of a base class. Obviously the code compiled, hence a JAR was created.
    Are there options that can be set when using loadjava to ignore this?
    Any help is greatly appreciated.

    Update. If anyone should come across this problem, I found an option to the loadjava command for 8.1.6 called -noverify. Running loadjava with this option on, will get the compiled code into the database and validate it, without verifying the structure. This bypasses the invalid structure and everything works great.

  • Error Reading from a File

    Right now i am coding a game and i need to read from a text file to load the map. The only problem is that i cant do this in internet exploerer because i get an error saying that access is denied. I've been researchign the problem nonstop and the only solution i have found is to sign the applet, but i dont even know how to do that. I would like to avoid having a signed applet for obvious reasons and i'm sure its possible to do it without a signed applet. My code is as follows:
              try{
                   BufferedReader in = new BufferedReader(new FileReader("Map1.txt"));
                   String input, string1, string2;
                   for (int x = 0; x < terrain.length; x++){
                        terrain[x].setFilled(false);
                   for (int x = 0, currentArray; x < terrain.length; x++){
                        if ((input = in.readLine()) != null) {
                             StringTokenizer st = new StringTokenizer(input);
                             currentArray = Integer.parseInt(st.nextToken());
                             terrain[currentArray].setTerrainType(st.nextToken());
                             terrain[currentArray].setFilled(true);
                        else{
                             break;
                   in.close();
                   offscreenMap = createImage(size().width, size().height);
                   mapGraphics = offscreenMap.getGraphics();
                   mapGraphics.clearRect(0, 0, size().width, size().height);
                   // everything from here down is to be painted to mapGraphics... but it doesn't get this far cuz of an error
                   for (int x = 0; x < terrain.length; x++){
                        if (terrain[x].getTerrainType().equals("Grass")){
                             grass.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Grass");
                        else if (terrain[x].getTerrainType().equals("Tree")){
                             tree.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Tree");
                        else if (terrain[x].getTerrainType().equals("Mountain")){
                             mountain.paintIcon(this, mapGraphics, terrain[x].getX(), terrain[x].getY());
                             System.out.println("terrain(" + x + ") is Mountain");
              catch (FileNotFoundException e){
                   System.out.println("Map not found");
              catch (IOException e){
                   System.out.println("IOException Error!");
              }Please tell me how i could read from the same file with a BufferedReader without having to sign an applet.
    Thanks for your help!!!

    ignore that one comment about something not working, thats a thing of the past (offscreen graphics problem, fixed by moving createImage() outside of the contructor) :-D

  • Compilation Error when Readimg XML File.....Help me plz...

    Hi Dudes,
    I am new to XML, when I am trying to read (parsing) the xml file from url, I am getting the following error.(using JAXP)
    xml2jsp.java:50: createTextNode(java.lang.String) in org.w3c.dom.Document cannot
    be applied to () Text index = request.createTextNode();
    here is the source code:
    import java.net.*;
    import java.io.*;
    import org.w3c.dom.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.dom.DOMSource;
    public class xml2jsp {
    private static String server
    = "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&SubscriptionId=026CJ8XE8ZGWH4H58YG2&AssociateTag=" +
                                       "bookinscom-20&Operation=ItemLookup&IdType=ASIN&ItemId=0060006781&ResponseGroup=Reviews";
    public static void main(String[] args) {
    //String server = DEFAULT_SERVER;
    try {   
              // Build the request document
              DocumentBuilderFactory builderFactory
              = DocumentBuilderFactory.newInstance();
              DocumentBuilder builder
              = builderFactory.newDocumentBuilder();
              Document request = builder.newDocument();
              Element methodCall = request.createElement("methodCall");
              request.appendChild(methodCall);
              Element methodName = request.createElement("methodName");
              Text text = request.createTextNode("calculatexml2jsp");
              methodName.appendChild(text);
              methodCall.appendChild(methodName);
              Element params = request.createElement("params");
              methodCall.appendChild(params);
              Element param = request.createElement("param");
              params.appendChild(param);
              Element value = request.createElement("value");
              param.appendChild(value);
              // Had to break the naming convention here because of a
              // conflict with the Java keyword int
              Element intElement = request.createElement("int");
              Text index = request.createTextNode();
              intElement.appendChild(index);
              value.appendChild(intElement);
              // Transmit the request document
              URL u = new URL(server);
              URLConnection uc = u.openConnection();
              HttpURLConnection connection = (HttpURLConnection) uc;
              connection.setDoOutput(true);
              connection.setDoInput(true);
              connection.setRequestMethod("POST");
              OutputStream out = connection.getOutputStream();
              TransformerFactory xformFactory
              = TransformerFactory.newInstance();
              Transformer idTransform = xformFactory.newTransformer();
              Source input = new DOMSource(request);
              Result output = new StreamResult(out);
              idTransform.transform(input, output);
              out.flush();
              out.close();
              // Read the response
              InputStream in = connection.getInputStream();
              Document response = builder.parse(in);
              in.close();
              connection.disconnect();
              NodeList doubles = response.getElementsByTagName("double");
              Node datum = doubles.item(0);
              Text result = (Text) datum.getFirstChild();
              System.out.println(result.getNodeValue());
    catch (Exception e) {
    System.err.println(e);
    Please send your valueable suggestions to sort out the error.
    Looking forward for your favourable reply.
    Regards
    Sridhar

    You need to spcify a string when you try to create a text node. If your goal is to have the <int> element with no content (like either <int></int> or <int/>) then do not create the text node and that will be the result.
    Dave Patterson

  • Compile errors dont show in file

    When i have errors in my flexbuilder2 project, the errors are
    displayed in the Problems window, with the correct description and
    line numbet, but always with the Appname as the resource. So you
    dont know in what file the error is located.
    To make things worse, there are also no red markers in
    Navigator panel. So it is extremely difficult to find the errors.
    Because of this, a reinstalled Flexbbuilder after
    deinstalling the previous version. Started with a new workspace,
    but without succes.
    The funny thing is that on my (smaller) laptop i dont have
    any problem with the error message. It is exactly the same
    installation project, and both run under Window XP and JDK1.5
    Does anyone has a clue

    how do i make this automatic so that newly downloaded songs just appear in the other users accounts?
    You don't.
    Each user has their own iTunes library file which tracks their own iTunes.

  • Compilation error for a .jsp file

    I am working with JSP on WebLogic. I have a file called login.jsp, which takes values thru a form and uses a bean to set and get those values. I am getting the following error, can someone help me to figure out why i am getting this error.
    Compilation of 'D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__login.java' failed:
    D:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp\jsp_servlet\__login.java:87: cannot resolve symbol
    probably occurred due to an error in /login.jsp line 7:
    <jsp:useBean id="logBean" scope="request" class="LoginBean" />

    Hey
    Check out the classpath for the application. The server is not able to find the class for that Bean. Also, try using a package name in that Bean Class. It has been a disadvantage with the JSP that it cannot detect the classes in the default package.
    Good luck

  • Compiler error - bad command or file name

    I have downloaded JDK 1.4 beta from this site and have
    ammended the path commands in my Autoexec file. I use
    the DOS edit to type my programs and save the files with
    a .java extension. When I type javac Convertion.java for
    example all I get is Bad command or file name.
    Any assistance will be appreciated.

    either you haven't rebooted your machine or you have set the PATH correctly - first reboot, then double check autoexec.bat

Maybe you are looking for

  • Trading Partner Agreement Not found error in EDI EDIFACT Scenario

    Hello all, I am getting the following error in the trace file in the EDI EDIFACT over Generic Exchange Scenario,i have verified the agreement effective to date,i also have checked the enq_orders.properties & enq_ordrsp.properties on both the servers

  • Folders are not visible in BEx Portfolio tab of Save As popup window

    Hi All, when I try to save a report in BEx Web Analyzer by open Save As popup window, I can't see any folders in neither of Favorites, BEx Portfolio nor My Portfolio tabs, even though I've created some directories in "/documents/Public Documents" for

  • Column number

    Hi! I´m trying automate my Indesign CS5 without create paragraphs, caracter and object styles. I need a script increase/decrease a number columns. Somthings like.. One text frame selected by Selection Tool (NOT type tool) with 1 column and so I apply

  • Mac or PC support?

    Hi, I'm using a MacBook Pro and running windows xp on the internet using half the hardrive. Something seems to have infected the computer as IE pages keep freezing and won't let me close them. A few times when I open outlook express the messages in m

  • Need to download Lightroom CS6 that is NOT creative cloud.

    I need hoping to get a downloadable version of Adobe Lightroom CS6 (that is not creative cloud) to activate with my product code.  My brother helped me purchase adobe lightroom, he is an Adobe employee, last year. I had downloaded Lightroom applicati