Help!! java,rmic,rmiregistry,java,classpath,etc.

My problems lie I think mainly when I try to javac, rmic, start rmiregistry and java in DOS. My directory structure is d:\javas\java\jdk\bin\MyAss1(project name)\Classes\
                         - Client (package name) + .java file
                         - Interface (package name) + 2 .java files
                         - Server (package) + 3 .java files
I have set the classpath and unset the classpath so many times I am cross-eyed. How do I set the classpath for compiling, then rmic�ing, then start rmiregistry and then again for starting servers? I have read countless documentation about this and am still confused. I think everything is going fine until I start the server � goes for a very long time and then eventually gives me � --- bound to registry�. When I start the client I get a very long error message, something about not being able to find the .stub. I am assuming it can�t find the .stub or am generating a wrong stub. Please tell me how to do this properly. I would be forever grateful as I am spending too much time on this and not enough on my other subjects. Thanks.
Below is my code. I am using Jcreator for my editor and JDK1.4.0 Beta version.
package Interface;
public interface MyClass extends java.rmi.Remote {
public void setMyClass(String val) throws java.rmi.RemoteException;
public String getMyClass() throws java.rmi.RemoteException;
}//MyClass
package Interface;
public interface MyClassFactory extends java.rmi.Remote {
     public MyClassFactory makeMyClass() throws java.rmi.RemoteException;
}//MyClassFactory
import Interface.*;
import java.io.Serializable;
// implementation for MyClassFactory
public class MyClassFactoryServant extends UnicastRemoteObject implements MyClassFactory {
     public MyClassFactoryServant() throws RemoteException {
          //no code needed : will call parent constructor automatically
     }//default constructor
     public MyClassFactory makeMyClass(){
          try {
               return( (MyClassFactory) new MyClassFactoryServant());
          }//try
          catch (Exception e) {
               System.out.println(e);
               return(null);
          }//catch
     }//makeMyClass
}//MyClassFactoryServant
package Client;
import java.rmi.*;
import Interface.*;
public class MyClassRMIClient {
private static String message = "";
private static String name = "rmi://localhost/MyClassFactory";
public static void main(String args[]) {
          String host="localhost";
          if (args.length >0) {
               host=args[0];
try {
     MyClassFactory sFact = (MyClassFactory) Naming.lookup(name /*"//"+host+"/MyClassFactory"*/);
               MyClass st = (MyClass) sFact.makeMyClass();
               st.setMyClass("Here I am");
message = st.getMyClass();
System.out.println(message);
}//try
catch (Exception e) {
                    System.out.println("GenericClient exception: " +
e.getMessage());
e.printStackTrace();
}//catch Error
}//main
}//GenericClient
package Server;
import java.rmi.*;
import Interface.*;
public class MyClassRMIServer {
     public static void main(String args[]) {
          try {
               MyClassFactoryServant obj = new MyClassFactoryServant();
               // Bind this object instance to the name "MyClassFactory"
               Naming.rebind("rmi://localhost:1099/MyClassFactoryServant", obj);
               System.out.println("MyClassFactoryServant bound in registry");
          } catch (Exception e) {
               System.out.println("MyClassFactoryServant err: " + e.getMessage());
               e.printStackTrace();
          }//catch Errors
     }//main
}//class GenericServer
package Server;
import java.rmi.*;
import java.rmi.server.*;
import Interface.*;
public class MyClassServant extends UnicastRemoteObject implements MyClass {
     // what follows is the implementation of the
     String theString;
     public MyClassServant() throws RemoteException {
          //no code needed : will call parent constructor automatically
     }//default constructor
     public void setMyClass(String val) throws java.rmi.RemoteException {
          theString = val;
     }//setMyClass
     public String getMyClass() throws java.rmi.RemoteException {
          return(theString);
     }//getMyClass
}//MyClassServant

here are some batch files i wrote to achieve all the javac, rmic, etc. i'll start with a couple of folder lists so that you can see where the files end up after the batch files have been executed
the project starts with the following structure
\archives
\classes
\policies
\projects\test\rik\server
----read.me
----cleanProject.bat
----compileClient.bat
----compileServerImplementation.bat
----compileServerInterface.bat
----deployPolicies.bat
----runClient.bat
----startRegistry.bat
----startServer.bat
----testLenClientOfRik.policy
----testRikServerImpl.policy
\source\test\len
----ClientOfRik.java
\source\rik
----Server.java
\source\rik\server
----Impl.java
and ends up with this one
\archives
----classes.jar
\classes\test\len
----ClientOfRik.class
\classes\test\rik
----Server.class
\classes\test\rik\server
----Impl.class
----Impl_Skel.class
----Impl_Stub.class
\policies
----testLenClientOfRik.policy
----testRikServerImpl.policy
\projects
(this remains unchanged)
\source
(this remains unchanged)
this is achieved by executing the following batch files in the following order
rem cleanProject.bat start
@echo off
echo Cleaning project
echo Deleting java archives
del \archives\classes.jar
echo Deleting class files
del \classes\test\rik\Server.class
del \classes\test\rik\server\Impl.class
del \classes\test\rik\server\Impl_Skel.class
del \classes\test\rik\server\Impl_Stub.class
del \classes\test\len\ClientOfRik.class
echo Deleting policy files
del \policies\testRikServerImpl.policy
del \policies\testLenClientOfRik.policy
rem cleanProject.bat end
rem compileServerInterface.bat start
@echo off
echo Compiling server interface
javac -d \classes \source\test\rik\Server.java
echo Maintaining class archive
chdir \archives
jar cvf classes.jar -C \classes \test\rik\Server.class
rem compileServerInterface.bat end
rem compileServerImplementation.bat start
@echo off
echo Compiling server implementation
javac -classpath \archives\classes.jar -d \classes \source\test\rik\server\Impl.java
echo Creating server stub and skeleton classes
rmic -classpath \classes -d \classes test.rik.server.Impl
cd \projects\test\rik\server
rem compileServerImplementation.bat end
rem compileClient.bat start
@echo off
echo Compiling client of rik of len
javac -classpath \archives\classes.jar -d \classes \source\test\len\ClientOfRik.java
rem compileClient.bat end
rem deployPolices.bat start
@echo off
copy testLenClientOfRik.policy \policies
copy testRikServerImpl.policy \policies
rem deployPolices.bat end
rem startRegistry.bat start
@echo off
echo Starting the rmi registry
start rmiregistry
rem startRegistry.bat end
rem startServer.bat start
@echo off
echo Starting the test rik server
start java -classpath \classes -Djava.rmi.server.codebase=file:/d:\classes/ -Djava.rmi.server.hostname=localhost -Djava.security.policy=\policies\testRikServerImpl.policy test.rik.server.Impl
rem startServer.bat end
rem runClient.bat start
@echo off
echo Running the client of rik of len
java -classpath \classes -Djava.security.policy=\policies\testLenClientOfRik.policy test.len.ClientOfRik
rem runClient.bat end
beware 'cos the line breaks (may) have been added by the text window in which i'm typing and you'll have to remove them if you use 'em...
i can send you a zip of the whole shebang, if you like; otherwise just modify the stuff above...
good luck
rik

Similar Messages

  • Rmic and java.rmi troubles

    Hi
    Have been trying to run the rmi calculator-example at http://java.sun.com/developer/onlineTraining/rmi/RMI.html, but keep getting:
    Exception in thread "main" java.lang.InternalError: Unexpected exception while defining class CalculatorImpl
    <<No stacktrace available>>
    Caused by: java.lang.ClassNotFoundException: java.rmi.server.UnicastRemoteObject not found in [file:./, core:/]
    <<No stacktrace available>>
    when i do ">rmic CalculatorImpl"
    Suspected at first that it was a classpath-problem. But using ">rmic -classpath c:\j2sdk1.4.2_05\lib CalculatorImpl" gave the same error.
    Anyone know why I get this error?
    regards

    Sorry, my error, I didn't read your post closely.
    Exception in thread "main" java.lang.InternalError: Unexpected exception while defining class CalculatorImplInternal Error = Thrown to indicate some unexpected internal error has occurred in the Java Virtual Machine.
    VirtualMachineError =Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
    I would have to take a wild guess and that wouldn't be fair to you. Normally I would congradulate you on breaking the JVM but I don't suppose you're ready for that yet.

  • Need help on java 1.3 & java 1.6 together

    Hi,
    Am currently using Windows XP with an application named "SIT" that happened to run only on java1.3. Had installed java1.6 for "Limewire" application. I have then both java1.3 and java1.6 installed. Now, i can't run "SIT" anymore for it only sees java1.6 and doesn't see java1.3.
    Error displayed as:
    C:\usr\axis\axis_PRO>c:\usr\axis\axis_PRO\bin\client
    C:\usr\axis\axis_PRO>java ajt.mim.sit2.SITDesktop c:/usr/axis/axis_PRO/etc/client.properties
    Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
    has value '1.6', but '1.3' is required.
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    Tried modifying the registry key to have the value in 1.3 didn't fix the problem for it failed and followed displaying the two java.dll and Java 2 Runtime Environment error also.
    Error displayed as:
    C:\usr\axis\axis_PRO>c:\usr\axis\axis_PRO\bin\client
    C:\usr\axis\axis_PRO>java ajt.mim.sit2.SITDesktop c:/usr/axis/axis_PRO/etc/clien
    t.properties
    Failed reading value of registry key:
    Software\JavaSoft\Java Runtime Environment\1.3\JavaHome
    Error: could not find java.dll
    Error: could not find Java 2 Runtime Environment.
    Can you please help me?
    Thanks in advance!

    best get a new version of that software that doesn't have such idiotic checks in them...
    If that's impossible create a batchfile to launch the application that sets the JAVA_HOME environment variable to the 1.3 installation before starting it.

  • Help!!! Java Importer

    Hello,
    I tried to use Java Importer, I set ORACLE_HOME/TOOLS/COMMON60/JAVA/importer.jar in CLASSPATH. But when I use "Import Java Class..." in Form Builder, the error message "PDE-UJI001 Failed to create the JVM." comes up.
    What's wrong? Would you please help me?
    Thanks!!!
    Wendy
    null

    Wendy ,
    On metalink.oracle.com you can find a note about this.
    I think what you are missing is to set your PATH to point to jdk1.2.2 .
    from the note :
    1. Download and install the JDK 1.2.2.
    2. Assuming the JDK 1.2.2 is installed in c:\jdk1.2.2 directory and the JRE in
    C:\PROGRA~1\JAVASOFT\JRE\1.2 directory; ORACLE_HOME=C:\Dev6iR2.
    Set the PATH to
    set PATH=%PATH%;c:\jdk1.2.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin\classic
    ( If you are using ias9i then the JDK 1.2.2 comes with the ias installtion ,
    in this case please set the PATH to
    D:\ias9i\Apache\jdk\bin;D:\ias9i\Apache\jdk\jre\bin;D:\ias9i\Apache\jdk\jre\bin\classic;%PATH% )
    3. Set the CLASSPATH to set CLASSPATH=%CLASSPATH%;C:\Dev6iR2\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
    (If you do not set the CLASSPATH correctly you will get the error
    PDE-UJI002 Unable to find the required java importer classes)
    4. Now run the Forms Builder by using the command.
    C:\Dev6iR2\bin\ifbld60.ex

  • How doest jdk docs help as in writing java code?

    hi i wonder how does jdk docs help as in writing java code because if i google a java code the jdk docs always becomes the result of my search but in my experience jdk docs never helps me.
    is there any one know how to use jdk docs? and how to get the code from there.
    im telling about jdk docs from here http://download.oracle.com/javase/1.4.2/docs/api/
    cross posted from http://www.thenewboston.com/forum/viewtopic.php?f=119&t=13778
    Edited by: 871484 on Jul 18, 2011 4:18 PM

    871484 wrote:
    ok can any one give me example how to use jdk docs? for example this code
    Your question still does not make any sense, and you still haven't clarified what you're not understanding.
    However, if you think that just by reading the API docs, with no other training or study, that you will be able to write that code, then you are seriously misunderstanding the purpose of the docs.
    Obviously English is not your native language. You grew up speaking some other language at home and with your friends, and at some point in school or as private study, you started to learn English. You learned about the grammar and the alphabet and pronunciation, sentence structure, word order, etc. Now you have the basics of how the language works, and you know some words. When you want to learn new words to fit into the structure you have learned, you use a dictionary.
    If you didn't study the grammar, sentence structure, etc., and just said, "I want to learn English. I will look at a dicationary," clearly that would not work.
    Right?
    So, since you now understand and agree with the English example, let me state something that I hope is obvious to you by now: The API docs are your dictionary. They are not a substitute for learning the language basics.
    Furthermore, once you know the language basics in English and have your dictionary, you still won't know how to write a resume (which you may know as a CV). You will look at examples and perhaps take a course on resume (CV) writing. Just reading a dictionary won't help you write a resume(CV). Similarly, if you know some Java basics, you can't learn how to write a Swing app just by reading the Javadocs. You'll look at tutorials and examples. Then, once you know the basic structure of a Swing app, you'll look to the javadocs for more details about more kinds of GUI classes--different buttons and windows and panes and panels and layout managers, etc.

  • Help with error  "main" java.lang.NoClassDefFoundError:

    I am pretty new to Java and I just install the JDK1.4.2 03
    I am getting an error when I run the class file TestChart.class with the
    java.exe:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    I have several class files in the directory d:\personal\java-ChartGen
    Chart.class
    ChartColourScheme.class
    ChartPanel.class
    ColorPanel.class
    TestChart.class
    TestIt.class
    All these files are for the program.
    Can some one help me why is this happening?? Is there something I can do
    that I am missing???
    I tried using the -CLASSPATH to direct it to the same directory but still
    with the same error.
    Please help me. Thank you

    I use the command line as follows:
    c:\j2sdk1.4.2_03\bin\java d:\personal\java-ChartGen\TestChart.class
    The full error message is as follows:
    Exception in thread "main" java.lang.NoClassDefFoundError:
    d:\personal\java-ChartGen\TestChart/class
    I thought it may be the CLASSPATH, but all my class files are located in the
    same folder and I used the switch -classpath but the same error comes up.

  • Need help with long term Java problems

    I've been having problems with Java on my computer for about a year now, and I'm hoping that someone here can help me out.
    Java used to work fine on the computer when I first got it (a Dell laptop) and I hadn't installed anything myself. But then one day it stopped loading Java applets, and hasn't worked since. By this, I mean that I get the little colorful symbol in a box when I try to play Yahoo games, use the http://www.jigzone.com site, go to chat rooms, etc. Java menus on websites like http://www.hartattack.tv used to work still, but lately they've been giving me that symbol too.
    I've tried downloading a newer version of Java, but nothing I do seems to work, and I don't know of anything I did to trigger it not working. I'm hoping there's a simple solution to this, and I'm just dumb.
    Thanks.

    This might be way off, but it's something that's tripped me up in the past:
    If you are using Sun's Java plugin, the first time you go to a site that has a particular Java applet, you may be asked to approve/reject a security request.
    If you have clicked on any other windows while the request is first being loaded (which can take some time, because this is swing based), then the security dialog box does not pop to the top of the window stack, and doesn't add an entry into the task bar.
    It appears that Java just doesn't work, but it's actually waiting for you to click "Yes". You can check this by hitting alt-tab and seeing if the Java coffee cup icon is one of the options.
    - K

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Help needed to solve "java.io.NotSerializableException: java.util.Vector$1"

    hi to all,
    i am using a session less bean A to querry a Entity Bean B , which inturns calls another EntityBean C ,
    finally a ' find' method is invoked on the EntityBean C, In this a vector is created which holds 3 different vectors at different indexes, now the problem i am facing is that when Enity Bean B is returning the final vector to the A , it's firing out a errors that :-
    TRANSACTION COULD NOT BE COMPLETED: RemoteException occurred in server thread;
    ested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.io.NotSerializableException: java.util.Vector$1
    <<no stack trace available>>
    ur any help would be highly appricated to solve out this prob.
    If i try to iterate through this vector it's gives IOR:0232003x343242344asdsd................................................blabla....................
    thanxs in adavance
    Deepak

    Hi I think you are using the method elements() in a remote method.
    This method can't be Serializable!! Because it returns an Interface. Interfaces are never Serializable.
    Regards,
    Peter

  • Need help in my assignment, Java programing?

    Need help in my assignment, Java programing?
    It is said that there is only one natural number n such that n-1 is a square and
    n + 1 is a cube, that is, n - 1 = x2 and n + 1 = y3 for some natural numbers x and y. Please implement a program in Java.
    plz help!!
    and this is my code
    but I don't no how to finsh it with the right condition!
    plz heelp!!
    and I don't know if it right or wrong!
    PLZ help me!!
    import javax.swing.JOptionPane;
    public class eiman {
    public static void main( String [] args){
    String a,b;
    double n,x,y,z;
    boolean q= true;
    boolean w= false;
    a=JOptionPane.showInputDialog("Please enter a number for n");
    n=Double.parseDouble(a);
    System.out.println(n);
    x=Math.sqrt(n-1);
    y=Math.cbrt(n+1);
    }

    OK I'll bite.
    I assume that this is some kind of assignment.
    What is the program supposed to do?
    1. Figure out the value of N
    2. Given an N determine if it is the correct value
    I would expect #1, but then again this seem to be a strange programming assignment to me.
    // additions followI see by the simulpostings that it is indeed #1.
    So I will give the tried and true advice at the risk of copyright infringement.
    get out a paper and pencil and think about how you would figure this out by hand.
    The structure of a program will emerge from the mists.
    Now that I think about it that advice must be in public domain by now.
    Edited by: johndjr on Oct 14, 2008 3:31 PM
    added additional info

  • Help with StuckThread in java.lang.String.equals(String.java:619)

    I periodically get a stuck Execute thread on my Weblogic 8.15 server
    during a call to a Stateless Session Bean. When I do thread dumps, the
    thread is always stuck in the same place (in
    java.lang.String.equals(String.java:619) or in the call immediately above it
    java.util.LinkedList.indexOf(LinkedList.java:397)). Even though the thread
    dump indicates that the thread is in a runnable state, if I do multiple
    thread dumps over a period of time, the stack trace always indicates that
    the thread is in the same place. The thread remains stuck until Weblogic is
    restarted. Other client applictions can make session bean calls, but each
    stuck thread seems to still take up lots of CPU time. I have let the stuck
    threads run overnight, and the stack trace from the thread dump always shows
    them executing the same String/LinkedList code. In each case, our code is
    trying to iterate over a collection
    Does anybody know what could cause this problem, and how to fix it? I get
    StuckThreadMaxTime errors in the log:
    ####<Dec 4, 2005 10:47:25 AM EST> <Error> <WebLogicServer> <nybill>
    <myserver> <weblogic.health.CoreHealthMonitor> <<WLS Kernel>> <>
    <BEA-000337> <ExecuteThread: '4' for queue: 'weblogic.kernel.Default' has
    been busy for "1,263" seconds working on the request
    "ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl", which
    is more than the configured time (StuckThreadMaxTime) of "1,200" seconds.>
    Here are some stack traces from different thread dumps (I have the full
    thread dumps if necessary):
    "ExecuteThread: '10' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x7720eb98 nid=0xd68 runnable [571f000..571fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getDailyCallSummary(XMLBillCr
    eation.java:1992)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getGraphs(XMLBillCreation.jav
    a:1931)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2618)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImpl.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '22' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x772538d0 nid=0xe24 runnable [497f000..4fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostExpensiveOrLongestCall
    s(XMLBillCreation.java:1892)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1798)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1751)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOIm.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    "ExecuteThread: '21' for queue: 'weblogic.kernel.Default'" daemon prio=5
    tid=0x76afb060 nid=0x498 runnable [48af000..48fdb0]
    at java.lang.String.equals(String.java:619)
    at java.util.LinkedList.indexOf(LinkedList.java:398)
    at java.util.LinkedList.contains(LinkedList.java:176)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getMostFrequentlyCalledNumber
    sOrCitiesReport(XMLBillCreation.java:1839)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReport(XMLBillCreati
    on.java:1772)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getTopTenReports(XMLBillCreat
    ion.java:1743)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.getLocations(XMLBillCreation.
    java:2612)
    at
    ncss.billing.broadviewBill.xml.XMLBillCreation.createXMLBill(XMLBillCreation
    .java:236)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSessionEJB.getBillAsXml(BillAdmi
    nSessionEJB.java:341)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl.getBillAsX
    ml(BillAdminSession_uli3xb_EOImp.java:100)
    at
    ncss.billing.ejb.billAdmin.session.BillAdminSession_uli3xb_EOImpl_WLSkel.inv
    oke(Unknown Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
    t.java:363)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
    0)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    The code in LinkedList that it seems to be executing is the following:
    Line#
    397 for (Entry e = header.next; e != header; e = e.next) {
    398 if (o.equals(e.element))
    399 return index;
    400 index++;
    401 }
    I am running Weblogic 8.15 on Windows 2000.
    Thanks for any help,
    - Don

    njb7ty wrote:
    I suggest dropping that example program and concentrating on reading a book on Java such as 'Head First in Java'. Otherwise, you will spend a lot of time trying to get something to work and gain little value from it.Likewise... Jumping into reflections before you can [read a stack-trace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/] is like signing up a toddler for the New York Marathon... it's probably simply beyond your skill level... so step back... go read a book, do some tutorials, get your head around just the process of the designing, writing, compiling, running, and debugging java programs... and what the different diagnostics mean... Then, equipped with your nose-clip and your trusty stone ;-) you contemplate leaping into the deep end ;-)
    Cheers. Keith.

  • Help with calling a java application from inside another one

    Hello!
    I am having this problem which is getting on my nerves and dont know how to solve..
    I want to call from my java application, another java application. So i use the exec command. Then i want to read the output of this execution from my own application, (the "parent" process).
    But it doesn work properly. Something seems to happen and i dont get the whole output.
    The java program i want to call is created for running an application created with Matlab java builder.
    This program works when called from cmd, but seems not to work when called from inside a java application.
    The code of my java application is:
    Runtime rt = Runtime.getRuntime();
    Process child;
    // The java class getmagic is a special kind of java file that uses classes that work in matlab. It uses a component (.jar) file that is created from matlab java builder. thats why it wants the -classpath and the rest options.
    //I hope you wont get messed up in here.
    String[] callAndArgs = {"java","-classpath",".;C:\\Program Files\\MATLAB\\R2006b\\toolbox\\javabuilder\\jar\\javabuilder.jar;..\\MagicDemoComp\\magicsquare\\distrib\\magicsquare.jar -Djava.library.path=C:\\Program Files\\MATLAB\\R2006b\\bin\\win32;","getmagic","4"};
    try{
    child = rt.exec(callAndArgs);
    InputStream is = child.getInputStream();
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line;
    while ((line = br.readLine()) != null)
    System.out.println(line);
    is.close();
    System.out.println(child.waitFor());
    System.out.println("Finished");
    }catch(IOException e) {
    System.err.println("IOException starting process!");
    }catch(InterruptedException e) {
    System.err.println("InterruptedException starting process!");
    The java program (getmagic) thats uses matlab gives the following output (after some time) when called in cmd with argument 4
    Magic square of order 4
    16 2 3 13
    5 11 10 8
    9 7 6 12
    4 14 15 1
    My program shown above only prints:
    Magic square of order 4
    1
    Finished.
    Do i do something wrong? How can i get the rest of the output???
    Thank you very much in advance,
    Stacey
    PS: I am sorry for the length of my post.

    Hello CaptainMorgan08, thanx for the instant reply.
    I tried, but no, i cant.
    Because i cannot include this java aplication that uses matlab into my application, cause 1) it needs special arguments in the compiler and during execution so it can be run and 2) it uses classes that java doesnt have. only the java-like matlab code.
    For example it uses:
    import com.mathworks.toolbox.javabuilder.*;
    import magicsquare.*; //the component which is made from matlab java builder.
    So i cannot compile it with my application!
    If you know of a way, please let me know!
    I know i might be missing something.. something that is obvious to you.. but i ve been working days=nights hardly no sleep..so you can excuse me if i say something foolish..
    Message was edited by:
    Stacey_Gr

  • Please help me with these java puzzle ?

    Dear all,
    My friend send me typical java puzzle about java.util.ArrayList
    which is getting messy. Please help me out. It's not a homework.
    Please help me with these java puzzle ?
    Dear all,
    My friend send me typical java puzzle about java.util.ArrayList
    which is getting messy. Please help me out. It's not a homework.
    import java.util.*;
    public class MyInt ______ ________ {
    public static void main(String[] args) {
    ArrayList<MyInt> list = new ArrayList<MyInt>();
    list.add(new MyInt(2));
    list.add(new MyInt(1));
    Collections.sort(list);
    System.out.println(list);
    private int i;
    public MyInt(int i) { this.i = i; }
    public String toString() { return Integer.toString(i); }
    ________ int ___________ {
    MyInt i2 = (MyInt)o;
    return ________;
    }Hints , fill the underlines with below :
    implements
    extends
    Sortable
    Object
    Comparable
    protected
    public
    i = i2.i
    i
    i2.i=i
    compare(MyInt o, MyInt i2)
    compare(Object o, Object i2)
    sort(Object o) sort(MyInt o)
    compareTo(MyInt o)
    compareTo(Object o)

    Dear all,
    My friend send me typical java puzzle aboutNotwithstanding your pathetic protestations typicial
    of all your posts this is NOT a typical java "puzzle"
    but is indeed a typical homework puzzle.
    And it's damn easy if you spent 30 minutes with a
    tutorial.
    DO YOUR OWN HOMEWORK!
    Hey i did it.
    import java.util.*;
    public class MyInt implements Comparable {
    public static void main(String[] args) {
    ArrayList<MyInt> list = new ArrayList<MyInt>();
    list.add(new MyInt(2));
    list.add(new MyInt(1));
    Collections.sort(list);
    System.out.println(list);
    private int i;
    public MyInt(int i) { this.i = i; }
    public String toString() { return Integer.toString(i); }
    public int compareTo(Object o){
    MyInt i2 = (MyInt)o;
    return i;
    }E:\>javac MyInt.java
    Note: MyInt.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    E:\>java MyInt
    [1, 2]

  • Exception in thread "main" java.lang.NoClassDefFoundError: ?classpath

    I try to run a java program at the JRE. I type the following at the DOS prompt.
    C:\j>java -classpath .\ldap.jar;. findAppList
    I have put the ldap.jar and the findAppList.class in the current directory. Also I am sure that the ldap.jar is the only jar file required. So the setting for the classpath variable should be correct. However I still get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: ?classpath
    Anyone can tell me what is wrong? Thanks.

    The command-line parameter is "-cp", not "-classpath". Type java -? for list of parameters.

  • Help needed with JNI -  java.lang.UnsatisfiedLinkError

    I need some help with JNI. I am running on Sun Solaris 7 using their CC compiler. I wrote a simple java program that calls a native method to get a pid. Everything work until I use cout or cerr. Can anyone help? Below is what I am working with.
    Note: The application works. The problem is when the C++ code tries to display text output.
    My error log is as follows:
    java Pid
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/dew/test/libPid.so: ld.so.1: /usr/j2se/bin/../bin/sparc/native_threads/java: fatal: relocation error: file /home/dew/test/libPid.so: symbol __1cDstdEcerr_: referenced symbol not found
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at Pid.<clinit>(Pid.java:5)
    Pid.java
    ========
    * Pid: Obtains the pid from the jvm.
    class Pid {
    static { System.loadLibrary("Pid"); }
    public native int getPid();
    public static void main(String args[])
    System.out.println("Before construction of Pid");
    Pid z = new Pid();
    System.out.println(z.getPid());
    z = null;
    Pid.cpp
    =========
    * Native method that obtains and returns the processid.
    #include "Pid.h"
    #include "unistd.h"
    #include <iostream.h>
    JNIEXPORT jint JNICALL Java_Pid_getPid(JNIEnv *env, jobject obj) {
    /* cout << "Getting pid\n"; */
    cerr << "Getting pid\n";
    /* printf("Getting pid\n"); */
    return getpid();

    I forgot to include my build information.
    JAVA_HOME = /usr/j2se/
    LD_LIBRARY_PATH = ./:/opt/readline/lib:/opt/termcap/lib:/usr/bxpro/xcessory/lib:/${JAVA_HOME}/lib:/usr/RogueWave/workspaces/SOLARIS7/SUNPRO50/0d/lib:/usr/RogueWave/workspaces/SOLARIS7/SUNPRO50/3d/lib:/usr/sybase/lib
    javac Pid.java
    javah Pid
    CC -G -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris Pid.cpp -o libPid.so
    Thanks again,
    Don

Maybe you are looking for

  • "The HP Deskjet 3050 J610 series was not found." Can't scan with wireless printer to desktop. Help

    Our new wireless printer will not scan.  I have tried to scan from the computer and get the below error message and then I have activated the scan from printer and when I push the scan button on the printer, I get the same error message.  Thanks! Pro

  • Datefield not working in Coldfusion 11

    I have just installed CF11 on our dev and QA servers and am getting a strange issue on only one of them. On our QA server, instead of the calandar control showing up when <cfinput type="datefield"> is used, I get the text "Date Picker". I can't find

  • How do I delete extra downloads?

    Recently I've downloaded the iTunes Store HD episodes special offer, you know the Office, 30 Rocks... I've got one more extra SD episode for each show, this is helpful to others but not me. How do I get rid of those without downloading the whole SD e

  • Mterial Number mandatory for Purcahse Resuisition except for Nonstockable I

    Hi All,   The requirement is like material number should be mandatory except for Non Stockable items (likePen, Stationery Items) while creating a Purchase Requisition. I know in SPRO Settings, "Define Screen Layout at Documnet Level" in Purchase Requ

  • Changing Sort Order - Help

    So far iTunes seems to work ok, but I cant seem to get it to sort the music the way I want.... I want to be able to sort by the Artist column first, then by the Name column. I have tried about everything I can think of but everytime I tell it to sort