"PeterJ" wrote : That might work. Basically, if you create an EJB3, then the
JAR file should contain the local and remote interface classes and the
implementation class. The remote interface class needs to be included in the
client's classpath - for a simple test it is usually easier to just include it
in the client's JAR file. To summarize:
|
| somejb.jar:
| org.xxx.yyy.EjbRemote.class
| org.xxx.yyy.EjbLocal.class
| org.xxx.yyy.EjbImpl.class
|
| client.jar:
| org.xxx.yyy.EjbRemote.class
| org.xxx.yyy.Client.class
|
| In Ant, when building the client you can use the 'includes' directive of a
fileset to grab **/*Remote.class from the EJB build directory.
|
Hi, thanks for the suggestion.
I have done the following test, it still faield with the same errors (Remote
inteface not found):
First try:
I put the includes directive of fileset for **/*Remote.class in the build.xml
file:
| <property name="tst-dir" location="docroot/WEB-INF/src" />
| <property name="TALK" value="true" />
|
| <path id="classpath.base">
| </path>
| <path id="classpath.test">
| <pathelement
location="/usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/lib/junit.jar"
/>
| <pathelement location="${tst-dir}" />
| <path refid="classpath.base" />
| </path>
| <fileset dir="${tst-dir}" includes="**/*.class" />
|
| <target name="compile-test">
| ...
|
Second try:
I made a jar file with the following commandline:
| # jar cvfm calling_card_reg.jar
com/ip6networks/calling_card_registration/test/*.class
| added manifest
| adding:
com/ip6networks/calling_card_registration/test/CalculatorRemote.class(in = 241)
(out= 162)(deflated 32%)
| adding: com/ip6networks/calling_card_registration/test/Client.class(in =
1261) (out= 633)(deflated 49%)
| adding:
com/ip6networks/calling_card_registration/test/ServiceLocator.class(in = 2571)
(out= 1218)(deflated 52%)
| freetimed:classes # pwd
|
/usr/liferay-portal-5.2.3/dev/portlets/calling_card_reg/docroot/WEB-INF/classes
| # cp calling_card_reg.jar ../lib/
| # cp calling_card_reg.jar $DEV/../tomcat-6.0.18/lib/
|
But I don't think the jar command is correct because when I use tar to "view"
the content of this jar file, there is error:
| # tar -ztvf calling_card_reg.jar
| drwxrwxrwx 0 0 0 0 Jul 22 11:07 META-INF/
| tar: Bad ZIP file: Unexpected end-of-entry record
| tar: Error exit delayed from previous errors.
|
I normally can use tar command to view any jar file, but not the one I created.
Thanks
Sam
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4245155#4245155
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4245155
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user