I don't know whether this is the correct place to report bugs, but I do
report it here,
and hopefully someone can point me to the correct place:
When I tried to build an ejb jar from files generated with xdoclet with appc
invoked as an ant task,
I noticed the following anomaly:
If weblogic.jar is not in the classpath environment variable when ant is
invoked, then appc does not
behave correctly. Two things were happening:
Either I received an error message about weblogic.i18n.J2EELogLocalizer
resource bundle not being found (when the
CLASSPATH environment variable was not empty, but did not contain the
weblogic.jar):
file:C:/clearcase/ramp_up_C4CTHC/modul/server/comp/AssessmentLoader/build.xml:106:
java.util.MissingResourceException: Can't find bundle for base name
weblogic.i18n.J2EELogLocalizer, locale en_US
or sometimes (when the CLASSPATH environment variable was non-existent) it
threw a bunch of error messages complaining
about:
>BUILD FAILED
>file:C:/clearcase/ramp_up_C4CTHC/modul/server/comp/AssessmentLoader/build.x
ml:10
>6: weblogic.utils.compiler.ToolFailureException: [J2EE:160121]Errors
encountered
>while compiling module
'C:\clearcase\ramp_up_C4CTHC\modul\build\deploy\Assessme
>ntLoader.jar':
>
>In EJB AssessmentLoaderDataHelper, the bean class must implement directly
or ind
>irectly the javax.ejb.SessionBean interface.
>
>In EJB AssessmentLoaderDataHelper, method remove() defined in the local
interfac
>e either does not exist in the bean class, or it is not a public method.
Each me
>thod in the local interface must have a corresponding public method in the
bean
>class.
>
>In EJB AssessmentLoaderDataHelper, method getEJBHome() defined in the local
inte
>rface either does not exist in the bean class, or it is not a public
method. Eac
>h method in the local interface must have a corresponding public method in
the b
>ean class.
>
>In EJB AssessmentLoaderDataHelper, method getPrimaryKey() defined in the
local i
>nterface either does not exist in the bean class, or it is not a public
method.
>Each method in the local interface must have a corresponding public method
in th
>e bean class.
>
>In EJB AssessmentLoaderDataHelper, method getHandle() defined in the local
inter
>face either does not exist in the bean class, or it is not a public method.
Each
> method in the local interface must have a corresponding public method in
the be
>an class.
>
>In EJB AssessmentLoaderDataHelper, method isIdentical(javax.ejb.EJBObject)
defin
>ed in the local interface either does not exist in the bean class, or it is
not
>a public method. Each method in the local interface must have a
corresponding pu
>blic method in the bean class.
> - with nested exception:
>[
>In EJB AssessmentLoaderDataHelper, the bean class must implement directly
or ind
>irectly the javax.ejb.SessionBean interface.
>
>In EJB AssessmentLoaderDataHelper, method remove() defined in the local
interfac
>e either does not exist in the bean class, or it is not a public method.
Each me
>thod in the local interface must have a corresponding public method in the
bean
>class.
>
>In EJB AssessmentLoaderDataHelper, method getEJBHome() defined in the local
inte
>rface either does not exist in the bean class, or it is not a public
method. Eac
>h method in the local interface must have a corresponding public method in
the b
>ean class.
>
>In EJB AssessmentLoaderDataHelper, method getPrimaryKey() defined in the
local i
>nterface either does not exist in the bean class, or it is not a public
method.
>Each method in the local interface must have a corresponding public method
in th
>e bean class.
>
>In EJB AssessmentLoaderDataHelper, method getHandle() defined in the local
inter
>face either does not exist in the bean class, or it is not a public method.
Each
> method in the local interface must have a corresponding public method in
the be
>an class.
>
>In EJB AssessmentLoaderDataHelper, method isIdentical(javax.ejb.EJBObject)
defin
>ed in the local interface either does not exist in the bean class, or it is
not
>a public method. Each method in the local interface must have a
corresponding pu
>blic method in the bean class.
>]
Now, when I put the weblogic.jar into the CLASSPATH variable, appc at last
has run correctly,
and generated the stub/skeleton files (emphasizing this so that it is
obvious, that there were no real
errors in the files).
I think the error may be that weblogic.appc invokes ejbc in a way, that the
classpath of appc is not passed in
to ejbc. This will work correctly, if weblogic.appc is invoked from command
line, or the server, in both case the
classpath environment variable usually contains the weblogic.jar.
However in ant, this is not necessarily the case, instead it is usually
passed as a -classpath parameter.
I suggest this to be investigated, because this is corrected, the appc ant
task is not entirely properly functioning.
The relevant parts of our build.xml is the following:
<property name="serverlib.dir" value="c:/bea/weblogic81/server/lib" />
<path id="compile.classpath">
<pathelement location="${serverlib.dir}/weblogic.jar" />
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${deploy.dir}" includes="**/*.jar"/>
</path>
<path id="tools.classpath">
<pathelement location="${serverlib.dir}/weblogic.jar" />
<fileset dir="${lib.dir}" includes="**/*.jar"/>
<fileset dir="${ant.home}/lib" includes="**/*.jar"/>
<fileset dir="${tools.dir}/lib">
<include name="**/*.jar"/>
</fileset>
</path>
<taskdef name="appc" classname="weblogic.ant.taskdefs.j2ee.Appc"
classpathref="tools.classpath"/>
<target name="appc" depends="jar" unless="uptodate">
<appc source="${deploy.dir}/${jar.name}"
classpathref="compile.classpath"/>
</target>
Regards,
Robert Varga
Methods remove(), getEjbHome(), getPrimaryKey(), getHandle() defined in the local
interface
do not have corresponding methods in the bean class.
Please read the whole post first, before you start reacting on it.
As I mentioned the classes do NOT contain an error. First, the interfaces
are generated
by xdoclet. Second, it compiles and the ejb-jar is properly generated, when
weblogic.jar
is in the CLASSPATH environment variable.
I do know what a session bean or other related classes should contain.
What I submitted is clearly a bug, because the ant task Appc behaves
differently depending on
the existence of a CLASSPATH variable, that should normally be passed on by
weblogic.appc,
because ant gives it to weblogic.ant.taskdefs.j2ee.Appc.
I even identified the probable place of error for them.
As to your post:
All these methods are generated by ejbc invoked by appc on a class which is
generated by the ejbc run.
These methods do not need to be declared on the remote or local interface,
since they extend an interface
which does declare them (EJBObject and EJBLocalObject). And they don't have
to be appearing on the
bean class.
And actually, no local interface at all was mentioned in the deployment
descriptors and no Local and LocalHome
files were there in the jar files. So the error message is misleading, too.
Regards,
Robert Varga
"Deepak Vohra" <dvoh...@yahoo.com> wrote in message
news:3f69ca20$1...@newsgroups.bea.com...
>
>
> Methods remove(), getEjbHome(), getPrimaryKey(), getHandle() defined in
the local
> interface
> do not have corresponding methods in the bean class.
>
> ...