Hi All

I am stuck in this strange problem


===================================================================================
package com.xxx.cure.server;

import javax.ejb.*;
import java.rmi.RemoteException;
import javax.naming.*;
import com.xxx.cure.exceptions.*;
import com.xxx.cure.commandbeans.*;

/**
 * CommandServerBean is a CommandServer which accepts Command Beans from the Client
 * call their execute method and returns back the result.
 *
 * @ejb:bean
 *     type="Stateless"
 *     name="server/CommandServer"
 *     local-jndi-name="CommandServerLocalHome"
 *     view-type="both"
 *
 */

public class CommandServerBean implements SessionBean {

        SessionContext ctx;     

  public void CommandServer() {
  }

/**
   *  The method that executes command bean.
   *
   *  @param Command inCommingCommand
   *
   *  @throws CommandException
   *  @ejb:interface-method view-type="remote"
*/

public Command executeCommand(Command aCommand) throws CommandException
{
    try
    {
        aCommand.execute();
    }
    catch (CommandException e)
    {
        ctx.setRollbackOnly();
        throw e;
    }

    return aCommand;

}
    public void ejbActivate() throws EJBException,
        java.rmi.RemoteException
    {
    }
    public void ejbCreate() throws CreateException {

           }
    public void ejbPassivate() throws EJBException,
        java.rmi.RemoteException
    {
    }
    public void ejbRemove() throws EJBException,
        java.rmi.RemoteException 
    {
    }
    public void setSessionContext(final SessionContext p1)
    throws EJBException, java.rmi.RemoteException {

            this.ctx = p1;
    }
}
===================================================================================

classes generated:
CommandServer.java CommandServerHome.java CommandServerLocal.java 
CommandServerLocalHome.java

===================================================================================
Errors

compile:
    [javac] Compiling 25 source files to C:\fnol\build\classes
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServer.java:9: du
plicate class: com.xxx.cure.server.CommandServer
    [javac] public interface CommandServer
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:9
: duplicate class: com.xxx.cure.server.CommandServerHome
    [javac] public interface CommandServerHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocal.java:
9: duplicate class: com.xxx.cure.server.CommandServerLocal
    [javac] public interface CommandServerLocal
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:9: duplicate class: com.xxx.cure.server.CommandServerLocalHome
    [javac] public interface CommandServerLocalHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\Policy.java:9: duplicate
 class: com.xxx.cure.server.Policy
    [javac] public interface Policy
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:9: dupli
cate class: com.xxx.cure.server.PolicyHome
    [javac] public interface PolicyHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocal.java:9: dupl
icate class: com.xxx.cure.server.PolicyLocal
    [javac] public interface PolicyLocal
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:9:
duplicate class: com.xxx.cure.server.PolicyLocalHome
    [javac] public interface PolicyLocalHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:1
2: modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Co
mmandServer";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:1
3: modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="server/CommandServer";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:12: modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Co
mmandServerLocal";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:13: modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="CommandServerLocalHome";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:12: modi
fier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Po
licy";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:13: modi
fier public static not allowed here
    [javac]    public static final String JNDI_NAME="server/Policy";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:12:
 modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Po
licyLocal";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:13:
 modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="PolicyBeanLocalHome";
    [javac]                               ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:16: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]     private CommandServerHome serverHome;
    [javac]             ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:24: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]                 this.serverHome = (CommandServerHome) PortableRemote
Object.narrow(obj, CommandServerHome.class );
    [javac]                                    ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:24: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]                 this.serverHome = (CommandServerHome) PortableRemote
Object.narrow(obj, CommandServerHome.class );
    [javac]
                   ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:36: cannot
 resolve symbol
    [javac] symbol  : class CommandServer
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]             CommandServer aCommandServer = serverHome.create();
    [javac]             ^
    [javac] 20 errors

BUILD FAILED
file:C:/fnol/antbuild/build.xml:153: Compile failed; see the compiler error outp
ut for details.

Total time: 7 seconds
C:\fnol\antbuild>
=======================================================================

Hi All

I am stuck in this strange problem


===================================================================================
package com.xxx.cure.server;

import javax.ejb.*;
import java.rmi.RemoteException;
import javax.naming.*;
import com.xxx.cure.exceptions.*;
import com.xxx.cure.commandbeans.*;

/**
 * CommandServerBean is a CommandServer which accepts Command Beans from the Client
 * call their execute method and returns back the result.
 *
 * @ejb:bean
 *     type="Stateless"
 *     name="server/CommandServer"
 *     local-jndi-name="CommandServerLocalHome"
 *     view-type="both"
 *
 */

public class CommandServerBean implements SessionBean {

        SessionContext ctx;     

  public void CommandServer() {
  }

/**
   *  The method that executes command bean.
   *
   *  @param Command inCommingCommand
   *
   *  @throws CommandException
   *  @ejb:interface-method view-type="remote"
*/

public Command executeCommand(Command aCommand) throws CommandException
{
    try
    {
        aCommand.execute();
    }
    catch (CommandException e)
    {
        ctx.setRollbackOnly();
        throw e;
    }

    return aCommand;

}
    public void ejbActivate() throws EJBException,
        java.rmi.RemoteException
    {
    }
    public void ejbCreate() throws CreateException {

           }
    public void ejbPassivate() throws EJBException,
        java.rmi.RemoteException
    {
    }
    public void ejbRemove() throws EJBException,
        java.rmi.RemoteException 
    {
    }
    public void setSessionContext(final SessionContext p1)
    throws EJBException, java.rmi.RemoteException {

            this.ctx = p1;
    }
}
===================================================================================

classes generated:
CommandServer.java CommandServerHome.java CommandServerLocal.java 
CommandServerLocalHome.java

===================================================================================
Errors

compile:
    [javac] Compiling 25 source files to C:\fnol\build\classes
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServer.java:9: du
plicate class: com.xxx.cure.server.CommandServer
    [javac] public interface CommandServer
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:9
: duplicate class: com.xxx.cure.server.CommandServerHome
    [javac] public interface CommandServerHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocal.java:
9: duplicate class: com.xxx.cure.server.CommandServerLocal
    [javac] public interface CommandServerLocal
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:9: duplicate class: com.xxx.cure.server.CommandServerLocalHome
    [javac] public interface CommandServerLocalHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\Policy.java:9: duplicate
 class: com.xxx.cure.server.Policy
    [javac] public interface Policy
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:9: dupli
cate class: com.xxx.cure.server.PolicyHome
    [javac] public interface PolicyHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocal.java:9: dupl
icate class: com.xxx.cure.server.PolicyLocal
    [javac] public interface PolicyLocal
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:9:
duplicate class: com.xxx.cure.server.PolicyLocalHome
    [javac] public interface PolicyLocalHome
    [javac]        ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:1
2: modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Co
mmandServer";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerHome.java:1
3: modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="server/CommandServer";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:12: modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Co
mmandServerLocal";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\CommandServerLocalHome.j
ava:13: modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="CommandServerLocalHome";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:12: modi
fier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Po
licy";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyHome.java:13: modi
fier public static not allowed here
    [javac]    public static final String JNDI_NAME="server/Policy";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:12:
 modifier public static not allowed here
    [javac]    public static final String COMP_NAME="java:comp/env/ejb/server/Po
licyLocal";
    [javac]                               ^
    [javac] C:\fnol\build\generate\com\xxx\cure\server\PolicyLocalHome.java:13:
 modifier public static not allowed here
    [javac]    public static final String JNDI_NAME="PolicyBeanLocalHome";
    [javac]                               ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:16: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]     private CommandServerHome serverHome;
    [javac]             ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:24: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]                 this.serverHome = (CommandServerHome) PortableRemote
Object.narrow(obj, CommandServerHome.class );
    [javac]                                    ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:24: cannot
 resolve symbol
    [javac] symbol  : class CommandServerHome
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]                 this.serverHome = (CommandServerHome) PortableRemote
Object.narrow(obj, CommandServerHome.class );
    [javac]
                   ^
    [javac] C:\fnol\com\xxx\cure\commandrouter\EJBCommandTarget.java:36: cannot
 resolve symbol
    [javac] symbol  : class CommandServer
    [javac] location: class com.xxx.cure.commandrouter.EJBCommandTarget
    [javac]             CommandServer aCommandServer = serverHome.create();
    [javac]             ^
    [javac] 20 errors

BUILD FAILED
file:C:/fnol/antbuild/build.xml:153: Compile failed; see the compiler error outp
ut for details.

Total time: 7 secon
C:\fnol\antbuild>
=======================================================================

build file
<target name="xdoclet-generate" depends="init"> 
        <mkdir dir="${build.generate.dir}" /> 
        <ejbdoclet 
                destdir="${build.generate.dir}" 
                excludedtags="@version,@author" 
                ejbspec="${ejb.version}" 
                mergedir="${src.resources.dir}/xdoclet" 
                force="${xdoclet.force}" 
        > 
                <fileset dir="${src.main.dir}"> 
                        <include name="**/*Bean.java"/> 
                </fileset>
                <remoteinterface/> 
                <localinterface/> 
                <homeinterface/> 
                <localhomeinterface/> 
                <entitypk/> 
                <entitycmp/> 
                <deploymentdescriptor destdir="${build.meta-inf.dir}"/> 
        </ejbdoclet> 
</target> 

<target name="compile" depends="xdoclet-generate"> 
        <mkdir dir="${build.classes.dir}"/> 
        <javac srcdir="${src.dir}" 
                destdir="${build.classes.dir}" 
                debug="on" 
                deprecation="on" 
                classpathref="build.path" 
                optimize="off" 
                includes="**/*.java"> 
                <src path="${src.dir}"/> 
                <src path="${build.generate.dir}"/> 
        </javac> 
</target> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to