StreamCorruptedException when trying to deserialize Object containing a Vec

Hello,
I am trying to send an Object containing an (currently empty) Vector with ObjectInput/Output-Streams.
But when deserializing the Object I always get a StreamCorruptedException: null.
As soon as I remove the Vector from the Object everything works as it should.
Anybody can tell me, what is happening here? I didn�t expect any trouble with the Vector since it implements Serializable and doesn�t contain anything, yet.
Thanks,
Philipp

Hello again.
to exclude problems with the HttpMessage-class I rewrote the applet-part to use an URLConnection. No you can see, what the HttpMessag-class does normally. It still raises the same error.
Here it is:
String argstring = URLEncoder.encode("command", "UTF-8") + "=" + URLEncoder.encode(command, "UTF-8");
URL url = new URL(codeBase, chatServer);
URLConnection con = url.openConnection();
// Prepare for both input and output
con.setDoInput(true);
con.setDoOutput(true);
// Turn off caching
con.setUseCaches(false);
// Work around a Netscape bug
con.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
// Write the arguments as post data
DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes(argstring);
out.flush();
out.close();
InputStream in = con.getInputStream();
ObjectInputStream oin = new ObjectInputStream(in);
ChatCommandReply reply = (ChatCommandReply) oin.readObject();
} catch (Exception ex)
ex.printStackTrace();
BTW, the stackTrace looks like this:
java.io.StreamCorruptedException
     at java.io.ObjectInputStream.readObject0(Unknown Source)
     at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
     at java.io.ObjectInputStream.readSerialData(Unknown Source)
     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
     at java.io.ObjectInputStream.readObject0(Unknown Source)
     at java.io.ObjectInputStream.readObject(Unknown Source)
     at com.byteshift.vobaclub.chat.client.Chatroom.sendCommand(Chatroom.java:217)
     at com.byteshift.vobaclub.chat.client.Chatroom.stop(Chatroom.java:256)
     at com.byteshift.vobaclub.chat.client.ChatApplet.stop(ChatApplet.java:72)
     at sun.applet.AppletPanel.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)
Regards,
Philipp

Similar Messages

  • ClassNotFound Message when trying to deserialize data from an applet

    Hi,
    I have an applet that reads data from a web-server. The data was created by serializing a custom class (Test.java). The serialization format is not the standard one, but XML. This is reached by using the JSX-library (http://www.jsx2.com).
    My HTML-file (Test.html) looks like that:
    <html>
    <applet width="400"
    height="200"
         code="Test.class"
         codebase="./"
         archive="JSX2.0.9.4.jar">
    </applet>
    </html>
    Both, the Test.class and JSX2.0.9.4.jar are stored in the same directory. The Applet reads the serialization data of "Test" instances and tries to deserialize them. But when started, the following error message appears:
    Java VM version: 1.4.1_02
    Java VM vendor: Sun Microsystems Inc.
    java.lang.ClassNotFoundException: Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at JSX.ObjectReader$Cache.getClass(ObjectReader.java:1503)
    at JSX.ObjectReader$Cache.getClassCache(ObjectReader.java:1511)
    at JSX.ObjectReader.object(ObjectReader.java:796)
    at JSX.ObjectReader.readObject(ObjectReader.java:381)
    at JSX.ObjectReader.readObjectOverride(ObjectReader.java:342)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
    at Test.read(Test.java:49)
    at Test.start(Test.java:72)
    at org.kde.kjas.server.KJASAppletStub$1.run(KJASAppletStub.java:102)
    at java.lang.Thread.run(Thread.java:536)
    When reading serialized data of classes included in the JRE, i.e. an ArrayList, everything works fine.
    I think it is a kind of CLASSPATH problem, because "Test.class" can not be found although it is in the same directory as the Test.html file. So how can I fix this problem?
    Thanks in advance
    Markus

    Make sure your 'CLASSPATH' contains '.'. However, it
    should because you are compiling your applets fine.
    Also try specifying a path to your class when
    loading. If it's in a package, you have to specify
    that, or include the class directory in your
    CLASSPATH.Hey Devyn, it can't be a classpath problem. It's an applet; if run in the browser, there is no way to specify a classpath short of entering a jar in the archive parameter.
    How are you deserializing the applet?

  • Error in IB (When trying to import objects into ESR from SLD or from server

    Hi Experts,
    We are facing an error with the Integration builder recently. When we open Enterprise Services Repository of PI 7.1, we are able to see the GUI with objects perfectly. When we try to import an object into the repository from the server ( In ESR, choose Tools -> Import Design objects -> From Server), we are thrown with an exception...
    Error when exectuting search (QUERY_ERROR)
    & java.lang.NullPointerException
    The server throws the above two exceptions. I have pasted the logs of the error when trying to import an object from the server and also from the sld, below.
    Have any of you experieced the issue? Request you to please check this out and suggest what the problem could be. Thanks in advance.
    Regards,
    Basker
    Log of the error received when trying to import an object from the server...
    ====================================================================
    = Root Exception ===================================================
    ====================================================================
    Thrown:
    com.sap.aii.utilxi.swing.framework.ExecuteException: Error when executing search
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:582)
    at com.sap.aii.ib.gui.shelp.QueryPanel.startQuery(QueryPanel.java:595)
    at com.sap.aii.ib.gui.shelp.QueryPanel$1.run(QueryPanel.java:218)
    at com.sap.aii.utilxi.misc.thread.ThreadPool$ThreadPoolThread.run(ThreadPool.java:392)
    Caused by: java.lang.NullPointerException: null
    at com.sap.aii.utilxi.core.collections.ArrayUtil.appendArrays(ArrayUtil.java:331)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:273)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:241)
    at com.sap.aii.ib.gui.shelp.StandardQueryAccessor.executeQuery(StandardQueryAccessor.java:68)
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:567)
    ... 3 more
    ====================================================================
    == Content from the LogHandler =====================================
    ====================================================================
    #12 13:44:56 AWT-EventQueue-2 ERROR com.sap.aii.utilxi.swing.toolkit.ExceptionDialog: Throwable
    Thrown:
    com.sap.aii.utilxi.swing.framework.ExecuteException: Error when executing search
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:582)
    at com.sap.aii.ib.gui.shelp.QueryPanel.startQuery(QueryPanel.java:595)
    at com.sap.aii.ib.gui.shelp.QueryPanel$1.run(QueryPanel.java:218)
    at com.sap.aii.utilxi.misc.thread.ThreadPool$ThreadPoolThread.run(ThreadPool.java:392)
    Caused by: java.lang.NullPointerException: null
    at com.sap.aii.utilxi.core.collections.ArrayUtil.appendArrays(ArrayUtil.java:331)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:273)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:241)
    at com.sap.aii.ib.gui.shelp.StandardQueryAccessor.executeQuery(StandardQueryAccessor.java:68)
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:567)
    ... 3 more
    #11 13:44:55 Pool-Thread-0 FINE AutoLog.created.java.lang.NullPointerException: java.lang.NullPointerException
    at com.sap.aii.utilxi.core.collections.ArrayUtil.appendArrays(ArrayUtil.java:331)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:273)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:241)
    at com.sap.aii.ib.gui.shelp.StandardQueryAccessor.executeQuery(StandardQueryAccessor.java:68)
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:567)
    at com.sap.aii.ib.gui.shelp.QueryPanel.startQuery(QueryPanel.java:595)
    at com.sap.aii.ib.gui.shelp.QueryPanel$1.run(QueryPanel.java:218)
    at com.sap.aii.utilxi.misc.thread.ThreadPool$ThreadPoolThread.run(ThreadPool.java:392)
    #10 13:44:55 Pool-Thread-0 DEBUG AutoLog.created.java.lang.NullPointerException: null
    #9 13:44:55 Pool-Thread-0 FINE AutoLog.created.com.sap.aii.utilxi.swing.framework.ExecuteException: com.sap.aii.utilxi.swing.framework.ExecuteException: Error when executing search
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:582)
    at com.sap.aii.ib.gui.shelp.QueryPanel.startQuery(QueryPanel.java:595)
    at com.sap.aii.ib.gui.shelp.QueryPanel$1.run(QueryPanel.java:218)
    at com.sap.aii.utilxi.misc.thread.ThreadPool$ThreadPoolThread.run(ThreadPool.java:392)
    Caused by: java.lang.NullPointerException
    at com.sap.aii.utilxi.core.collections.ArrayUtil.appendArrays(ArrayUtil.java:331)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:273)
    at com.sap.aii.ib.gui.xiitem.services.XiItemServiceProvider.queryXiItems(XiItemServiceProvider.java:241)
    at com.sap.aii.ib.gui.shelp.StandardQueryAccessor.executeQuery(StandardQueryAccessor.java:68)
    at com.sap.aii.ib.gui.shelp.QueryPanel.executeQuery(QueryPanel.java:567)
    ... 3 more
    #8 13:44:55 Pool-Thread-0 DEBUG AutoLog.created.com.sap.aii.utilxi.swing.framework.ExecuteException: Error when executing search
    #7 13:43:52 AWT-EventQueue-2 FINE AutoLog.created.com.sap.engine.services.security.exceptions.BaseLoginException: com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.
    at com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule.login(BasicPasswordLoginModule.java:149)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:220)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:218)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImpl.login(RemoteLoginContextHelperImpl.java:78)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImplp4_Skel.dispatch(RemoteLoginContextHelperImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
    at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
    at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
    at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
    predecessor system
    com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.
    at com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule.login(BasicPasswordLoginModule.java:149)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:220)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:218)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImpl.login(RemoteLoginContextHelperImpl.java:78)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImplp4_Skel.dispatch(RemoteLoginContextHelperImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
    at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
    at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
    at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
    #6 13:43:52 AWT-EventQueue-2 DEBUG AutoLog.created.com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.
    #5 13:43:52 AWT-EventQueue-2 FINE AutoLog.created.com.sap.engine.services.security.exceptions.BaseLoginException: com.sap.engine.services.security.exceptions.BaseLoginException: Cannot authenticate the user.
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:175)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:218)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImpl.login(RemoteLoginContextHelperImpl.java:78)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImplp4_Skel.dispatch(RemoteLoginContextHelperImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
    at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
    at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
    at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
    Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.
    at com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule.login(BasicPasswordLoginModule.java:149)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:220)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70)
    ... 13 more
    predecessor system
    com.sap.engine.services.security.exceptions.BaseLoginException: Cannot authenticate the user.
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:175)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.services.security.login.FastLoginContext.login(FastLoginContext.java:218)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImpl.login(RemoteLoginContextHelperImpl.java:78)
    at com.sap.engine.services.security.remoteimpl.login.RemoteLoginContextHelperImplp4_Skel.dispatch(RemoteLoginContextHelperImplp4_Skel.java:64)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
    at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
    at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
    at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
    Caused by: com.sap.engine.services.security.exceptions.BaseLoginException: Authentication did not succeed.
    at com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule.login(BasicPasswordLoginModule.java:149)
    at com.sap.engine.services.security.login.LoginModuleLoggingWrapperImpl.login(LoginModuleLoggingWrapperImpl.java:220)
    at com.sap.engine.services.security.login.ModulesProcessAction.run(ModulesProcessAction.java:70)
    ... 13 more

    Hi Rajeev,
    Thanks for your inputs. I myself am a basis guy. I ve already checked all the authorizations given to the user - PISUPER, and have found it to be fine. Can't understand why this security issue crops up still. anyways, i m getting this error when trying to import an object from the server. If i try to create a new object and during the process, try to import the SCV from SLD, i m facing with an error again, of a different sort. The log says...
    ====================================================================
    = Root Exception ===================================================
    ====================================================================
    Thrown:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: Internal error during bean lookup for bean SldAccessServiceBean
         at com.sap.aii.ib.clsif.gen.BeanAccessHandler.handleRuntimeExInBusinessMethod(BeanAccessHandler.java:113)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getSwcvLinks(SldAccessServiceDelegate.java:55)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.getSwcvLinksAdapter(WorkspaceCreatePanel.java:520)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.access$000(WorkspaceCreatePanel.java:75)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel$4.getResult(WorkspaceCreatePanel.java:449)
         at com.sap.aii.utilxi.swing.toolkit.InterruptableProgressDialog$1.construct(InterruptableProgressDialog.java:190)
         at com.sap.aii.utilxi.swing.toolkit.SwingWorker$2.run(SwingWorker.java:126)
         at java.lang.Thread.run(Unknown Source)
    Caused by: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Internal error during bean lookup for bean SldAccessServiceBean
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getHomeInterface(LoginServiceImpl.java:460)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getBusinessInterface(LoginServiceImpl.java:425)
         at com.sap.aii.ib.clsif.gen.BeanAccessHandler.getBean(BeanAccessHandler.java:60)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getBean(SldAccessServiceDelegate.java:79)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getSwcvLinks(SldAccessServiceDelegate.java:49)
         ... 6 more
    Caused by: com.sap.aii.ib.core.ejbutil.HomeFactoryException: Exception during lookup operation of object with name sap.com/com.sap.xi.repository/SldAccessServiceBean, cannot resolve object reference.
         at com.sap.aii.ib.clsif.login.EJBHomeFactory.lookUpHome(EJBHomeFactory.java:381)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getHomeInterface(LoginServiceImpl.java:456)
         ... 10 more
    Caused by: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name sap.com/com.sap.xi.repository/SldAccessServiceBean, cannot resolve object reference.
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:528)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:637)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at com.sap.aii.ib.clsif.login.EJBHomeFactory.lookUpHome(EJBHomeFactory.java:353)
         ... 11 more
    Caused by: javax.naming.NamingException: Error occurs while the EJB Object Factory trying to resolve JNDI reference Reference Class Name:
    Type: clientAppName
    Content: sap.com/com.sap.xi.repository
    Type: interfaceType
    Content: remote
    Type: home
    Content: com.sap.aii.ib.sbeans.sldAccess.SldAccessServiceHome
    Type: ejb-link
    Content: SldAccessServiceBean
    Type: remote
    Content: com.sap.aii.ib.sbeans.sldAccess.SldAccessServiceRemote
    com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception while trying to get InitialContext.
         at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:488)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:73)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:58)
         at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:521)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:637)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at com.sap.aii.ib.clsif.login.EJBHomeFactory.lookUpHome(EJBHomeFactory.java:353)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getHomeInterface(LoginServiceImpl.java:456)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getBusinessInterface(LoginServiceImpl.java:425)
         at com.sap.aii.ib.clsif.gen.BeanAccessHandler.getBean(BeanAccessHandler.java:60)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getBean(SldAccessServiceDelegate.java:79)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getSwcvLinks(SldAccessServiceDelegate.java:49)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.getSwcvLinksAdapter(WorkspaceCreatePanel.java:520)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.access$000(WorkspaceCreatePanel.java:75)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel$4.getResult(WorkspaceCreatePanel.java:449)
         at com.sap.aii.utilxi.swing.toolkit.InterruptableProgressDialog$1.construct(InterruptableProgressDialog.java:190)
         at com.sap.aii.utilxi.swing.toolkit.SwingWorker$2.run(SwingWorker.java:126)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Can't get Socket. Reason:Connection timed out: connect
         at com.sap.engine.interfaces.cross.io.transport.PortManager.getRealSocket(PortManager.java:284)
         at com.sap.engine.interfaces.cross.LoadBalancerImpl.getAllAccessPoints(LoadBalancerImpl.java:97)
         at com.sap.engine.interfaces.cross.CrossObjectBroker.getDestination(CrossObjectBroker.java:142)
         at com.sap.engine.services.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:347)
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.init(Unknown Source)
         at javax.naming.InitialContext.<init>(Unknown Source)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:73)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:58)
         at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:521)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:637)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at com.sap.aii.ib.clsif.login.EJBHomeFactory.lookUpHome(EJBHomeFactory.java:353)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getHomeInterface(LoginServiceImpl.java:456)
         at com.sap.aii.ib.clsif.login.LoginServiceImpl.getBusinessInterface(LoginServiceImpl.java:425)
         at com.sap.aii.ib.clsif.gen.BeanAccessHandler.getBean(BeanAccessHandler.java:60)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getBean(SldAccessServiceDelegate.java:79)
         at com.sap.aii.ib.client.sldAccess.impl.SldAccessServiceDelegate.getSwcvLinks(SldAccessServiceDelegate.java:49)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.getSwcvLinksAdapter(WorkspaceCreatePanel.java:520)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel.access$000(WorkspaceCreatePanel.java:75)
         at com.sap.aii.ibrep.gui.workspace.WorkspaceCreatePanel$4.getResult(WorkspaceCreatePanel.java:449)
         at com.sap.aii.utilxi.swing.toolkit.InterruptableProgressDialog$1.construct(InterruptableProgressDialog.java:190)
         at com.sap.aii.utilxi.swing.toolkit.SwingWorker$2.run(SwingWorker.java:126)
         at java.lang.Thread.run(Unknown Source)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:140)
         at com.sap.engine.services.ejb3.runtime.impl.EJBObjectFactory.getObjectInstance(EJBObjectFactory.java:58)
         at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:521)
         ... 14 more
    Any clues what might be the issue?
    thanks in advance,
    Regards,
    Basker

  • Illustrator CC pastes unformatted code when trying to copy objects

    When I attempt to copy and paste objects or text, illustrator pastes unformatted code (see picture).
    When I copy the object and paste it a second time, it works fine, it's only when pasting for the first time.
    It's not the end of the world but it's really quite annoying, any help would be appreciated, cheers.
    Image below shows the copied objected and resulting paste

    just fixed my own problem: preferences > file handling & clipboard > include SVG code
    simple

  • Error occured when trying to pass object from Jsp to Applet

    I am trying to pass a serialized object(ie, object class implements java.io.Serializable...so that is not a problem) from a Jsp to an Applet.
    My jsp(Jsp_RMI.jsp) page is:-
    <%@ page import="java.io.*" %>
    <%@ page import="com.itlinfosys.syslab.mfasys.scm.*" %>
    <%@ page import="java.util.*" %>
    <applet code="com/itlinfosys/syslab/mfasys/scm/Applet_RMI" width=200 height=100>
    </applet>
    <%! ObjectOutputStream outputToApplet=null;
    PrintWriter out=null;
    BufferedReader inTest=null;
    %> <% Student student=new Student();
    Vector students=new Vector();
    students.addElement(student);
    outputToApplet=new ObjectOutputStream(response.getOutputStream());
    outputToApplet.writeObject(students);
    out.println(student);
    outputToApplet.flush();
    outputToApplet.close();
    %> <html> <head> <title>My Page</title> </head> <body> </body> </html>
    My Applet Applet_RMI.java is:-
    package com.itlinfosys.syslab.mfasys.scm;
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    import com.itlinfosys.syslab.mfasys.scm.Student;
    import java.util.*;
    public class Applet_RMI extends Applet{
    Vector aStudent=null;
    ObjectInputStream inputFromServlet=null;
    String location="<URL>";
    public void init(){
    getConnection(location);
    public void getConnection(String location) {
    try{
    URL testJsp=new URL(location);
    URLConnection jspConnection=testJsp.openConnection();
    jspConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    jspConnection.setDoInput(true);
    jspConnection.setDoOutput(true);
    jspConnection.setUseCaches(false);
    jspConnection.setDefaultUseCaches(false);
    inputFromServlet=new ObjectInputStream(jspConnection.getInputStream());
    aStudent=(Vector)inputFromServlet.readObject();
    }catch(MalformedURLException e){ System.out.println(e);
    catch(IOException e){
    System.out.println(e);
    catch(ClassNotFoundException e){ System.out.println(e);
    I am using netscape-4.73 on weblogic server. On server when I try to view Jsp page it gives netscape.security.AppletSecurity Exception.
    When I am trying to call this Jsp from IE-5 on my client machine, I am getting error:-"java.io.StreamCorruptedException: InputStream does not contain a serialized" Pl help me out.

    You should probably change your implementation to use a servlet rather than JSP. There may be extra stuff being put in by the JSP. Besides, servlets run faster. Here is some code that may help.
    From the Servlet:
      public void doPost(
          HttpServletRequest               httpServletRequest,
          HttpServletResponse              httpServletResponse )
          throws ServletException, IOException {
        ObjectInputStream in = new ObjectInputStream(new GZIPInputStream(httpServletRequest.getInputStream()));
        requestObject = in.readObject() ;
        ObjectOutputStream out = new ObjectOutputStream(new GZIPOutputStream(httpServletResponse.getOutputStream()));
        out.writeObject(responseObject);
        out.close();
      } //end doPost()And from the Applet:
      public Object doServletCall(
          Object                           sendObject ) {
        try {
          HttpURLConnection con = (HttpURLConnection)servlet.openConnection() ;
          con.setRequestMethod("POST");
          con.setDoInput(true);
          con.setDoOutput(true);
          con.setUseCaches(false);
          con.setRequestProperty("Content-Type","application/x-www-form-urlencoded");
          ObjectOutputStream out = new ObjectOutputStream(new GZIPOutputStream(con.getOutputStream()));
          out.writeObject(sendObject);
          out.flush();
          out.close();
          ObjectInputStream in = new ObjectInputStream(new GZIPInputStream(con.getInputStream()));
          Object returnObject = in.readObject() ;
          in.close();
          return returnObject ;
        } catch (IOException e) {
          e.printStackTrace();
        } catch (ClassNotFoundException e) {
          e.printStackTrace();
        } //end try
        return null ;
      } //end doServletCall()Of course you can remove the ZIP and send object if you don't need them

  • Driver errors reported when trying to start objects

    We have a standard PCI can card, and are developing in the following environment:
    Software written in VC++ Version6,
    running under NT4.0,
    Port configured as 'CAN0',
    using extended arbitration IDs.
    We create one network interface object, and, depending on the test configuration, four CAN response objects.
    The problems are :-
    1) if the network interface object (nio) is configured as 'start on open'= TRUE then the other objects fail to initialise. If the other objects aren't started, the nio works perfectly though.
    2) If the nio is configured not to start on open, the other objects will initialise successfully (obviously not a lot of use though).
    Any attempt to call ncAction trying to start any of the objects will however fail with a status of 0xBFF62002, which is CanErrDriver.
    Below is a stripped down set of events as to how we start our card.
    AttrIdList[0] = NC_ATTR_BAUD_RATE;
    AttrValueList[0] = 125000; //BaudRate;
    AttrIdList[1] = NC_ATTR_START_ON_OPEN;
    if( Response_Enabled == 0 )
    AttrValueList[1] = NC_TRUE;
    NotificationStates = (NC_ST_READ_AVAIL |
    NC_ST_ERROR | NC_ST_WARNING | NC_ST_STOPPED);
    else
    AttrValueList[1] = NC_FALSE;
    // don't look for stopped state else it
    // will interrupt continuously.
    NotificationStates =
    (NC_ST_READ_AVAIL | NC_ST_ERROR |
    NC_ST_WARNING);
    AttrIdList[2] = NC_ATTR_READ_Q_LEN;
    AttrValueList[2] = 50; //500;
    AttrIdList[3] = NC_ATTR_WRITE_Q_LEN;
    AttrValueList[3] = 20;
    AttrIdList[4] = NC_ATTR_CAN_COMP_STD;
    AttrValueList[4] = 0;
    AttrIdList[5] = NC_ATTR_CAN_MASK_STD;
    AttrValueList[5] = 0; // NC_CAN_MASK_STD_DONTCARE;
    AttrIdList[6] = NC_ATTR_CAN_COMP_XTD;
    AttrValueList[6] = 0;
    AttrIdList[7] = NC_ATTR_CAN_MASK_XTD;
    AttrValueList[7] = 0; // NC_CAN_MASK_XTD_DONTCARE;
    // Configure the CAN Network Interface Object
    Status = ncConfig(szCanObject, 8, AttrIdList,
    AttrValueList);
    CheckStatus(Status, "ncConfig");
    CCanObject* pCanObject = new CCanObject;
    pCanObject->m_phObject = new (NCTYPE_OBJH);
    ASSERT (pCanObject->m_phObject != NULL);
    Status = ncOpenObject(szCanObject,
    pCanObject->m_phObject);
    CheckStatus(Status, "ncOpenObject");
    if (Status == 0) // object was
    // successfully created
    // add the CAN object to the list,
    // indexed by name
    m_CanObjectMap.SetAt(strObjectName,
    pCanObject);
    // create a string to identify the Notification
    pCanObject->m_pszObjectName = new char[strObjectName.GetLength() + 1];
    strcpy(pCanObject->m_pszObjectName, strObjectName);
    // Create the notification used to store incoming frames.
    // CanCallback will be called whenever a frame is available,
    // a background error occurs, or no frame is received for 30 seconds.
    // We pass a pointer to the global Queue data structure to the
    // callback's RefData parameter.
    Status = ncCreateNotification(
    *(pCanObject->m_phObject),
    NotificationStates,
    NC_DURATION_INFINITE, //CAN_TIMEOUT
    pCanObject->m_pszObjectName,
    CanCallback); // name of callback fn
    // check callback was installed
    CheckStatus(Status, "ncCreateNotification");
    at this point we kick off a timer for 200 msecs, and then carry on when the timer expires.
    This allows the card to get itself settled.
    This consists of checking configuration, and doing the following code for each of the response objects.
    The things that change are the object names, the arbitration IDs, and the response data.
    AttrIdList[0] = NC_ATTR_COMM_TYPE;
    AttrValueList[0] = NC_CAN_COMM_TX_RESP_ONLY;
    //failed bff62002 if objects set to 'start on open'
    // All of the following are here as a result of testing.
    // The setting above is the one that should eventually be used.
    // Finally resolved by not using start-on-open above.
    // AttrValueList[0] = NC_CAN_COMM_RX_UNSOL; //worked
    // AttrValueList[0] = NC_CAN_COMM_RX_PERIODIC; //failed bff62005
    // AttrValueList[0] = NC_CAN_COMM_RX_BY_CALL; //worked
    /// AttrValueList[0] = NC_CAN_COMM_TX_PERIODIC; //worked - crashed with unhandled exception on closure though
    // AttrValueList[0] = NC_CAN_COMM_TX_BY_CALL; //worked
    // AttrValueList[0] = NC_CAN_COMM_TX_WAVEFORM; //worked - crashed with unhandled exception on closure though
    // Specify watchdog timer period
    AttrIdList[1] = NC_ATTR_BKD_PERIOD;
    AttrValueList[1] = 1000;
    // respond with DLC
    AttrIdList[2] = NC_ATTR_BKD_READ_SIZE;
    AttrValueList[2] = 0;
    AttrIdList[3] = NC_ATTR_BKD_WRITE_SIZE;
    AttrValueList[3] = DataLengthCode; // normally 3
    AttrIdList[4] = NC_ATTR_CAN_TX_RESPONSE;
    AttrValueList[4] = NC_TRUE;
    /* This attribute is ignored for CAN Objects which transmit data. */
    AttrIdList[5] = NC_ATTR_RX_CHANGES_ONLY;
    AttrValueList[5] = NC_TRUE;
    // maximum number of frames to hold in read queue
    AttrIdList[6] = NC_ATTR_READ_Q_LEN;
    AttrValueList[6] = 0;
    // The write queue length is set to zero (queuing disabled).
    // This means that for each request, the most recent data written
    // using ncWrite will be transmitted in a Data Frame.
    AttrIdList[7] = NC_ATTR_WRITE_Q_LEN;
    AttrValueList[7] = 0;
    // build the CAN object name
    sprintf(szCanName, "%s::XTD0x%08lx", CanBus, ArbitrationId );
    //*arbitration IDs normally used are
    //*0x19008000,
    //*0x19008001,
    //*0x19008002
    // configure the CAN object
    Status = ncConfig(szCanName, ATTR_LIST_LEN, AttrIdList, AttrValueList);
    // check for errors
    CheckStatus(Status, szTemp);
    // Open the transmitting CAN Object. The object starts up, but it
    // will wait for the first call to ncWrite before it transmits a Data
    // Frame.
    CCanObject* pCanObject = new CCanObject;
    pCanObject->m_phObject = new (NCTYPE_OBJH);
    ASSERT (pCanObject->m_phObject != NULL);
    Status = ncOpenObject(szCanName,
    pCanObject->m_phObject);
    CheckStatus(Status, szTemp);
    if (Status == 0) // CAN object created successfully
    // Store CAN bus information into object
    pCanObject->m_strCanBusName = CanBus;
    pCanObject->m_strCanName.Format("%s", szCanName);
    pCanObject->m_ArbitrationID = ArbitrationId;
    // add the CAN object to the list, indexed by name
    // put data into output buffer
    for (int i = 0; i < DataLengthCode; i++)
    Transmit.Data[i] = DefaultData[i];
    // setup CAN object output buffer
    Status= ncWrite(*(pCanObject->m_phObject),
    sizeof(Transmit), &Transmit);
    CheckStatus(Status, "ncWrite");
    // create a string to identify the Notification
    pCanObject->m_pszObjectName = new char
    [strObjectName.GetLength() + 1];
    strcpy(pCanObject->m_pszObjectName,
    strObjectName);
    Status = ncCreateNotification(
    *(pCanObject->m_phObject),
    NC_ST_WRITE_SUCCESS,
    NC_DURATION_INFINITE,
    pCanObject->m_pszObjectName,
    NotificationCallback);
    // check callback was installed
    CheckStatus(Status, "ncCreateNotification");
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    So, Any ideas what we're doing wrong ??
    The cards were new in December 2001.
    Software driver version installed is Version 1.5.1
    It makes little difference which card we use, as we have many cards at this site in various pieces of test equipment, and I have tried at least 6 !
    Things are beginning to get a little depserate here =:-/
    Regards,
    John Webster.

    Many thanks for the prompt reponse Diego.
    A couple of comments on what you have written above.
    The Response objects are only used for the 4 messages that need responses. All other messages are handled (received) by the Network Interface Object. Is it still therefore true to say that I should be using NC_CAN_ARBID_NONE ?
    I think the answer will be yes, but want to confirm.
    Am I correct to say that from your description, the only change was as belows :-
    AttrValueList[2] = 0;
    AttrValueList[3] = 0;
    AttrValueList[6] = NC_CAN_ARBID_NONE;
    Should I also be setting NC_ATTR_CAN_COMP_STD to NC_CAN_ARBID_NONE too ?
    Many thanks for your help. This one has been causing us a lot of problems for a long time. I have changed many of the pa
    rameters, but must admit I don't think I tried that one before.
    Just off now to try this, see if it makes our code work !
    Regards,
    John.

  • Exception Thrown when trying to save object to disk

    Alright,
    So I've got an object that looks like this
    private class InputData implements Serializable {
                public String name = "";
                public String condition = "";
                public String value = "";
                public String[] productTypes = new String[]{};
                public String[] ticketStates = new String[]{};
                public String fieldName = "";
                public String startDate = "";
                public String endDate = "";
                public String dateRange = "";
    ............................It has two constructors and overrides the toString() method. I'm trying to save it to a file with the following
    private void saveSearchesToDisk() {
                File f = new File(SAVED_SEARCHES_DIR, SAVED_SEARCHES_FILE);
                InputData[] data = ...
                try {
                    FileOutputStream fos = new FileOutputStream(f);
                    ObjectOutputStream oos = new ObjectOutputStream(fos);
                    oos.writeInt(data.length);
                    for (int i = 0; i < data.length; i++) {
                        oos.writeObject(data);
    oos.flush();
    oos.close();
    fos.close();
    }catch(FileNotFoundException e) {
    e.printStackTrace();
    catch(IOException e) {
    System.out.println(e.getMessage() + " hi hi hi hi");
    e.printStackTrace();
    I'm getting this exception, and I have no idea why???
    java.io.NotSerializableException: com.sun.java.swing.plaf.windows.XPStyleAny ideas?

    I think you are misunderstanding something.
    The reason why the outer members are being serialized, or attempted to be serialized, is because of the inner object's hidden link to the outer object. So the outer object is reachable from the inner object, and the outer data members are reachable from the outer object. There is no hidden link from the inner object directly to the outer object's members if that's what you're talking about. So there is no need for the notation you are talking about and so it doesn't exist.
    So the question remains, do you want the outer object serialized or not?

  • Objects 'jumping' too far when trying to drag objects, loss of incremental moves

    im on a mac using indesign cc. when i try to drag objects with my cursor they dont move in small increments anymore... i feel like i hit some command that i can figure out what.
    here are my setting in grids and guides...
    i thought i was snap to grid but i dont have that checked.
    ideas?

    Try to "capture" your first page thru the menu Format > Advanced > Capture Pages"
    Then you will be able to insert a new page with the defined attributes from the menu entitled "Sections" in the toolbar.
    Yvan KOENIG (from FRANCE jeudi 23 juillet 2009 19:09:05)

  • Error trying to deserialize EJB HomeHandle and EJB Handle classes

    I get the following exception when I try to deserialize both a javax.ejb.HomeHandle and a javax.ejb.Handle.  I serialize and immediately deserialize within the same application using the same classloader so there are not alot of external variables that may cause the problem.  Any ideas on why I can't deserialize an ejb handle?
    The reason I am doing this is to try and get around the need to reference another application just to call a remote method in that application.  I want to serialize the remote home interface handle or the remote component interface handle and deserialize it using my local application classloader.  Does anybody know if this would work?
    #1#java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class turtle.registry.SBRegistryRemoteHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at turtle.common.util.SerializationHelper.convertObject(SerializationHelper.java:43)
         at turtle.common.server.connect.RemoteFactory.getRemoteSAPWAS(RemoteFactory.java:206)
         at turtle.common.server.connect.RemoteFactory.getRemote(RemoteFactory.java:46)
         at turtle.common.server.connect.RemoteProxyFactory.getRemote(RemoteProxyFactory.java:99)
         at turtle.common.server.connect.RemoteProxyFactory.create(RemoteProxyFactory.java:91)
         at turtle.common.server.connect.RemoteProxyFactory.createProxy(RemoteProxyFactory.java:52)
         at turtle.server.runtime.registry.RegistryFacade.connectToRegistry(RegistryFacade.java:932)
         at turtle.server.runtime.registry.RegistryFacade.getGenericRegistryBI(RegistryFacade.java:987)
         at turtle.server.runtime.registry.RegistryFacade.unbindObjectsInProject(RegistryFacade.java:857)
         at turtle.registry.ProjectRegistrar$1$1.run(ProjectRegistrar.java:130)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:337)
         at turtle.common.security.auth.AuthenticatorBase.doAs(AuthenticatorBase.java:387)
         at turtle.registry.ProjectRegistrar$1.run(ProjectRegistrar.java:172)
         at java.util.TimerThread.mainLoop(Timer.java:512)
         at java.util.TimerThread.run(Timer.java:462)

    Has anyone been able to get this to work?  Or can anyone confirm that this is a bug?
    As a simpler test, I modified the UserManagementBean of the Car Rental example application.  I added some code in the register method that serializes and deserializes the Handle object obtained from the SessionContext.getEJBObject().getHandle() method.  The serialization completes without issue.  However, I get the same error when trying to deserialize the Handle object:
    java.lang.ClassNotFoundException: Loader /L_service:ejb could not load class com.sap.engine.examples.epf.ejb.controller.customer.UserManagementHome
         at com.sap.vmc.core.impl.sapjvm.sharing.NativeSharedClassLoaderImpl.loadClass(NativeSharedClassLoaderImpl.java:609)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:265)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:333)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.io.ObjectInputStream.resolveProxyClass(ObjectInputStream.java:656)
         at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1499)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1462)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readStub(LocalHandleDelegate.java:177)
         at com.sap.engine.services.ejb3.runtime.impl.ServerHandleDelegate.readStub(ServerHandleDelegate.java:64)
         at com.sap.engine.services.ejb3.runtime.impl.LocalHandleDelegate.readEJBHome(LocalHandleDelegate.java:101)
         at com.sap.engine.services.ejb3.runtime.impl.StatelessHomeHandleImpl.readObject(StatelessHomeHandleImpl.java:73)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1818)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1917)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1841)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1718)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1304)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:349)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deSerialize(SerializationUtils.java:33)
         at com.sap.engine.examples.epf.ejb.controller.customer.SerializationUtils.deepClone(SerializationUtils.java:59)
         at com.sap.engine.examples.epf.ejb.controller.customer.UserManagementBean.register(UserManagementBean.java:75)

  • Caught Exception when trying to create pool Object

    Hi All,
    When a stateless session bean is looking up the entity bean following 'could not create pool object' exception is throwing.
    [14/Jan/2003:09:12:50] SEVERE ( 1048): EJB5070: Exception creating stateless session bean : [java.lang.reflect.InvocationTargetException]
    [14/Jan/2003:09:12:50] SEVERE ( 1048): EJB5017: Exception while running preinvoke : ejbName = [ConfigSessionBean]
    [14/Jan/2003:09:12:50] SEVERE ( 1048):
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: c
    java.lang.RuntimeException: Caught Exception when trying to create pool Object
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(Unknown Source)
    at com.sun.ejb.containers.StatelessSessionContainer.getContext(Unknown Source)
    at com.sun.ejb.containers.BaseContainer.preInvoke(Unknown Source)
    at com.siptech.pdf.ejb.config.session.ConfigSessionBean_EJBObjectImpl.getAllModules(ConfigSessionBean_EJBObjectImpl.java:255)
    at com.siptech.pdf.ejb.config.session._ConfigSessionBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(Unknown Source)
    at com.sun.corba.ee.internal.iiop.ORB.process(Unknown Source)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(Unknown Source)
    at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(Unknown Source)
    at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:536)
    Caused by: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB:
    java.lang.reflect.InvocationTargetException
    at com.sun.ejb.containers.StatelessSessionContainer$SessionContextFactory.create(Unknown Source)
    ... 13 more
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: Caught Exception when trying to create pool Object
    at com.sun.ejb.containers.StatelessSessionContainer.getContext(Unknown Source)
    at com.sun.ejb.containers.BaseContainer.preInvoke(Unknown Source)
    at com.siptech.pdf.ejb.config.session.ConfigSessionBean_EJBObjectImpl.getAllModules(ConfigSessionBean_EJBObjectImpl.java:255)
    at com.siptech.pdf.ejb.config.session._ConfigSessionBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(Unknown Source)
    at com.sun.corba.ee.internal.iiop.ORB.process(Unknown Source)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(Unknown Source)
    at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(Unknown Source)
    at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:536)
    I have also specified the following properties in the sunejbjar.xml for the session bean.
    <ejb>
    <bean-pool>
    <steady-pool-size>2</steady-pool-size>
    <resize-quantity>5</resize-quantity>
    <max-pool-size>200</max-pool-size>
    <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
    </bean-pool>
    </ejb>
    --Muthu.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Muthu,
    To find out whether the problem is with container setting or with your application, can you create a simple stateless session bean and check if it works fine. If it works fine send me ejb-jar.xml and sun-ejb-jar.xml for your application.
    Deepak

  • Exception when trying to create pool Object

    I've been trying to get the forte 4.0ee ProductRichClient example for container managed beans to work.
    After the deployment to Sun One I got following exception when I'm using the client:
    18.10.2002 10:56:20 com.iplanet.ias.appclient.Main <init>
    INFO:
    ---------AppClient Container--------
    18.10.2002 10:56:20 com.iplanet.ias.appclient.Main setTagetServerProperties
    INFO: ACC001:Using ClientContainer file: [C:\Sun\AppServer7\appserv\domains\domain1\server1\config\sun-acc.xml].
    18.10.2002 10:56:20 com.iplanet.ias.appclient.Main <init>
    INFO: ACC014: ORB host name: [NOD]
    18.10.2002 10:56:20 com.iplanet.ias.appclient.Main <init>
    INFO: ACC013: ORB port number: [3700]
    18.10.2002 10:56:21 com.sun.enterprise.appclient.AppContainer preInvoke
    INFO: ACC007: Initiating Login ...
    18.10.2002 10:56:21 com.iplanet.ias.appclient.Main <init>
    INFO: ACC009: Load Application Class: [CMPClient.SwingClient]
    18.10.2002 10:56:23 com.iplanet.ias.appclient.Main <init>
    INFO: Application main() finished normally
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: nested exception is: java.lang.RuntimeException: Caught Exception when trying to create pool Object ; nested exception is:
    java.lang.RuntimeException: Caught Exception when trying to create pool Object
    at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
    at CMPServer._ProductHome_Stub.create(Unknown Source)
    at CMPClient.SwingClient.AddRow_ButtonActionPerformed(SwingClient.java:127)
    at CMPClient.SwingClient.access$100(SwingClient.java:24)
    at CMPClient.SwingClient$2.actionPerformed(SwingClient.java:89)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
    at java.awt.Component.processMouseEvent(Component.java:5021)
    at java.awt.Component.processEvent(Component.java:4818)
    at java.awt.Container.processEvent(Container.java:1525)
    at java.awt.Component.dispatchEventImpl(Component.java:3526)
    at java.awt.Container.dispatchEventImpl(Container.java:1582)
    at java.awt.Component.dispatchEvent(Component.java:3367)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3074)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
    at java.awt.Container.dispatchEventImpl(Container.java:1568)
    at java.awt.Window.dispatchEventImpl(Window.java:1581)
    at java.awt.Component.dispatchEvent(Component.java:3367)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Caused by: java.rmi.RemoteException: nested exception is: java.lang.RuntimeException: Caught Exception when trying to create pool Object ; nested exception is:
    java.lang.RuntimeException: Caught Exception when trying to create pool Object
    at com.sun.enterprise.iiop.POAProtocolMgr.mapException(Unknown Source)
    at com.sun.ejb.containers.BaseContainer.postInvoke(Unknown Source)
    at CMPServer.ProductEJB2024414397_ConcreteImpl_RemoteHomeImpl.create(ProductEJB2024414397_ConcreteImpl_RemoteHomeImpl.java:33)
    at CMPServer._ProductEJB2024414397_ConcreteImpl_RemoteHomeImpl_Tie._invoke(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(Unknown Source)
    at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(Unknown Source)
    at com.sun.corba.ee.internal.iiop.ORB.process(Unknown Source)
    at com.sun.corba.ee.internal.iiop.RequestProcessor.process(Unknown Source)
    at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(Unknown Source)
    at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:536)
    Caused by: java.lang.RuntimeException: Caught Exception when trying to create pool Object
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(Unknown Source)
    at com.sun.ejb.containers.util.pool.NonBlockingPool.getObject(Unknown Source)
    at com.sun.ejb.containers.EntityContainer.getPooledEJB(Unknown Source)
    at com.sun.ejb.containers.EntityContainer.getContext(Unknown Source)
    at com.sun.ejb.containers.BaseContainer.preInvoke(Unknown Source)
    at CMPServer.ProductEJB2024414397_ConcreteImpl_RemoteHomeImpl.create(ProductEJB2024414397_ConcreteImpl_RemoteHomeImpl.java:25)
    ... 9 more
    Caused by: javax.ejb.EJBException: nested exception is: java.lang.NullPointerException
    at com.sun.ejb.containers.EntityContainer$EntityContextFactory.create(Unknown Source)
    ... 15 more
    Any thoughts on why this exception is being thrown?
    Thanks for any help!
    Richard

    this sample has been tested by the SunONE TOOLs QA
    and is working. Please check your deployment descriptors
    and use the cmp samples which come with S1AS to see if your
    descriptors are correct.

  • NoClassDefFoundError when trying to return a custom Object

    Hi,
    I'm trying to get some system memory info from a Windows machine using Java. I've written the C code and Java code and it all compiles fine. I can also use most of the methods in the two files. I have a problem with one method though. Its a method that is returning an object type that I created that mirrors a windows structure. Below is the code.
    // Java Object to store the data
    package agent.win32;
    public class MemoryInfo{
      int dwLength;
      int dwMemoryLoad;
      int dwTotalPhys;
      int dwAvailPhys;
      int dwTotalPageFile;
      int dwAvailPageFile;
      int dwTotalVirtual;
      int dwAvailVirtual;
      public int get_dwLength() { return dwLength; }
      public int get_dwMemoryLoad() { return dwMemoryLoad; }
      public int get_dwTotalPhys() { return dwTotalPhys; }
      public int get_dwAvailPhys() { return dwAvailPhys; }
      public int get_dwTotalPageFile() { return dwTotalPageFile; }
      public int get_dwAvailPageFile() { return dwAvailPageFile; }
      public int get_dwTotalVirtual() { return dwTotalVirtual; }
      public int get_dwAvailVirtual() { return dwAvailVirtual; }
    // Java Class that uses JNI
    package agent.win32;
    public class NIMSNT {
      //Constructor
      public NIMSNT(){};
      static{
        try{
          System.loadLibrary("NIMSNT");
        catch (java.lang.UnsatisfiedLinkError e) {
          System.out.println (e);
       * check psapi.dll and psapi functions
       * return true if NT process can be enumerate
      public static native boolean Initialize();
       * Description:The EnumProcesses function retrieves the process identifier
       * for each process object in the system
       * return value:the list of process identifiers
       * call psapi function EnumProcesses
      public static native int[] EnumProcesses();
       * Description:The OpenProcess function returns a handle to an existing process object.
       * return value:If the function succeeds, the return value is an open handle to the specified process
       * call kernel32 function OpenProcess
      public static native int OpenProcess(int Pid);
       * Description:The EnumProcessModules function retrieves a handle for each module in the specified process
       * return value:the list of module handles
       * call psapi function EnumProcessModules
      public static native int[] EnumProcessModules(int hProcess);
       * Description:The GetModuleFileNameEx function retrieves the fully qualified path for the specified module
       * return value:the fully qualified path for the specified module
       * call psapi function GetModuleFileNameEx
      public static native String GetModuleFileName(int hProcess,int hModule);
       * Description:The GetModuleBaseName function retrieves the base name of the specified module
       * return value:the base name of the specified module
       * call psapi function GetModuleBaseName
      public static native String GetModuleBaseName(int hProcess,int hModule);
       * Description:function closes an open object handle
       * return value:true if succesfuly
       * call kernel32 function CloseHandle
      public static native boolean CloseHandle(int handle);
       * Description:function gets system memory
       * return value:String
      public static native MemoryInfo GetSystemMemoryInfo();
    // C Structure (defined in windows.h)
    typedef struct _MEMORYSTATUS {
      DWORD dwLength;
      DWORD dwMemoryLoad;
      SIZE_T dwTotalPhys;
      SIZE_T dwAvailPhys;
      SIZE_T dwTotalPageFile;
      SIZE_T dwAvailPageFile;
      SIZE_T dwTotalVirtual;
      SIZE_T dwAvailVirtual;
    } MEMORYSTATUS, *LPMEMORYSTATUS;
    // C code
    #include <windows.h>
    #include <string.h>
    #include "agent_win32_NIMSNT.h"
    #define MaxProcessNumber 10000
    /** Type Definitions                                  **/
    typedef BOOL (WINAPI *ENUMPROCESSES)(
         DWORD * lpidProcess, 
           DWORD cb,            
           DWORD * cbNeeded     
    typedef BOOL (WINAPI *ENUMPROCESSMODULES)(
         HANDLE hProcess,     
         HMODULE * lphModule, 
         DWORD cb,            
         LPDWORD lpcbNeeded   
    typedef DWORD (WINAPI *GETMODULEFILENAMEEXA)(
         HANDLE hProcess,          
         HMODULE hModule,          
         LPTSTR lpstrFileName,     
         DWORD nSize               
    typedef DWORD (WINAPI *GETMODULEBASENAME)(
         HANDLE hProcess,          
         HMODULE hModule,          
         LPTSTR lpstrFileName,     
         DWORD nSize               
    typedef struct _PROCESS_MEMORY_COUNTERS {
        DWORD cb;
        DWORD PageFaultCount;
        DWORD PeakWorkingSetSize;
        DWORD WorkingSetSize;
        DWORD QuotaPeakPagedPoolUsage;
        DWORD QuotaPagedPoolUsage;
        DWORD QuotaPeakNonPagedPoolUsage;
        DWORD QuotaNonPagedPoolUsage;
        DWORD PagefileUsage;
        DWORD PeakPagefileUsage;
    } PROCESS_MEMORY_COUNTERS, *PPROCESS_MEMORY_COUNTERS;
    typedef BOOL (WINAPI *GETPROCESSMEMORYINFO)(
         HANDLE hProcess,
         PPROCESS_MEMORY_COUNTERS ppsmenCounters,
         DWORD cb
    /** Global Variables                                  **/
    ENUMPROCESSES EnumProcesses;
    ENUMPROCESSMODULES EnumProcessModules;
    GETMODULEFILENAMEEXA GetModuleFileNameExA;
    GETMODULEBASENAME GetModuleBaseName;
    GETPROCESSMEMORYINFO GetProcessMemoryInfo;
    /** DLL Entry                                         **/
    BOOL APIENTRY DllMain(HANDLE hInst, DWORD ul_reason_being_called, LPVOID lpReserved){    
         return TRUE;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    Initialize
    * Signature: ()Z
    JNIEXPORT jboolean JNICALL Java_agent_win32_NIMSNT_Initialize(JNIEnv * env,jclass clazz){
         HANDLE hpsapi=LoadLibrary("PSAPI.DLL");
         if (hpsapi==NULL) return FALSE;
         EnumProcesses=(ENUMPROCESSES)GetProcAddress((HINSTANCE)hpsapi,"EnumProcesses");
         GetModuleFileNameExA = (GETMODULEFILENAMEEXA)GetProcAddress((HINSTANCE)hpsapi, "GetModuleFileNameExA");
         GetModuleBaseName = (GETMODULEBASENAME)GetProcAddress((HINSTANCE)hpsapi, "GetModuleBaseNameA");
         EnumProcessModules = (ENUMPROCESSMODULES)GetProcAddress((HINSTANCE)hpsapi, "EnumProcessModules");
         GetProcessMemoryInfo = (GETPROCESSMEMORYINFO)GetProcAddress((HINSTANCE)hpsapi, "GetProcessMemoryInfo");
         if (
              NULL == EnumProcesses          ||
              NULL == GetModuleFileName     ||
              NULL == GetModuleBaseName     ||
              NULL == EnumProcessModules  )
            return FALSE;
         return TRUE;   
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    EnumProcesses
    * Signature: ()[I
    JNIEXPORT jintArray JNICALL Java_agent_win32_NIMSNT_EnumProcesses(JNIEnv * env, jclass clazz){
         DWORD aPids[MaxProcessNumber];
         DWORD cGot;
         jintArray Pids=0;
         if(EnumProcesses(aPids,sizeof(aPids),&cGot)){
              cGot /= sizeof(aPids[0]);
                 Pids= (*env)->NewIntArray(env,cGot);
              (*env)->SetIntArrayRegion(env,Pids,0,cGot,(jint*) aPids);
         return Pids;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    OpenProcess
    * Signature: (IZI)I
    JNIEXPORT jint JNICALL Java_agent_win32_NIMSNT_OpenProcess (JNIEnv * env, jclass clazz,jint Pid){
         return (jint) OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,Pid);
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    EnumProcessModules
    * Signature: (I[I)[I
    JNIEXPORT jintArray JNICALL Java_agent_win32_NIMSNT_EnumProcessModules (JNIEnv * env, jclass clazz, jint hProcess){
         HMODULE hModule[MaxProcessNumber];
         jintArray jModule=0;
         DWORD cGot;    
         if (EnumProcessModules((HANDLE)hProcess,hModule,sizeof(hModule),&cGot)){
              cGot/= sizeof(hModule[0]);
              jModule= (*env)->NewIntArray(env,cGot);
              (*env)->SetIntArrayRegion(env,jModule,0,cGot,(jint*)hModule);
         return jModule;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    GetModuleFileName
    * Signature: (II)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_agent_win32_NIMSNT_GetModuleFileName(JNIEnv * env, jclass clazz, jint hProcess, jint hModule){
         jstring jName=0;
         char FileName[MAX_PATH];
         if(GetModuleFileNameExA((HANDLE)hProcess,(HMODULE)hModule,FileName,sizeof(FileName))!=0){
              jName=(*env)->NewStringUTF(env,FileName);
         return jName;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    GetModuleBaseName
    * Signature: (II)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_agent_win32_NIMSNT_GetModuleBaseName(JNIEnv * env, jclass clazz, jint hProcess, jint hModule){
         jstring jName=0;
         char FileName[MAX_PATH];
         if(GetModuleBaseName((HANDLE)hProcess,(HMODULE)hModule,FileName,sizeof(FileName))!=0){
              jName=(*env)->NewStringUTF(env,FileName);
         return jName;
    * Class:     nims4_agent_win32_NIMSNT
    * Method:    CloseHandle
    * Signature: (I)Z
    JNIEXPORT jboolean JNICALL Java_agent_win32_NIMSNT_CloseHandle(JNIEnv * env, jclass clazz, jint handle)
         return CloseHandle((HANDLE) handle);
    * Class:     nims_agent_win32_NIMSNT
    * Method:    GetSystemMemoryInfo
    * Signature: (I)Lagent/win32/MemoryInfo;
    JNIEXPORT jobject JNICALL Java_agent_win32_NIMSNT_GetSystemMemoryInfo(JNIEnv * env, jclass clazz){
         jfieldID jfield;
         jobject jobj=0;
         MEMORYSTATUS stat;
         stat.dwLength = sizeof(stat);
         GlobalMemoryStatus(&stat);
         clazz=(*env)->FindClass(env,"agent.win32.NIMSMemoryInfo");
         if (clazz==0) return 0;
         jobj = (*env)->AllocObject (env,clazz);
         //set NIMSMemoryInfo object field
         // dwLength
         jfield=(*env)->GetFieldID(env,clazz,"dwLength","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwLength);
         // dwMemoryLoad
         jfield=(*env)->GetFieldID(env,clazz,"dwMemoryLoad","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwMemoryLoad);
         // dwTotalPhys
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalPhys","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalPhys);
         // dwAvailPhys
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailPhys","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailPhys);
         // dwTotalPageFile
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalPageFile","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalPageFile);
         // dwAvailPageFile
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailPageFile","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailPageFile);
         // dwTotalVirtual
         jfield=(*env)->GetFieldID(env,clazz,"dwTotalVirtual","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwTotalVirtual);
         // dwAvailVirtual
         jfield=(*env)->GetFieldID(env,clazz,"dwAvailVirtual","I");
         (*env)->SetIntField (env,jobj, jfield,stat.dwAvailVirtual);
         return jobj;
    };I can use all of the methods in the Java/C code except for the the last native method   public static native MemoryInfo GetSystemMemoryInfo(); . I get a NoClassDefFoundError when I try to use this method. I have a feeling that I'm just doing something stupid.
    Thanks in advance,
    John

    Yes, exactly. I changed the name of that class and forgot to change it in the c code. Thanks for the feedback.
    Also, if anyone is using this code as an example, you need to change "agent.win32.MemoryInfo" to "agent/win32/MemoryInfo" in the c code. If it is left as "agent.win32.MemoryInfo" you will get a ClassCircularityError when trying to make multiple calls to the NIMSNT.GetSystemMemoryInfo();.

  • Error when trying to create new element in workflow container

    hi experts,
    I hit an error 'cusomer-own workflow are not allowed to be configure" when trying to create a new element in the container.
    have anybody come across this problem and how to overcome it
    TQ

    Aren't customer task not used anymore?
    Or am I mixing things up here.
    Well the problem isn't a problem it is SAP standard behaviour you simply can't configure customer tasks (type T in PFTC)
    You can only configure Standard Tasks (TS) or workflow templates (WS)
    Kind regards, Rob Dielemans
    Edited by: Rob Dielemans on May 29, 2009 12:51 PM
    Just had a look at the SAP help and indeed types T aren't allowed anymore SAP gives the solution to copy the customer task, this will automatically change it to a standard task

  • When trying to upload a MS word file (.docx) to gmail, it uploads into a folder that doesn't contain the original document when i try to download it from e-mail.  how do i solve this?

    when trying to upload a MS word file (.docx) to gmail, it uploads as a 'folder' that doesn't contain the original document when i try to download it back from the e-mail.  how do i set the format to simply upload the document itself???  Thanks...

    Yes, excuse me. attach a file.  I have separate folders on my desktop to organize my word documents, so I'm guessing this might be a part of the problem.  When I go to attach one of these documents into gmail, the resulting attachment is another folder icon (not the original organizational folders) with 4 subfolders containing a slew of .xml files reading things like "header.xml" "format.xml" "settings.xml" "style.xml" "contenttype.xml" There are also a few .jpegs and a small folder reading "word" as one of the subfolders.

  • Lost all photos on my iPhoto and get the ERROR WRITING TO DISK when trying to reload from Time Machine. iPhoto cannot import your photos because there was a problem writing to the volume containing your iPHOTO LIBRARY  . Looking for solution.

    Lost all photos on my iPhoto and get the ERROR WRITING TO DISK when trying to reload from Time Machine. iPhoto cannot import your photos because there was a problem writing to the volume containing your iPHOTO LIBRARY  . Looking for solution.

    Problems such as yours are sometimes caused by files that should belong to you but are locked or have wrong permissions. This procedure will check for such files. It makes no changes and therefore will not, in itself, solve your problem.
    First, empty the Trash, if possible.
    Triple-click anywhere in the line below on this page to select it, then copy the selected text to the Clipboard by pressing the key combination command-C:
    find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) 2>&- | wc -l | pbcopy
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). The command may take a noticeable amount of time to run. Wait for a new line ending in a dollar sign ($) to appear.
    The output of the command will be a number. It's automatically copied to the Clipboard. Please paste it into a reply.
    The Terminal window doesn't show the output. Please don't copy anything from there.

Maybe you are looking for

  • Link between SAP BW and SAP R/3

    Dear All, I am trying to connect BW to SAP R/3. Transaction SM59 – I have successfully create a connection between R3 and DW1. Create a ‘DT2CLNT600’ R3 client And Create a ‘DT2CLNT600’ R3 dialog with option ARFC. Transaction SPRO : I have add the Log

  • & in Like

    Hello All, I am trying to search a word like 'L&T' , But & is a lexical paramter it is asking mean to enter the value. so how to use like operator in this case. Thanks, Kumar.

  • What's with the crazy idea to use swipe for bookmarks?

    Web apps use swipe! See the android browser for a bookmarks example.

  • Changing song order in muvo tx

    I have a nano plus and a muvo tx fm, I really like the custom sort feature that allows you to arrange the order of songs played in the nano plus. Is there anyway to get that function for the muvo tx fm? They are pretty similar software except for tha

  • TTS(text to speech) right to left

    Hi I am currently tryign to format a TTS panel to read form right to left. I enter the text right click the boc and select right to left and hte text moves, but as soon as I click out of the box the text jumps back to left to right. I have tried diff