Cannot find class java/lang/Thread

I'm getting this error trying to compile a program that I'm writing in java. Its a very simple program just to get me back to basics. Any ideas as to how I can fix this problem??

Extracted from Sun's website,
* Error Message: "Exception in thread NULL" or
"Unable to initialize threads: cannot find class java/lang/Thread"
If you are getting one of these fatal error messages when running java,
javac, or appetviewer, you should check your CLASSPATH environment variable.
It may list "c:\java" or the "classes" directory from an older release. You can either unset the CLASSPATH variable, or set it to
include only the latest version of the Java platform class library. For example:
C:\> set CLASSPATH=.;C:\jdk1.1.8\lib\classes.zip
This will make sure that you are using the correct classes for this release.
-- Sudha

Similar Messages

  • Cannot find class java/io/FilterInputStream

    Anyone run across a preverifying error for the java.io.DataInputStream like this. Doing basic things like close() and available() lead to these errors during the build though compilation is fine.
    Have tried this using jdk 1.4.0 and 1.3.1.
    thanks

    I'm using Forte CE with JSDK 1.4.0 as an external compiler.
    The problem appears to be a confusion as to which library to use. I expected the MIDP version of FilterStream to be used by the compiler but it seems to be using the J2SE libs.
    I can get messages across using the InputStream class so it's not a showstopper but I'll need to track down where my settings are off.
    thanks

  • Deprecated methods in java.lang.thread

    Hi,
    I am getting the followng warning message when i run my code:
    The method void stop() in class java.lang.Thread has been deprecated,
    can anyone suggest an alternative method to the deprectaed stop method, i can't seem to find one.
    Thanks in advance

    The stop() method in thread has been deprecated because it is inherently dangerous. The suggested action now is to simply modify a variable inside the thread to tell it to stop running, and the thread should periodically check the variable to see when it should stop. There's good description of why stop() and a few other methods in Thread have been deprecated at..
    http://java.sun.com/j2se/1.4/docs/guide/misc/threadPrimitiveDeprecation.html

  • Java teststand - Error 1500 Cannot find class

    Hi everyone,
    I am using TestStand 2010 and Java 1.7.
    I try to add a java class in the Computer example folder, and call the method.
    The java class is simply like below, because I just want to try calling my own java class.
    I have set the Class Path in Start JVM to the directory where the Computer example (which is also the directory where I put my java class) are located.
    TestStand can call the Computer's methods, but not mine (got error Error 1500 Cannot find class). I put my my java method calling among the defaults Computer example calls.
    Furthermore I have read similiar threads but still I cannot solve the error.
    Where is the part I miss, actually? Please share some insights.
    Note: I even try to leave the Class Path empty, but TestStand still can call the Computer's methods. Why?
    public class TestJava {
    public static void main(String[] args) {
    public String returnString(boolean a){
    return "success";
    Solved!
    Go to Solution.

    In order to load a class that is inside a package you have to use the package notation (or modify the example in order to use it). The path to the class is passed directly to the JVM in order to load the class, but really what is needed is the package from the class path including the full path to the class. 
    That means you have to do the following:
    1. Set the class path to the base directory where you built all your classes, if you have the following structure:
    MyFile.java
    builds
    MyPackage
    MyFile.class
    You have to set the classpath to the builds directory
    2. When you configure your steps, you have to set the path to the class in your Java steps to MyPackage/MyFile.class (note separator is a slash, not the usual Windows backslash, so the browse button doesn't quite help with that). 
     Another important thing is that when you set the classpath you are deleting the normal class path in Java, if you are using Java classes from the default libraries you might have to add <jre directory>\lib\rt.jar

  • Cannot convert ÿØÿà of type class java.lang.String to class BFileDomain.

    Hi All,
    I am using Jdeveloper 11.1.2.3.0.
    I have a scenario of making an ADF page where I have a IMAGE field to show on the page. So,I have a table called "PRODUCT" with fields called photo with BFILE type. Now when I the data i have inserted using the DML command and i can see the path at the backend.
    However,when i am runnig my ADF page in the Filed called "PHOTO" I can only see a junk character stating 'yoyo'.
    When I click on it, it says ERROR "Cannot convert ÿØÿà of type class java.lang.String to class oracle.jbo.domain.BFileDomain".
    Your help will be appreciated ASAP.
    Regards,
    Shahnawaz

    Hi,
    did you show the id-value in the user interface as a input-component, and did the input-component include a converter?
    If yes, show the id as output-text and remove any existing converter-components.
    Best Regards

  • Cannot convert type class java.lang.String to class oracle.jbo.domain.Clob

    Cannot convert type class java.lang.String to class oracle.jbo.domain.ClobDomain.
    Using ADF Business Components I have a JSFF page fragment with an ADF form based on a table with has a column of type CLOB. The data is retrieved from the database and displayed correctly but when any field is changed and submitted the above error occurs. I have just used the drag and drop technique to create the ADF form with a submit button, am I missing a step?
    I am using the production release of Jdeveloper11G

    Reproduced and filed bug# 7487124
    The workaround is to add a custom converter class to your ViewController project like this
    package oow2008.view;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.convert.Converter;
    import javax.faces.convert.ConverterException;
    import oracle.jbo.domain.ClobDomain;
    import oracle.jbo.domain.DataCreationException;
    public class ClobConverter implements Converter {
         public Object getAsObject(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   String string) {
           try {
             return string != null ? new ClobDomain(string) : null;
           } catch (DataCreationException dce) {
             dce.setAppendCodes(false);
             FacesMessage fm =
               new FacesMessage(FacesMessage.SEVERITY_ERROR,
                                "Invalid Clob Value",
                                dce.getMessage());
             throw new ConverterException(fm);
         public String getAsString(FacesContext facesContext,
                                   UIComponent uIComponent,
                                   Object object) {
           return object != null ?
                  object.toString() :
                  null;
    }then to register the converter in faces-config.xml like this
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
      <application>
        <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
      </application>
      <converter>
        <converter-id>clobConverter</converter-id>
        <converter-class>oow2008.view.ClobConverter</converter-class>
      </converter>
    </faces-config>then reference this converter in the field for the ClobDomain value like this
              <af:inputText value="#{bindings.Description.inputValue}"
                            label="#{bindings.Description.hints.label}"
                            required="#{bindings.Description.hints.mandatory}"
                            columns="40"
                            maximumLength="#{bindings.Description.hints.precision}"
                            shortDesc="#{bindings.Description.hints.tooltip}"
                            wrap="soft" rows="10">
                <f:validator binding="#{bindings.Description.validator}"/>
                <f:converter converterId="clobConverter"/>
              </af:inputText>

  • Class java.lang.NullPointerException thrown on deploying Support Packages

    Hello Everybody,
    My version of <b>Enterprise Portal is 6.0</b> .Earlier the <b>Support Pack Stack level was SP</b>S09 After deploying <b>Support
    Pack Stack level SPS16</b> for <b>J2ee Engine</b>,<b>Portal Platform</b> and <b>KMC</b> and restarting the entire server,following error message is being displayed in Portal:
    <b>System Error :
    An exception occurred during the program execution. Below you will find technical information pertaining to this exception that you might want to forward to your system administrator.
    Exception Class </b> <b>class java.lang.NullPointerException</b>
    The Details of which are as follows:
    <b>
    java.lang.NullPointerException
            at com.sapportals.wcm.repository.service.appproperties.PropertiesManager.getProperty(PropertiesManager.java:144)
            at com.sapportals.wcm.repository.service.layout.cm.LayoutService$ApplicationPropertyProxy.getPropertyValue(LayoutService.java:249)
            at com.sapportals.wcm.repository.service.layout.cm.LayoutService.readProfile(LayoutService.java:409)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.readFolderSettings(CustomizingController.java:659)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.initParamters(CustomizingController.java:298)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.(CustomizingController.java:240)
            at com.sapportals.wcm.repository.service.layout.cm.customizing.CustomizingController.getInstance(CustomizingController.java:122)
            at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sapportals.wcm.repository.service.layout.customizing.CustomizingControllerFactory.createCustomizingController(CustomizingControllerFactory.java:141)
            at com.sapportals.wcm.repository.service.layout.customizing.CustomizingControllerFactory.getCustomizingController(CustomizingControllerFactory.java:30)
            at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLC(LayoutControllerFactory.java:198)
            at com.sapportals.wcm.rendering.layout.LayoutControllerFactory.getLayoutController(LayoutControllerFactory.java:164)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.createLayoutController(WdfProxy.java:1995)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.prepareNestedControls(WdfProxy.java:1364)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.createNestedControls(WdfProxy.java:1234)
            at com.sapportals.wdf.stack.Control.create(Control.java:291)
            at com.sapportals.wcm.rendering.control.cm.WdfProxy.create(WdfProxy.java:1307)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:464)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
            at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
            at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:268)
            at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:659)
            at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.htmlb.Container.preRender(Container.java:120)
            at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:414)
            at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
            at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:130)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:73)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:545)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
            </b>
    Due to this error the screen looks distorted and none of the link opens, Does that error mean that Support Packages have not been Properly Applied ,bcoz iam not able to do anything after that.None of the link opens and window looks distorted.
    can Someody plz revert back to resolving this issue.Kindly plz revert back how to resolve this exception at earliest.
    Thanks,
    Saumya

    Hi somya
    is ur j2ee server is running?
    check with following
    http://host:j2eeport
    or login into j2ee visual administrator,
    are u able to login into it?
    is server is connected?
    regards,
    kaushal

  • Cannot find class: Exception??

    Hi
    The compiler claims it cannot find class FileNotFoundException or any other exception in my Main. Any packages I import has no problem. My structure:
    java \ myMain \ Main.java
    java \ com \ myName \ packages //no, the space is just there as visual help:)
    Use javac -classpath java\ @compile.file
    ...where compile.file is a txt file giving the paths and filenames to all files I include.
    This is first time I use the -classpath parameter, but I believed java.lang always was included. What Am I doing wrong.
    regards
    JT

    You should review the tool documentation for the javac command and its use of classpath.
    Your problem appears to be due to the way you defined classpath, "-classpath java\". While you don't provide enough information to conclusively say what it should be, I'm guessing it should also include java\myMain\ - assuming that you're issuing the javac command from the parent of the \java\ directory, as your command example indicates.
    Here is a clip about its use of the classpath.
    "When compiling a source file, the compiler often needs information about a type whose definition did not appear in the source files given on the command line. The compiler needs type information for every class or interface used, extended, or implemented in the source file. This includes classes and interfaces not explicitly mentioned in the source file but which provide information through inheritance.
    For example, when you subclass java.applet.Applet, you are also using Applet's ancestor classes: java.awt.Panel, java.awt.Container, java.awt.Component, and java.lang.Object.
    When the compiler needs type information, it looks for a source file or class file which defines the type. The compiler searches for class files first in the bootstrap and extension classes, then in the user class path (which by default is the current directory). The user class path is defined by setting the CLASSPATH environment variable or by using the -classpath command line option. (For details, see Setting the Class Path).
    If you set the -sourcepath option, the compiler searches the indicated path for source files; otherwise the compiler searches the user class path for both class files and source files."

  • Java.lang.thread exception while using Xalan 2.0 in WLS 6.0

    Hi, I'm trying to use Xalan 2.0 in a servlet hosted by WLS. Ive
    modified Xalan's SimpleTransform sample to be a servlet. I
    create a Transformer with the .xsl, then call tranform() to
    print the tranformed xml to the response stream. The xml is
    tranformed correctly, but it throws a java.lang.thread
    exception. The standalone Xalan sample doesn't do this. Anyone
    else seen this problem?
    Here's the code of interestest, I apologize if its not formatted very well:
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException
         PrintWriter out = res.getWriter();
         res.setContentType("text/html");
         out.println("<html><head><title>XalanTest<title></head>");
         out.println("<body><h1>XalanTest</h1>");
         try{
         TransformerFactory tFactory = TransformerFactory.newInstance();
         StreamSource ss = new StreamSource("file:\\\\My-path\\birds.xsl");
         Transformer transformer = tFactory.newTransformer(ss);
         StreamResult SR = new StreamResult(out);
         transformer.transform(new StreamSource("file:\\\\My-path\\birds.xml"), SR );
         catch(Exception e){
         out.println("<p>" + e.toString() + "</p>");
         e.printStackTrace(out);
         out.println("<p>Exception</p>");
              out.println("</body></html>");

    It also looks like the workaround suggested does not work.
    I put the following code as workaround:
         response.setContentType("text/html");
         response.setHeader ("Pragma", "no-cache");
         Transformer transformer;
         TransformerFactory factory = TransformerFactory.newInstance();
         String stylesheet = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.xsl";
         String sourceId = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.xml";
         String outputFile = "config\\closs\\applications\\webroot\\jsp\\example\\Load2.html";
         String outputDirectFile = "config\\closs\\applications\\webroot\\jsp\\example\\Load2_Direct.html";
         try
              PrintWriter fout = new PrintWriter (new FileOutputStream (outputFile));
              OutputStream os = new ByteArrayOutputStream();
              transformer = factory.newTransformer(new StreamSource(stylesheet));
              transformer.transform(new StreamSource(sourceId), new StreamResult(outputDirectFile));
              transformer.transform(new StreamSource(sourceId), new StreamResult(os));
              os.flush ();
              os.close();
              out.print(os.toString());
              fout.print (os.toString ());
              fout.flush ();
              fout.close ();
         catch (Exception e)
              // Error Handler
         e.printStackTrace();
    The two .html files produced look exactly the same, which is good.
    However, the screen output to my html browser (Internet Explorer 5.50 sp1) produces
    different output.
    That is strange, but that shows that this bug does not have a known workaround
    "Rabinowitz" <[email protected]> wrote:
    >
    I have the same problem with java sun xml parser (jaxp 1-1)
    It is interesting to know that all this perfectly works under weblogic
    5.1, so
    I cannot migrate my application to 6.0
    So, the functionality of weblogic 6.0 degraded since 5.1.
    I cannot buy the explanation that that is not bea's fault, because it
    perfectly
    worked with the same version of xml parser.
    Now, their customer support is saying they have not decided whether this
    is a
    bug or a feature.
    Interesting to know that degradation of functionality could be a feature!
    It is now June 21, 3 months since this bug was reported, sp2 was shipped
    since
    that time, and this bug is still there.
    "Chuck H. Zhao" <[email protected]> wrote:
    I am having the exact same problem you are having. If we analyze the
    stack
    trace:
    javax.xml.transform.TransformerException: java.lang.Thread
    at
    org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1212)
    at
    org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
    at java.lang.Thread.run(Thread.java:484)
    java.lang.ClassCastException: java.lang.Thread
    at
    weblogic.servlet.internal.ResponseHeaders.setDateHeader(ResponseHeaders.java
    :273)
    at
    weblogic.servlet.internal.ServletResponseImpl.setDateHeader(ServletResponseI
    mpl.java:449)
    at
    weblogic.servlet.internal.ServletResponseImpl.writeHeaders(ServletResponseIm
    pl.java:637)
    at
    weblogic.servlet.internal.ServletOutputStreamImpl.flush(ServletOutputStreamI
    mpl.java:124)
    at
    weblogic.servlet.internal.WLOutputStreamWriter.flush(WLOutputStreamWriter.ja
    va:124)
    at java.io.PrintWriter.flush(PrintWriter.java:120)
    at
    org.apache.xalan.serialize.SerializerToXML.flushWriter(SerializerToXML.java:
    1431)
    at
    org.apache.xalan.serialize.SerializerToXML.endDocument(SerializerToXML.java:
    629)
    at
    org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
    ..java:180)
    at
    org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
    ava:1194)
    at
    org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
    at java.lang.Thread.run(Thread.java:484)
    What happened is: to support incremental output, Xalan-Java performs
    the
    transformation in a second thread while building the source tree inthe
    main
    thread. So Transformer.transform() creates a new thread to run the
    transformer.run() method, which will write to weblogic's internal
    ServletOutputStreamImpl, and in the end calls flush() on it.
    ServletOutputStreamImpl determines that the headers haven't been written
    yet, and the headers need to be written before any servlet output, so
    it
    calls ServletResponseImpl.writeHeaders(), which eventually calls
    ResponseHeaders.setDateHeader(). The last method assumes the thread
    is
    weblogic's internal ExecuteThread and tries to cast the thread as such,
    maybe to get the date from it. But the thread is a plain java.lang.Thread
    created by xalan, thus we get the java.lang.ClassCastException:
    java.lang.Thread
    This suggests a second workaround: call ServletResponse.flushBuffer()
    before any xalan stuff, which will force the headers to be written in
    weblogic's ExecuteThread. The shortcoming of this is that this will
    cause
    the response to be commited, and if the xalan stuff throws exception
    you can
    not forward to another page.
    Another thing is that xalan should not directly call flush() on
    ServletOutputStreamImpl at all. I will report it to xalan and see if
    they
    consider that a bug. If they fix that then we have a third workaround:
    set
    the buffer size of ServletResponse big enough to accomodate everything
    including the xslt outputs, so the ServletOutput does not need to be
    flushed
    during xalan code.
    I do not consider this problem a weblogic bug, since the servlet container
    has to right to expect any thread inside it to be its own. Serlvet2.2
    spec
    says:
    1.2 What is a Servlet Container?
    A Servlet Container may place security restrictions on the environment
    that
    a servlet executes in. In
    a Java 2 Platform Standard Edition 1.2 (J2SE) or Java 2 Platform Enterprise
    Edition 1.2 (J2EE)
    environment, these restrictions should be placed using the permission
    architecture defined by Java 2
    Platform. For example, high end application servers may limit certain
    action, such as the creation of
    a Thread object, to insure that other components of the container are
    not
    negatively impacted.
    Weblogic should explicitly warn the developers that creating threads
    inside
    the servlet container may have adverse effects, the same kind of problem
    we
    are having. (or maybe they already did somewhere in their documentation?)
    On the xalan side, I would suggest them to either give the option to
    switch
    the two threads, or to give the option to buffer the output and write
    it out
    in the main thread, which is exactly what you did in your first workaround.
    Any comments or thoughts on the subject are welcome.
    -- Chuck Zhao
    "MK Parini" <[email protected]> wrote in message
    news:[email protected]...
    I found, what I think to be a bug, and a work-around for it.
    When doing an XSLT Transformation, you must specify a StreamResult
    to which to write the output. I was doing my transformation in
    a
    servlet so I was writing my output to the HttpResponse
    (The variable res is a javax.servlet.http.HttpServletResponse
    object)
    StreamResult htmlTarget = new StreamResult(res.getWriter());
    If I use this, when I perform the transformation using the TRAX
    APIs,
    InputStream xslFile = context.getResourceAsStream(fileName);
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Templates xslTemplates = tFactory.newTemplates(new StreamSource(xslFile));
    transformer = xslTemplates.newTransformer();
    transformer.transform(xmlSource, htmlTarget);
    I receive the ClassCastException from the class
    weblogic.servlet.internal.ResponseHeaders.setDateHeader(ResponseHeaders.java
    :273),
    as seen in my previous posting.
    I discovered, if I write my output to a StringBuffer, and then
    I write
    the StringBuffer to the HttpResponse, I do not get the ClassCastException.
    For example,
    StringWriter myWriter = new StringWriter(2400);
    StreamResult htmlTarget = new StreamResult(myWriter);
    <Same transformation code as above>
    myWriter.close();
    PrintWriter out = res.getWriter();
    out.print(myWriter.toString());
    Is this a bug in the weblogic internal servlet class or am I just
    missing something?
    Also, one concern that I have with the workaround is that it might
    hurt performance.
    Any comments or thoughts on the subject are welcome.

  • URGENT- PLEASE HELP: java.lang.threads and BC4J

    Hi,
    according to my issue "no def found for view" in the same titled thread I'm wondering how you would implement asynchronous calls of methods that use BC4J to update a couple of data.
    To be more precise:
    A requirement of our software is to start an update database job, which can take a couple of minutes/hours, from the web browser. Before it will be executed the logged-in user receives a notification that this batch job has been started.
    I dont't want to use JMS overhead and MD Beans for this simple requirement, therefore I implemented a class that extends java.lang.Thread and put all the update codings within the run method. After having called the start-method of the thread I get a JBO-25022(No XML file found) error when I try to set a new value for an attribute of the row. The row consists of attributes which belong to four entity objects that mus be updated.
    When calling the run method directly, everything works fine.
    My questions:
    * do you know any workaround how to make the xml files
    reachable?
    * how would you implement anschronous calls of long time-
    consuming jobs?
    * is this a bug of BC4J?
    Any help, tip, hint is really appreciated.
    Stefan

    Arno,
    many thanks for your reply:
    Here is an excerpt of the source code of my thread "Aenderungsdienst":
    public class Aenderungsdienst extends java.lang.Thread
    private SviAdministrationModuleImpl mSviModul;
    // Application module that contains view object
    // IKViewImpl
    public Aenderungsdienst(SviAdministrationModuleImpl aSviModul)
    mSviModul = aSviModul;
    public void run()
    ausfuehrenAenderungsdienst(mAenderungsdienstNr); <--error within this methode
    private int ausfuehrenAenderungsdienst(String aAenderungsdienstNr)
    int rAnzahlSaetze = 0;
    try
    IkViewImpl aenderungen = mSviModul.getIkView();
    aenderungen.suchenAenderungssaetze(aAenderungsdienstNr); <-- method within View Object Impl that executes a query with customized where-clauses
    if ((rAnzahlSaetze = aenderungen.getRowCount()) > 0)
    IkViewRowImpl ik = null;
    while (aenderungen.hasNext())
    ik = (IkViewRowImpl) aenderungen.next();
    ik.setBestandsstatus("B"); <-- error occurs here when setting the status of a current row in my rowset to "B"
    mSviModul.getTransaction().postChanges();
    mSviModul.getTransaction().commit();
    catch (Exception e)
    e.printStackTrace();
    mSviModul.getTransaction().rollback();
    //todo: Verarbeitungsprotokoll erstellen
    return rAnzahlSaetze;
    This thread will be called by the application module "sviAdministrationModuleImpl":
    public void ausfuehrenAenderungsdienst(String
    aAenderungsdienstNr)
    Aenderungsdienst aenderungsdienst = new
    Aenderungsdienst(this);
    aenderungsdienst.setAenderungsdienstNr
    (aAenderungsdienstNr);
    aenderungsdienst.start();
    Using the start() method of the thread causes this exception:
    [653] No xml file: /hvbg/svi/model/businessobjects/businessobjects.xml, metaobj = hvbg.svi.model.businessobjects.businessobjects
    [654] Cannot Load parent Package : hvbg.svi.model.businessobjects.businessobjects
    [655] Business Object Browsing may be unavailable
    [656] No xml file: /hvbg/svi/model/businessobjects/IK_Inlandsbankverb.xml, metaobj = hvbg.svi.model.businessobjects.IK_Inlandsbankverb
    09.03.2004 10:27:41 hvbg.common.businessobjects.HvbgEntityImpl setAttributeInternal
    SCHWERWIEGEND: Fehler beim Setzen des Attributs 1 im Entity Objekt: JBO-25002: Definition hvbg.svi.model.businessobjects.IK_Inlandsbankverb vom Typ Entitätszuordnung nicht gefunden.
    09.03.2004 10:27:42 hvbg.svi.model.dienste.Aenderungsdienst ausfuehrenAenderungsdienst
    SCHWERWIEGEND: Beim Ausführen des Aenderungsdienstes 618 trat während der DB-Aktualisierung ein schwerer Fehler auf:
    JBO-25002: Definition hvbg.svi.model.businessobjects.IK_Inlandsbankverb vom Typ Entitätszuordnung nicht gefunden.
    oracle.jbo.NoDefException: JBO-25002: Definition hvbg.svi.model.businessobjects.IK_Inlandsbankverb vom Typ Entitätszuordnung nicht gefunden.
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:328)
         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:268)
         at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:649)
         at oracle.jbo.server.EntityAssociation.findEntityAssociation(EntityAssociation.java:98)
         at oracle.jbo.server.AssociationDefImpl.resolveEntityAssociation(AssociationDefImpl.java:725)
         at oracle.jbo.server.AssociationDefImpl.getEntityAssociation(AssociationDefImpl.java:135)
         at oracle.jbo.server.AssociationDefImpl.hasContainer(AssociationDefImpl.java:546)
         at oracle.jbo.server.AssociationDefImpl.getContainer(AssociationDefImpl.java:468)
         at oracle.jbo.server.EntityImpl.getContainer(EntityImpl.java:1573)
         at oracle.jbo.server.EntityImpl.setValidated(EntityImpl.java:1649)
         at oracle.jbo.server.EntityImpl.setAttributeValueInternal(EntityImpl.java:2081)
         at oracle.jbo.server.EntityImpl.setAttributeValue(EntityImpl.java:1985)
         at oracle.jbo.server.AttributeDefImpl.set(AttributeDefImpl.java:1700)
         at oracle.jbo.server.EntityImpl.setAttributeInternal(EntityImpl.java:946)
         at hvbg.common.businessobjects.HvbgEntityImpl.setAttributeInternal(HvbgEntityImpl.java:56)
         at hvbg.svi.model.businessobjects.IKImpl.setBestandsstatus(IKImpl.java:174)
         at hvbg.svi.model.businessobjects.IKImpl.setAttrInvokeAccessor(IKImpl.java:770)
         at oracle.jbo.server.EntityImpl.setAttribute(EntityImpl.java:859)
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:1108)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:1019)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1047)
         at hvbg.svi.model.dataviews.IkViewRowImpl.setBestandsstatus(IkViewRowImpl.java:264)
         at hvbg.svi.model.dienste.Aenderungsdienst.ausfuehrenAenderungsdienst(Aenderungsdienst.java:337)
         at hvbg.svi.model.dienste.Aenderungsdienst.run(Aenderungsdienst.java:290)
    Using run(), everything works perfectly.
    The view object IKView consists of four entity objects which are linked by associations. There exists an association between the entity objects ik and inlandbankverb. The xml-file for the association object is named "ik_inlandsbankverb.xml". It seems so that this definition could not be found when calling my thread in asynchronous (via start()-method call) mode.
    Is this a bug of JDeveloper?
    Thanks in advance,
    Stefan

  • Non-static version of java.lang.Thread.dumpstack?

    hi,
    it would be useful sometimes to have a graphical debug panel on an application I'm working on which shows the active threads and allows further information to be shown if wanted - the problem is that I can't find an API call to get the current stack dump of an arbitrary thread - does anyone know if this is possbile somehow without a full debug environment?
    java.lang.Thread.dumpstack would be ideal if only it were an instance method..
    thanks,
    asjf

    what's the probelm? you call this in the threads class
    and each thread (object) executes this statement and
    therefore prints its stacktrace ...ok - here is some mocked up (and plain wrong in terms of the tree model's consistency over sequential method calls) code that shows what I'd like to achieveimport java.io.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    import javax.swing.event.*;
    public class JThreadExp extends JPanel {
       JTree tree;
       JTextArea jta;
       public JThreadExp(TreeModel model) {
          super(new GridLayout(1,2,4,4));
          tree = new JTree(model);
          jta = new JTextArea();
          add(tree);
          add(jta);
          tree.addTreeSelectionListener(new TreeSelectionListener() {
             public void valueChanged(TreeSelectionEvent e) {
                PrintStream stderr = System.err;
                String msg=null;
                try {
                   TreePath tp = e.getPath();
                   System.out.println(tp.getLastPathComponent());
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   PrintStream ps = new PrintStream(new BufferedOutputStream(baos, 1024*1024));
                   System.setErr(ps);
                   Thread t = (Thread) tp.getLastPathComponent();
                   try {
                      t.dumpStack();
                   } catch(Throwable ee) {}
                   ps.close();
                   jta.setText(baos.toString()); //newXML.toString());
                } catch(Exception e2) {
                   msg = e2.getMessage();
                System.setErr(stderr);
                if(msg!=null)
                   System.out.println(msg);
       public static void main(String[]arg) throws Exception {
          JFrame frame = new JFrame("JThreadExp");
          JThreadExp jte;
          final ThreadModel tm = new ThreadModel();
          frame.getContentPane().add(jte = new JThreadExp(tm));
          frame.pack();
          frame.setVisible(true);
          final JTree tree = jte.tree;
          new Thread(new Runnable() {
             public void run() {
                try {
                   while(true) {
                      TreeModelEvent tme = new TreeModelEvent(this, new Object [] {tm.getRoot()});
                      for(Iterator i = tm.listeners.iterator(); i.hasNext(); )
                         ((TreeModelListener) i.next()).treeStructureChanged(tme);
                      Thread.sleep(5000);
                      new Thread(new Runnable() {
                         public void run() {
                            try { Thread.sleep(50000); } catch(Exception e) {e.printStackTrace();}
                      } ).start();
                } catch(Exception e) {
                   e.printStackTrace();
          } ).start();
    class ThreadModel implements TreeModel {
       public boolean isLeaf(Object node) { return (node instanceof Thread); }
       public Object getRoot() {
          ThreadGroup uppermost = Thread.currentThread().getThreadGroup();
          while(uppermost.getParent()!=null)
            uppermost = uppermost.getParent();
          return uppermost;
       public Object getChild(Object p, int i) {
          Object result = "<unavailable>";
          if(p instanceof ThreadGroup) {
             ThreadGroup parent = (ThreadGroup) p;
             ThreadGroup[] tg = new ThreadGroup[parent.activeGroupCount()];
             Thread[] t = new Thread[parent.activeCount()];
             parent.enumerate(tg, false);
             parent.enumerate(t, false);
             if(i<tg.length)
                result = tg;
    else if(i<tg.length+t.length)
    result = t[i-tg.length];
    return result;
    public int getChildCount(Object node) {
    int result = 0;
    if(node instanceof ThreadGroup) {
    ThreadGroup parent = (ThreadGroup) node;
    ThreadGroup[] tg = new ThreadGroup[parent.activeGroupCount()];
    Thread[] t = new Thread[parent.activeCount()];
    result += parent.enumerate(tg, false);
    result += parent.enumerate(t, false);
    return result;
    public int getIndexOfChild(Object parent, Object child) {
    for(int i=0; i<getChildCount(parent); i++) {
    if(getChild(parent,i).equals(child))
    return i;
    return -1;
    Set listeners = new HashSet();
    public void addTreeModelListener(TreeModelListener l) {
    listeners.add(l);
    public void removeTreeModelListener(TreeModelListener l) {
    listeners.remove(l);
    public void valueForPathChanged(TreePath path, Object newValue) { // this shouldn't be called - Tree is not editable
    System.out.println("valueForPathChanged");
    } The problem is that I'd like to obtain a reference to a Thread object (which I haven't written the code for) and get a (vaguely accurate if not exact) stack dump from it.
    I'll have a look over JDB in the meantime thanks :)
    thanks,
    asjf

  • Discussion eMail link causing class java.lang.NoClassDefFoundError on reply

    When forwarding an eMail link from a discussion, if the user follows the link and then clicks on "reply" it causes a  class java.lang.NoClassDefFoundError 
    This also happens if you create a favorite to the discussion. 
    Our portal is running:
       J2EE Engine 6.40 PatchLevel 100627.313
       Portal 6.0.15.0.0
       KnowledgeManagementCollaboration 6.0.15.0.0 (NW04 SPS15)
    <b>My question is what file is missing or what entry in the portalapp.xml is missing?</b>
    Here is the detail:
    System Error
    An exception occurred during the program execution. Below you will find technical information pertaining to this exception that you might want to forward to your system administrator.
    Exception Class     
    Call Stack     java.lang.ClassCastException
            at com.sapportals.wcm.control.generic.WcmErrorControl.readInputData(WcmErrorControl.java:558)
            at com.sapportals.wdf.stack.Control.triggerInput(Control.java:473)
            at com.sapportals.wdf.WdfEventDispatcher.dispatch(WdfEventDispatcher.java:172)
            at com.sapportals.wdf.WdfCompositeController.onWdfEvent(WdfCompositeController.java:538)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at com.sapportals.htmlb.page.DynPage.doProcessCompositeEvent(DynPage.java:204)
            at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:142)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:115)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:73)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    Hello Joel,
    Yes, I did follow the guide in Stefan's Blog and used the correct three standalone SDA files;
    actually I found out in CE 7.1.1, these three DC already exist after standard installation and
    have not deployed them at all.
    Thank you for your input.
    Ying-Jie Chen

  • Question on java.lang.Thread "starting problems"

    hi everybody
    i've just little trouble running a tiny program which uses Threads.
    maybe there's a misunderstanding from my side:
    About my code:
    01  public class MyThread extends Thread {
    02
    03    String any_string = null;
    04
    05    public MyThread(String param) {
    06      any_string = param;
    07      this.start();
    08    }
    09
    10    public void run() {
    11      while(!isInterrupted()) {
    12        System.out.println(" > This Thread is running!");
    13        // any other operation...
    14        try {
    15        sleep(1000);
    16      }
    17      catch(Exception e) {}
    18    }
    19  }This is a Thread's code similar to those you can find it in the java.lang.Thread Documentation or in the java Tutorial.
    In my example I got a IllegalThreadStateException in codeline 07 which means (compare to java.lang.Thread Documentation) that the code tries to start the Thread while the Thread is still running.
    I always thought a Thread will not start itself.
    I thought (and that's the way, i red it in the documentation) that the constructor of a Thread only allocates the new Thead-Object.
    But by constructing MyThread I got the descripted exception (i'm beginning to repeat myself...). The "funny" thing on this exception is that the Thread at least IS running but there could be no Object allocated
    01  ...
    02  /**
    03   * construction of a new Object of the class MyThread.
    04   * test will be auto-started by the MyThread constructor
    05   */
    06  MyThread test = new MyThread("any-string");
    07  ...
    08  test.anyMethodOfClassMyThread();This little code generates a java.lang.NullPointerException in line 08 (when trying to access the object of class MyThread). Even after the application exits (in case of this exception), the run()-Method of MyThread generates its Text-Output " > This Thread is running!". argh
    Does anyone see my mistake / misunderstanding??
    It's really frustrating if you are sitting in front of your pc and can't get the reason why your prog is generating that "bullshit" (ok... i know - it's only generatting the bullshit I told it to generate :( )
    Any suggestions or ideas
    thanks,
    Thof

    Well now, I don't get a NullPointerException, when I try to call a method of MyThread. Here's your code, with slight modifications by me:
    public class MyThread extends Thread {
        String any_string = null;
        public MyThread(String param) {
            any_string = param;
            this.start();
        public String getAnyString(){
            return any_string;
        public void run() {
            while(!isInterrupted()) {
                System.out.println(" > This Thread is running!");
                try {
                    sleep(1000);
                catch(Exception e) {}
    }To test the app I wrote this class:
    public class TestMyThread {
        public static void main(String[] args) {
            MyThread temp = new MyThread("Hello World");
            System.out.println(temp.getAnyString());
    }Now it does print out the correct "Hello World".
    Your other problem of the thread not shutting down is because it is not a daemon thread. To solve this you will need to add this Thread to a ThreadGroup and set the ThreadGroup as a Daemon group. (see ThreadGroup::setDaemon() )
    Or you can put a little boolean in your while loop and break out when you change the value of the boolean. Then when you want to shut down you simply change the boolean
    Hope this helps
    -Philip

  • Thread unserialized exception: NotSerializableException: java.lang.Thread

    hello experts,
    i have this exception coming; seems to be coming from some thread but i removed all the threads from my code, i thought its because of some object which is still unserialized, i am not sure whether this is because of one unserialized object or its because of more reasons, please have a look:
    Exception in client main: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
         at BallServerImpl_Stub.getAllBallProxies(Unknown Source)
         at CopyOfManyMovingBalls.<init>(CopyOfManyMovingBalls.java:80)
         at CopyOfManyMovingBalls$2.run(CopyOfManyMovingBalls.java:294)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
         ... 11 more
    this is coming  when i m accessing this method:
    class BallServerImpl extends UnicastRemoteObject
    implements BallServer
    * @return an enumeration of all Balls as proxy objects
    public Ball[] getAllBallProxies() throws java.rmi.RemoteException
         Ball[] locations1 = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
         BallImpl impl = (BallImpl)iter.nextElement();
    locations1[idx++] = new BallProxy(impl);
    return locations1;
    why this function is running fine when i m calling this from client unlike getAllBallProxies() nevertheless both are returning the same thing:
    * @return an enumeration of all Balls as remote references
    public Ball[] getAllBalls()
         Ball[] locations = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
    locations[idx++] = (Ball)iter.nextElement();
    return locations;
    the proxy Class:
    * The Proxybouncing ball.
    public class BallProxy implements Serializable,Ball {
    * The Real bouncing ball.
    public class BallImpl extends UnicastRemoteObject implements IBallRemote,Serializable
    *load of thanks as this is "SHOW STOPPER",
    jibbylala*
    Edited by: 805185 on Oct 25, 2010 8:33 PM
    Edited by: 805185 on Oct 25, 2010 8:39 PM
    Edited by: 805185 on Oct 25, 2010 9:21 PM
    Edited by: 805185 on Oct 25, 2010 9:25 PM
    Edited by: 805185 on Oct 25, 2010 9:27 PM
    Edited by: 805185 on Oct 25, 2010 9:46 PM

    that there was some thread there in BallProxy but i removed all from them and now testingIf you don't post the code people ask to see, you may never get a useful answer here.
    P.S i didn't know that threads are not SerializedThe Thread class is not Serializable. Precision please.
    Now i m updating the code, i needed the confirmationConfirmation of what?
    and now trying to avoid them.Them?
    But what if i need them.Them?
    Please make the effort to express yourself clearly. You've already been told you're not making much sense and you haven't done anything about it.
    how can we make serialized?The concept of serializing a Thread makes no sense whatsoever. You don't want to do it. You don't need to do it. You can't do it. It wouldn't work if you could do it.
    Somewhere or other you have a class member that is a reference to a Thread. Remove it or make it transient. If you post the code somebody may help you. If you don't, nobody can possibly do that.

  • ERROR: Unable to locate system class: java/lang/String

    I have swtiched from running my application using sun jvm to using microsoft jvm. When i run it i get the following error:
    ERROR: Unable to locate system class: java/lang/String
    java -classpath out;etc..etc myclass
    has become
    jview -cp:a out;C:\build\rt.jar;etc..etc myclass
    any ideas?

    Search for the old "MS SDK for Java 4.0" somewhere (no, you can't find it at Microsoft's site).
    There are two files that you have to get: sdkdocs40.exe (a file with 10,895,496 bytes) and SDKJava40.exe (a file with 20,222,928 bytes).
    Use the embedded jvc compiler to recompile your program. Beware: try not to rely too much in jvc. Use it only for discover that you're using methods not implemented in JDK 1.1.8, but don't use it for deploying your app.
    You'll discover that you'll have to rewrite large portions of your program, and even change your program specifications to deal with the reduced functionality of the old MS JVM (for instance, say that you'll need to change the 'modified date' of a file.
    In JDK >= 1.2 there's the method File.setModified(); in MS JVM you'll need to use some com.ms.wfc function.

Maybe you are looking for

  • Matrox M9138 video card doesn't like system update

    Hi thanks to all who helped me get this video card working about 18 months ago! https://bbs.archlinux.org/viewtopic.php?id=89108&p=1 Unfortunately updating with pacman -Syu has stopped the video card from working at all. I now write to you using the

  • Problem with non-updated idocs

    Hi, we have a problem after upgrading from 3.5 to 7.0. Lots of extractors end in an error-message concerning non-updated idocs. Every day several extractors have this problem. This are not always the same extractors. As a result we must repair many e

  • How to limit an Interactive Report Region from displaying.

    I have a page which is an interactive report. When you call that page from another one it takes a while as it is selecting all rows (over 10k). Once those rows are retrieved and the user adds a filter criteria it's relatively fast. How do I limit the

  • HT201272 Getting error 3049 while trying to download past music purchases from the Cloud

    My wife and I are trying to download all of our past purchases from the cloud. I got all of mine just fine, but my wife's music comes up with error 3049. I haven't found any documentation online of a similar error. Anyone know what that's about? Than

  • I can't get video on my iPod

    Hello everyone, I am new to iPod so please bear with me. Anyway, I put a bunch of songs on my iPod and that is all working swingingly. I also purchased a couple of music videos and they show up in iTunes and work there but not on my iPod. They are on