Interfaces, impls, de/serialization

WebLogic 5.1
JDK 1.2.2_005
NT 4.0 SP5
Just a quick question about interfaces and implementation classes.
Assuming the following...
- interface IStartup
public String getStartupInfo();
- class StartupAdapter implements IStartup, java.io.Serializable
public String getStartupInfo() {
return "startup info";
- StartBean, stateless session bean
StartBean has a method called getStartup which returns IStartup like so:
public IStartup getStartup() {
return (IStartup) new StartupAdapter();
- client code (java application)
IStartup s = null;
String info = null;
/*session bean lookup/create
s = remote.getStartup();
info = s.getStartupInfo();
...does the client machine have to have StartupAdapter.class in the
classpath?

Argyn is right. I've worked on a remote application and i don't have the
implementation class on the client side. what i have is just the server
interface.
- Sam Jacob
Iconixx Corp.
Argyn Kuketayev <[email protected]> wrote in message
news:[email protected]..
No, you don't necessarily need to have StartupAdapter.class, because itmight
be sent serialized.
all your client need is an interface.
Sam Jacob wrote:
Java is strongly typed. Eventhough y're returning IStartup, behind the
scenes, it's actually an instance of StartupAdapter.
So you need to have the StartupAdapter class in the client's classpath.
Sam Jacob
Iconixx Corp.
Chip Morgan <[email protected]> wrote in message
news:8ilrl0$sga$[email protected]..
WebLogic 5.1
JDK 1.2.2_005
NT 4.0 SP5
Just a quick question about interfaces and implementation classes.
Assuming the following...
- interface IStartup
public String getStartupInfo();
- class StartupAdapter implements IStartup, java.io.Serializable
public String getStartupInfo() {
return "startup info";
- StartBean, stateless session bean
StartBean has a method called getStartup which returns IStartup like
so:
public IStartup getStartup() {
return (IStartup) new StartupAdapter();
- client code (java application)
IStartup s = null;
String info = null;
/*session bean lookup/create
s = remote.getStartup();
info = s.getStartupInfo();
...does the client machine have to have StartupAdapter.class in the
classpath?

Similar Messages

  • Interface sunw.io.Serializable Error

    Hi all,
    I am using Jdeveloper 10.1.3.3.0.3 and keep receiving the following error in my Control File when running my page:
    "Error(71,41): incompatible types; found: class java.lang.String, required: interface sunw.io.Serializable."
    Control File:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("HzPuiGoSearch") != null)
    String CustomerNumber = pageContext.getParameter("HzPuiCustomerNumber");
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    Serializable[] parameters = { CustomerNumber }; //Error Line
    am.invokeMethod("executeQuery", parameters);
    AMimpl File:
    public void executeQuery(String CustomerNumber)
    OAViewObject vod = (OAViewObject)getxxarSiteSearchVO1();
    vod.setWhereClauseParam(0, CustomerNumber);
    vod.executeQuery();
    Thanks in advanced!

    1- Make sure to include "java.io.Serializable" as part of yoru import block
    2- Change the following line
    FROM
    Serializable[] parameters = { CustomerNumber}
    TO
    Serializable[] parameters = new Serializable[] { CustomerNumber}
    HTH,
    Maher

  • Interface/Impl confusion

    I was just restructuring some of my code and I decided to extract interfaces out of some concrete
    classes. I'm not really expecting to have multiple impls for them, but I did it to reinforce thinking in interfaces and to have a good view over the class without having to look at implemntation details.
    Here's a Channel-interface I extracted (an abstraction to IRC-channel):
    public interface Channel {
         public void addChannelListener(ChannelListener listener);
         public void removeChannelListener(ChannelListener listener);
         public void send(String message);
         public void rejoin();
         public void leave();
         public void say(String text);
         public void ban(String nickOrAddress);
         public void unban(String nickOrAddress);
         public void kick(String nick);
         public void kick(String nick, String reason);
         public void invite(String nick);
         public void setInviteOnly(boolean enabled);
         public void setTopic(String topic);
         public Server getServer();
         public String getName();
         public String getKey();
         public String getTopic();
         public int getUserCount();
         public User[] getUsers();
         public boolean isConnected();
         public boolean containsNick(String nick);
    }Note that this is still an incomplete implementation and there'll be some more of these methods.
    Now, earlier I had a concrete Channel-class and it also had methods like this:
    public final void topicChanged(Message msg) {...}
    public final void messageReceived(Message msg) {...}
    public final void modeChanged(Message msg) {...}
    public final void nickChanged(Message msg) {...}
    public final void userJoined(Message msg) {...}I decided to leave them out of the public interface as they don't really belong there,
    since they are called only by the Server-class. The Server-class contains a list of Channel-objects.
    It is also the only class that creates new Channel-objects.
    So, only the Server-class calls the above methods of it's Channel-objects, when the server receives new messages (and determines they're channel-messages).
    I also extracted an interface for the Server, and the ServerImpl now casts the Channel-interfaces to ChannelImpls in some places, to be able to call the above leftover methods.
    Is this a bad idea? Does this break the 'Liskov substitution principle'? Do you have any better ideas? Maybe the Channel-class should do 'more work' itself?
    I personally don't feel it's that bad but i still get kind of dirty feeling of doing it this way.

    So th eChannel interface is the public interface for all others present
    in the system but your server needs a bit more functionality. Why not
    define another interface:interface ServerChannel extends Channel {
       // server specific methods here
    }and your ChannelImpl class:public class ChannelImpl implements ServerChannel { ... }Now the server treats these ChannelImpl objects as ServerChannels,
    while the rest of the world simply treats these objects as Channels.
    btw, you can build a Factory that builds the appropriate objects for the
    appropriate callers, e.g. a package scoped method for the server
    (which needs to be in the same package) and a public method for the
    rest of the world. The first object would return ServerChannels while
    the second method (the public one) would return Channels:[code
    public class ChannelFactory {
    ServerChannel makeServerChannel() { ... }
    public Channel makeChannel() { return makeServerChannel(); }
    kind regards,
    Jos

  • Interface based design and serialization

    Hi,
    I have an interface, base class that implements this interface and subclasses derived from base class that also implement this interface.
    I also have a method with this interface as an argument. My question is: how to do serialization of this argument in this method without using instanceof operator? Should interface extend Serializable and/or each class/subclass implement Serializable? Is it sufficient to just have common interface extend Serializable without classes/subclasses implementing it?
    Thanks,
    sale

    Hi,
    I have an interface, base class that implements this
    interface and subclasses derived from base class that
    also implement this interface.Not required. The subclass by default implements all interfaces implemented by the super class.
    ***every object of type base is also an object of type subclass but not ***vice versa, i.e. if we need an object of subclass then object of base ***will not do: every subclass object is a base object, but not vice versa
    I also have a method with this interface as an
    argument. My question is: how to do serialization of
    this argument in this method without using instanceof
    operator? Should interface extend Serializable and/or
    each class/subclass implement Serializable? Is it
    sufficient to just have common interface extend
    Serializable without classes/subclasses implementing
    it?Yes, making your interface extend Serializable would do, if you are sure
    that all implementations of the interface
    should be serializable. The implementation classes should, ofcourse have all data members serializable (primitive data types and/or serializable objects)
    It would also be a good idea to have the method throw NotSerializableException.
    *** So if I receive as an argument object of type subclass XYZ and ***assuming all implementations ARE serializable, then can I serialize ***this hierarchy by using reference of the interface received as ***parameter in this method?

  • EJB 3.0 local interface JNDI

    Hello
    I found some information that will probably help a lot of people having trouble with local interface not referenced in JNDI.
    You need to delacre each local interface in the web.xml.
         <ejb-local-ref>
              <ejb-ref-name>MappedNameInYourEJB</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
    <local> yourLocalInterface
              </local>
         </ejb-local-ref>
    The weird thing about this is you don't need to do it when you use remote interface!! I would have thought Weblogic was smart enough to put your EJB in the JNDI when you declare @local on your interface!!
    Am I wrong with something here?
    When I read the EJB spec, it says you don't need to declare your EJB anywhere when you use annotation....
    If someone have an explanation I would be very happy to read about it!!!!
    Tanx

    Hi,
    In our current impl, we don't bind local business interface impl onto global jndi, this is because adding global JNDI binding for local EJB means every local business interface object must be bound into global JNDI, which will give rise to strange errors when accessing remotely or in different application context.
    On the other hand, you needn't add each local interface in the web.xml, you can use annotation through EJB link, which is the suggested way to use EJB local reference, for example:
    @Stateful(name="AccountManagementBean")
    public class AccountManagementBean
    @EJB(
    name="PersonBeanRef",
    beanName="PersonBean"
    Person person;
    @Stateless(name="PersonBean")
    public class PersonBean implements Person {
    In this example, AccountManagementBean has a local reference of PersonBean, the key is you should use beanName in @EJB, whose value is the ejb name of referenced EJB.

  • Compilation Error: "class or interface expected" for simple EAR???

    Dear all,
    I have access to the customers NW CE 7.1 SP07 and of course I am using the corresponding NWDS 7.1 SP07 that comes with this CE installation. I am trying to study JEE 5 @ SAP and I have created a very simple Application (from the Book http://www.sap-press.de/katalog/buecher/titel/gp/titelID-1480).
    In NWDS I have created the following 4 projects:
    1. Dictionary Project
    Describes 2 Tables (TMP_EMPLOYEES and TMP_ID_GEN)
    2. EJB 5 Project
    Contains a stateless EJB + local business interface + Entity class.
    The EJB accesses the entity class, which is mapped to a simple table (TMP_EMPLOYEES).
    3. Dynamic Web Project
    Contains actually only one JSP (index.jsp) which allows to the local business interface for creating a new Entity.
    4. Enterprise Application Project (EAR)
    Creates a package from 2. and 3.
    I have successfully deployed both the Dictionary Project and the EAR (all to the same server).
    But If I call the corresponding URL via web browser I get the following error:
    500   Internal Server Error
    "Error in compiling [/EmployeeWeb/index.jsp] in application [sap.com/EmployeeEar]."
    Details: "The WebApplicationException log ID is [005056841108002A00000070000007AC0139C8D8862D3EED]."
    In the "Log Viewer" of the "SAP NetWeaver Administrator" (via browser...) I have found the following:
    Message: Processing HTTP request to servlet [jsp] finished with error.
    The error is: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.CompilingException: Error in executing the compilation process: [ Compilation Failed! Exit Code=1
    Command line executed: D:\usr\sap\CED\J00\exe\sapjvm_5\bin\\javac -source 1.5 -target 1.5 -encoding UTF-8 -d "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work" -sourcepath "D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\;" -classpath ".;D:\usr\sap\CED\J00\exe\jstartup.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\jvmx.jar;D:\usr\sap\CED\J00\exe\jre\lib\iqlib.jar;D:\usr\sap\CED\J00\exe\sapjvm_5\lib\tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\sap.com~tc~bl~jkernel_boot~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\jaas.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\boot\memoryanalyzer.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jperflib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\jta.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~bytecode~library.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~cache_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~frame~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~gui~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~iqlib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jdsr~jdsr.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cache~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_classload~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_cluster~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_configuration~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_database~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_licensing~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_locking~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_log~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_pool~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_service~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_thread~frame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~jkernel_util~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~bl~opensqlkernel~implOpenSQLFrame.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~je~sessionmgmt~api_assembly.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\sap.com~tc~logging~java~implPerf.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\system\vmc_storage_provider.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\timeout\sap.com~tc~je~timeout~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\servlet\servlet.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\cross_api\sap.com~tc~je~cross_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~config~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~cpt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~jarm~jarm.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~bl~opensqlkernel~implOpenSQLPort.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~dd~db~dictionarydatabase~implDictionaryDatabase.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~je~bootstrap_core_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\core_lib\sap.com~tc~sec~secstorefs~java~core.jar;D:\usr\sap\CED\J00\exe\mssjdbc\sqljdbc.jar;D:\usr\sap\CED\SYS\global\security\lib\engine\iaik_jce.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\log\sap.com~tc~je~log_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\mail.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\sap.com~tc~je~javamail_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\activation.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_jsse.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_smime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\iaik_ssl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\mail-activation-iaik\w3c_http.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.api.sda\sap.com~tc~sec~ume~perm~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\security_api\sap.com~tc~je~security_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\shell\sap.com~tc~je~shell_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\cross\sap.com~tc~je~cross~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\visual_administration\sap.com~tc~bl~visual_administration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\shell\sap.com~tc~je~shell~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\p4\sap.com~tc~je~p4~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sapxmltoolkit\sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jts\jts.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~jmx\sap.com~tc~bl~pj_jmx~Impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~mmodel~lib\sap.com~tc~je~mmodel~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\appcontext_api\sap.com~tc~je~appcontext_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\naming\sap.com~tc~je~naming~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\j2eeca\connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\idl\idl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourceset_api\sap.com~tc~bl~resourceset~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\resourcecontext_api\sap.com~tc~bl~resourcecontext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~txmanager~plb\sap.com~tc~bl~txmanagerimpl~plb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\transactionext_api\sap.com~tc~bl~transactionext~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ts\sap.com~tc~je~ts~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\csiv2_api\sap.com~tc~bl~csiv2~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\iiop\sap.com~tc~je~iiop~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\file\sap.com~tc~je~file~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.tc.Logging\sap.com~tc~logging~standard~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~bcanalysis\sap.com~tc~je~bcanalysis~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~reference_graph\lib\tc~bl~reference_graph_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\container_api\sap.com~tc~je~container_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\webservices\sap.com~tc~je~webservices_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.util.monitor.jarm\sap.com~tc~bl~jarmsat~jarmsat.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~verify~intf\sap.com~tc~i18n~verify~intf~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cp\sap.com~tc~i18n~cp~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~decfloat\sap.com~tc~i18n~decfloat~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~com.sap.conn.jco\sap.com~tc~bl~jco_sapj2ee~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.mw.jco\sap.com~tc~bl~jrfc~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\keystore_api\sap.com~tc~je~keystore_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~certrevoc~interface\sap.com~tc~sec~certrevoc~interface~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~https~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~compat~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~ssf~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~jaas~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~saml~toolkit~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~csi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~util0~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~xmlbind~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\security.class\sap.com~tc~sec~destinations~lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.guid\sap.com~tc~bl~guidgenerator~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\jsr173_1.0_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\stax_api\sjsxp.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-xjc.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxb20\jaxb-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\saaj13\saaj-impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jaxws_api\jaxws-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jws_api\jsr181-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~annotation~api\annotation-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\compilation_lib\sap.com~tc~bl~compilation~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\sap.com~tc~bl~base_webservices_lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxm-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxrpc-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxr-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-rt.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~base_webservices_lib\jaxws-tools.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~j2eedescriptors~lib\sap.com~tc~je~j2eedescriptors~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~ejb~metadata~model\lib\sap.com~tc~bl~ejb~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\javax~persistence~api\persistence-api-1.0.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbormapping_api\sap.com~tc~je~ejbormapping_api~API.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~orpersistence~metadata~model\sap.com~tc~bl~orpersistence~metadata~model.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~util.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlin~core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ear.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~connector.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~web.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~ejb.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~appclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jlinee~lib\sap.com~tc~jtools~jlinee~orpersistence.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\deploy\sap.com~tc~je~deploy~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx_notification\sap.com~tc~je~jmx_notification~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\runtimeinfo\sap.com~tc~je~runtimeinfo~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\jmx\sap.com~tc~je~jmx~impl~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\http\sap.com~tc~je~httpserver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~exprlang~plb\jee5_el.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jstl\jstl-1_2.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~injection~lib\lib\private\tc~je~injection.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\ec~java~jsf~tld.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-beanutils.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-collections.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-digester.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\com-sun-commons-logging-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ec~java~jsf\lib\private\ec~java~jsf_core.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~je~jacc~plb\jacc-1_1-fr-class.zip;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\classpath_resolver\sap.com~tc~je~classpath_resolver~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.ip.basecomps\sap.com~tc~bl~basecomps~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sdo\lib\sap.com~sdo~api~extension.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb_api\ejb-3_0-api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\webservices_lib\sap.com~tc~je~webservices_lib~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~saptimezone\sap.com~tc~i18n~saptimezone~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~i18n~cpbase\sap.com~tc~i18n~cpbase~jar~IMPL.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~core~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.security.core.sda\sap.com~tc~sec~ume~tpd~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jms.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\jms\jmsclient.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\com.sap~tc~je~jmsapi\sap.com~tc~je~jmsapi~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\userstore\sap.com~tc~je~userstore~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~SL~utility\sap.com~tc~bl~sl~utility~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\com.sap.exception\sap.com~tc~exception~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc~bl~jarsap~sda\sap.com~tc~bl~jarsap~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~bl~deploy_api\sap.com~tc~bl~deploy~api.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\tc.httpclient\sap.com~tc~clients~http~all.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~sec~destinations~interface\sap.com~tc~sec~destinations~interface_api~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\endpoint_api\sap.com~tc~bl~endpoint~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\connector\sap.com~tc~je~connector~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\antlr\sap.com~tc~antlr~runtime.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\dbpool\sap.com~tc~je~dbpool~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~sec~destinations~provider\sap.com~tc~sec~destinations~provider~java~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\com.sap.security.core.ume.service\sap.com~tc~sec~ume~service~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sap.com~tc~je~constants~lib\lib\tc~je~constants.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\schemaprocessor~srv\sap.com~tc~je~schemaprocessor.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\tc~je~webcontainer~api\sap.com~tc~je~webcontainer~webcontainer_api_impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\servlet_jsp\sap.com~tc~je~webcontainer~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\objectProfiler\sap.com~tc~bl~objectProfiler~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\tc~je~cachemgmt~srv\sap.com~tc~je~cachemgmt~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\locking\sap.com~tc~je~locking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\configuration\sap.com~tc~je~configuration~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\sap.com~tc~je~basicadmin~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupapi.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\basicadmin\jstartupimpl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\adminadapter\sap.com~tc~je~adminadapter~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\security\sap.com~tc~je~security~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\applocking\sap.com~tc~je~applocking~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejb20\ejb20.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\ejbqlparser\sap.com~tc~bl~ejbqlparser_3_0~lib.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implCommonSQLMapper.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\sqlmapper\sap.com~tc~bl~ejbsqlmapper~implSQLMapperAPI.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\interfaces\ejbmonitor_api\sap.com~tc~bl~ejbmonitor~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\services\ejb\sap.com~tc~je~ejb~impl.jar;D:\usr\sap\CED\J00\j2ee\cluster\bin\ext\orpersistence_client_lib\lib\orpersistence_client_lib_api.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\orpersistence\jars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\EJBContainer\applicationjars\EmployeeEjb.jar;D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work;;" -nowarn -g ["D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java"]
    Error stream contains:"D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:16: 'class' or 'interface' expected
    import javax.servlet.*;
    ^
    D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:17: 'class' or 'interface' expected
    import javax.servlet.http.*;
    ^
    D:\usr\sap\CED\J00\j2ee\cluster\apps\sap.com\EmployeeEar\servlet_jsp\EmployeeWeb\work\JEE_jsp_index_8832250_1231538390011_1231538444324.java:18: 'class' or 'interface' expected
    import javax.servlet.jsp.*;
    ^
    3 errors
    "].005056841108002A00000070000007AC0139C8D8862D3EED Date: 2009-01-09 Time: 23:00:45:042 Category: /System/Server/WebRequests Location: com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl Application: sap.com/EmployeeEar Thread: HTTP Worker [4] Data Source: j2ee\cluster\server0\log\system\server_00.log Correlator ID: 88322500000038637 Argument Objects: Arguments: DSR Component: n.a. DSR Transaction: 10c493a0de9311dd9631005056841108 DSR User: Message Code: Session: 979 Transaction: User: Guest Host: IMGNWCED System: CED Instance: J00 Node: server0
    As you can see there is some compilation error, it says 3 times "'class' or 'interface' expected". If i remove all the relevant EJB java code from my index.jsp everything works fine. So I guess there must be some problem with finding the resources. Unfortunately this "logging" is not helpful at all (thank you SAP!). In NWDS everything is fine no problems at all!!!
    Who can help me here with this?
    Thanks in Advance

    I have found the issue.
    in the index.jsp I have the following lines:
    <!-- Import Statements -->
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="com.sap.demo.session.EmployeeServicesLocal;" %>
    Now check the end of the second import ==> ;
    Removing the semicolon solves the issue. But the SAP error message is still not very helpful to me.

  • Differences between the serializable and externizable

    please give me

    Recently i gathered information
    serializable:
    is the super interface for the externalizable.
    during deserialization, it doesnot call the construtor.
    it follows the stored bits retrieval concept.
    this is the marker interface.
    externalizable:
    extends serializable.
    uses the constructor during the deserialization
    contains two methods:writeExternal(),readExternal()
    Cheers
    Kurakula Sudhakar Reddy(Sudha).

  • Multiple inheritance in tagging interface? Is it possible?

    I saw a code somewhere that goes like this:
    public interface Node extends Serializable, Clonable
    ...Is it possible? I know that Java doesn't allow multiple inheritance and that Serializable and Clonable are tagging interfaces where no method must be implemented by the programmer.

    KamenRiderZX wrote:
    I know that Java doesn't allow multiple inheritanceMore exactly: Java doesn't allow multiple inheritance of implementations. Inheriting multiple interfaces ("implements" for classes, "extends" for interfaces) is fine 'though.

  • Compiling interfaces

    Hi,
    I have an interface Compute.java
    package compute;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface Compute extends Remote {
    Object executeTask(Task t) throws RemoteException;
    Also there is one more interface in the same package "Task.java".
    package compute;
    import java.io.Serializable;
    public interface Task extends Serializable {
    Object execute();
    Now these two files are placed in compute directory whose path is
    C:\sharvan\src\compute
    I tried compiling Compute.java interface using the follwing command
    C:\Myjava\mine\sharvan\src> javac compute/Compute.java
    But ended up getting the following error
    compute/Compute.java:7: cannot resolve symbol
    symbol : class Task
    location : interface compute.Compute
    Object executeTask(Task t) throws RemoteException;
    I downloaded these interface files from RMI trail in the Java tutorial.
    Any idea how to rectify this error.
    Thanks,
    sharvan

    sharvan,
    MAHIM_MISHRA's comments are incorrect. The order in which you compile the classes is irrelevant when using javac.
    The problem is that your src directory is not on your compile-time classpath or sourcepath. The fact that Task.java is in the same directory as Compute.java is irrelevant if that directory cannot be found by searching the classpath.
    For now, use the following command line to compile:
    C:\Myjava\mine\sharvan\src> javac -classpath . compute/Compute.java
    Then look up classpath and sourcepath in your Java books and online. Search these forums and you'll find plenty of old threads about it.

  • Serialization exception in RMI

    I have a GameServerImp remote class:
    HashMap clients;
    HashMap versus;
    public GameServerImp() throws RemoteException
    clients =new HashMap();
    versus =new HashMap();
    public void register(String name,GameClientInt c) throws RemoteException
    clients.put(name,c);
    these are its functions.
    I have a client :
    public class BI implements GameClientInt{
    public BI()
    I have following code invoking the register method.
    1 mainServer = (GameServerInt)Naming.lookup("rmi://localhost:1099/gameservice");
    2 mainServer.register(name,new BI());
    when 2 line executes it gives exception:
    java.rmi.MarshalException: error marshalling arguments; nested exception is:
    java.io.NotSerializableException: BI
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:179)
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
    at $Proxy0.register(Unknown Source)
    There is nothing related to io :(. I cant figure out why it is happening.

    Hi,
    Please user for posting sample code
    Does this interface  GameClientInt extends Serializable? if not can you do that and try again
    Regards,
    Alan Mehio
    London,UK                                                                                                                                                                                                                                                                                                                                                           

  • Implementation of java.lang.Serializable writeObject()

    Hi,
    Who (what class) provides the implementation for writeObject() and readObject() for java.lang.Serializable Interface?
    And in general for these Interfaced (Somewhere called Marker Interface), how does the implementation applies?
    How do they distinguished from other Interfaces?

    >
    Who (what class) provides the implementation forwriteObject() and readObject() for
    java.lang.Serializable Interface?
    And in general for these Interfaces (Somewhere called
    Marker Interface), how does the implementation
    applies?
    How do they distinguish from other Interfaces?
    The Serializable interface is a marker interface because it doesn't require the programmer to implement any methods whasoever, so the syntax:
    class MyClass implements Serializable { }
    is perfectly legal.
    This just tells the compiler that al objects of type MyClass will be serializable. No class provides the implementations for readObject() and writeObject(), you'll have to do that yourself. Or, more exactly, it is (strongly) recommended to do that, if you want to control what is and isn't serialized (you may have sensitive members in your class, that you don't want to be serialized!)
    Ok, these 2 methods are defined somewhere (I don't have the Java Serialization specification with me right now :( ), you have to implement them to give you better control of what's going on. Inside these methods you'l want to use the readObject() and writeObject() methods of other types).
    I'll come back later with a full example.
    Yuo may want ot check out the Java Serialization Specification (available for download on the Sun website)

  • Question on AM Client Interface

    Hello gurus,
    I want to understand , what happens behind the screens , when an AM method is exposed via client interface. The reason being , I want to handle the following scenario :
    1) I need to add one of the webservice method to the AM client interface programatically.(the usecase doesnot want to go with the Webservice DC approach)
    2) I need to handle all of the added method calls via one API like the invokeMethod API of the AMimpl class.
    3) By doing the above, I could reuse the existing mechanism of DnD of AM methods onto the jspx pages.I could take care of the handling in the AMImpl custom class by calling the appropriate WS method.
    The reason being this: I have a repository of schema which I can look up at runtime to call teh appropriate webservice methods.
    Towards this , I tried manually populating the AM class with the client interface and also the AM interface/impl class with the method.But the method does not show up in the Datacontrol palette.
    But if I go with the overview editor , to add the client interface to the methods, the method shows up in the DC.
    Is there something additional happening to get the method added to the DC? how is this information persisted?
    Appreciate your early response,
    Vishal

    mes is a reference that points to an instance of a concrete class that implements Map.Entry.
    It's the same as this:
    List list = new ArrayList();List is an interface, but ArrayList is a concrete class that implements it.

  • EJB3 Stateful Sessionbean how to implement multi business interfaces?

    Hi All,
    I met up some issue, can't make the session bean implement 2 business interfaces? Please kindly throw me some light! thanks
    Business sessionbean
    @Stateful
    @ConversationScoped
    @Named
    @Local( { IWizard.class, IRegisterWizard.class })
    public class RegisterWizard extends WizardBean {
    @Local
    public interface IWizard extends Serializable {
            public String back();
            public boolean hasBack();
            public boolean hasNext();
            public String next();
            public String abort();
    @Local
    public interface IRegisterWizard{
            public String submit();
    }error message of glassfish3 below:
    Caused by: java.lang.IllegalArgumentException: Not enough type information to resolve ejb for  ejb name class wizard.RegisterWizard
            at org.glassfish.weld.services.EjbServicesImpl.resolveEjb(EjbServicesImpl.java:121)
            at org.jboss.weld.bean.SessionBean.createReference(SessionBean.java:422)
            at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.<init>(EnterpriseBeanProxyMethodHandler.java:76)
            at org.jboss.weld.bean.SessionBean.create(SessionBean.java:298)
            ... 53 more

    There does appear to be a bug in the handling of the bean with multiple business interfaces. I filed an issue for it :
    https://glassfish.dev.java.net/issues/show_bug.cgi?id=11826. The inheritance is a separate issue. Are you getting the same error or a different one after applying @LocalBean.

  • Client can't access Serializable classes on Server

    Hi there, i have created a very simple client server model and had it running fine. I then added a new serializable class to the server and return it in a new method. Now when i try to run that method on the client side it complains it cannot find my new serializable class ("no class def found exception: rmi/server/ServerObject.class"). This is how it's setup at the moment:
    Server
    -ServerFront extends Remote
    -Server implements ServerFront
    -ServerObject implements Serializable
    The server binds itself to the registry as such:
    ServerFront engine = new Server();
    String name = "Server";
    ServerFront stub = (ServerFront)UnicastRemoteObject.exportObject(engine, 0);
    Registry registry = LocateRegistry.getRegistry();
    registry.rebind(name, stub);The ServerObject class looks like this:
    public class ServerObject implements Serializable
        private static final long serialVersionUID = 10L;
        //methods
    }The ServerFront interface has a method as such:
    ServerObject getServerObject () throws RemoteException;    Client
    -Client
    The client gets a reference to the server as follows:
    String name = "Server";
    Registry registry = LocateRegistry.getRegistry("127.0.0.1");
    server = (ServerFront)registry.lookup(name);Then tries to run the getServerObject() method:
    ServerObject = server.getServerObject();I run the client and server from jar files using the following commands:
    start java -Djava.rmi.server.codebase="http://www.xenwars.com/Server.jar" -Djava.security.policy=security.policy -jar Server.jar
    java -Djava.security.policy=security.policy -jar Client.jar"security.policy" allows all access, and the codebase URL points to my webserver where i uploaded an identical copy of the Server jar file that i'm trying to run.
    So... i've read all the Sun documentation and such and i'm massively confused why my client isn't simply downloading the serializable class as it's supposed to. Any help is massively appreciated, thanks :D
    Edited by: Aldarn on Feb 8, 2009 10:03 AM
    Edited by: Aldarn on Feb 8, 2009 10:05 AM

    By a mirrored interface i mean i just created an interface based off my existing serializable classes, i.e. copied the method constructors into an interface class and made the serializable class implement that interface.
    I think that must have been the problem then, that i wasn't giving the client an interface to the serializable classes on the server that it was attempting to download. I thought by using RMI on a serializable class it would just download that class when it needs it and so wouldn't need an interface pre-defining it.
    Thanks for the help! I'm now working on a system with 3 servers and one client, where two servers have various methods implemented and the third one acts as a bridge between the other two servers and the client - so the client only has to deal with one server. It's working fine but it's pretty annoying having to mirror all the methods from both servers' interface classes in the server that acts as a bridge's interface class - is there any way that the bridge server can inherit the other two servers interfaces into its own so i don't need to make loads of duplicate "shell" methods like this:
    // second server
    public ArrayList<Thing> getAllThings ()
        return things;
    // bridge server
    private SecondServerFront secondServer; // reference loaded in constructor
    public ArrayList<Thing> getAllThings () throws RemoteException
        return secondServer.getAllThings();
    }  

  • Can Vector contain ResultSet which is a Interface

    What i am trying is to execute 3 different SQL in a Bean and try it to transfer in a JSP.I am using Vector for this work.I am putting the ResultSet in the Vector and transfer that Vector to the Jsp,In which i am displaying the Result.
    I wanted to know that Is it possible to do the thing in this way.Or some other way is there.
    Could any one tell me the Solution.

    May be I 'm wrong, but the objets implementing the ResultSet interface
    must be serializable and have a public default constructor if you want
    to serialize/deserialize them. I don't think the most know drivers
    are offering you these features.
    Even if it's feasible, I don't think serializing a whole data set is
    really a good idea, because of the big overhead of doing this.
    You'd better convert the resultSet into smaller objects and
    only pass a set of them to your jsp only under request,
    not the whole thing once.
    Hope this helps

Maybe you are looking for

  • Inspection Lot Not Triggered for STO - One Plant to other Plant in same Company

    Dear SAP Gurus, We have a scenario of STO for one plant to other plant with in the same company code. The process is being followed as follows ; 1. We create stock transfer by creating P.O thru ME21N 2. Create Outbound delivery thru VL10B 3. Doing PG

  • ITunes won't sync all of my music to iPhone 4s

    iTunes won't sync all of the music, it is skipping random songs, they still come up on the Music on the phone but cannot be played.. If anyone knows how to fix this please help.

  • Log4j is not picking up an appender

    I configured a logger "mailLogger" in the properties file, and I defined an appender "mail". In the code, I get the logger by name, and list all the appenders. It tells me there are no appenders. Shouldn't the "mail" appender be added by putting it i

  • Single vendor multiple currency

    Dear Experts,                          i am having a problem,  a single vendor will supply a material  both in INR and USD, but in vendor code i mentioned in INR , please help how to solve this issue. regards rajakarthik

  • XI Sizing Guide scenarios

    Hi, I need to baseline our hardware using the scenarios described in the XI Sizing Guide before testing the performance of our own integration scenarios. Would you know where are available the design packages of the integrations used for the XI Sizin