From: x c. <xch...@ho...> - 2005-11-29 04:27:48
|
Hi, all I am new to EJB and Jboss. I am following the 'interest' example from the 'document-example'. Firstm I give some info about the platform and the jboss installed: The platform is Lunix, I installed Jboss-3.2.5 and made a symbolic link 'jboss'. I don't have tomcat installed at all. I did some change like these: 1) in the file: examples/build/build.xml, I changed like this: from <available property="servlet.jar" value="${env.JBOSS_DIST}/../tomcat/lib/servlet.jar" file="${env.JBOSS_DIST}/../tomcat/lib/servlet.jar"/> to <available property="servlet.jar" value="${env.JBOSS_DIST}/server/default/deploy/jbossweb-tomcat50.sar/servlet-api.jar" file="${env.JBOSS_DIST}/server/default/deploy/jbossweb-tomcat50.sar/servlet-api.jar"/> This change is to make sure it point to the 'servlet-api.jar' instead of 'servlet.jar' in the proper directory. (I hope I did the right thing here.) 2) in file: examples/org/jboss/docs/interest/build.xml, I changed like this: I commented out the original in the file: <?xml version="1.0" encoding="UTF-8" ?> <!-- An Ant build file for the Interest EJB example --> <project name="Interest Build Script" default="ejb-jar" basedir="."> <property name="build.interest.dir" value="${basedir}/build-examples/interest"/> <property name="build.classes.dir" value="${basedir}/build-examples/interest/classes"/> <target name="compile"> <mkdir dir="${build.classes.dir}"/> <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="on" deprecation="on" optimize="off" > <classpath path="${classpath}" /> <include name="org/jboss/docs/interest/Interest.java" /> <include name="org/jboss/docs/interest/InterestBean.java" /> <include name="org/jboss/docs/interest/InterestHome.java" /> <include name="org/jboss/docs/interest/InterestClient.java" /> </javac> </target> <target name="compile-servlet"> <mkdir dir="${build.classes.dir}"/> <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="on" deprecation="on" optimize="off" > <classpath path="${classpath}" /> <include name="org/jboss/docs/interest/InterestServlet.java" /> </javac> </target> <!-- Tutorial ejb jar --> <target name="ejb-jar" depends="compile"> <delete dir="${build.interest.dir}/META-INF"/> <mkdir dir="${build.interest.dir}/META-INF"/> <copy file="${src.dir}/org/jboss/docs/interest/ejb-jar.xml" todir="${build.interest.dir}/META-INF" /> <copy file="${src.dir}/org/jboss/docs/interest/jboss.xml" todir="${build.interest.dir}/META-INF" /> <jar jarfile="${build.interest.dir}/interest.jar"> <fileset dir="${build.classes.dir}"> <include name="org/jboss/docs/interest/Interest.class" /> <include name="org/jboss/docs/interest/InterestHome.class" /> <include name="org/jboss/docs/interest/InterestBean.class" /> </fileset> <fileset dir="${build.interest.dir}"> <include name="META-INF/ejb-jar.xml" /> <include name="META-INF/jboss.xml" /> </fileset> </jar> </target> <!-- Tutorial web app war --> <target name="war" depends="compile-servlet"> <delete dir="${build.interest.dir}/WEB-INF"/> <mkdir dir="${build.interest.dir}/WEB-INF/classes/org/jboss/docs/interest"/> <copy file="${src.dir}/org/jboss/docs/interest/web.xml" todir="${build.interest.dir}/WEB-INF" /> <copy file="${src.dir}/org/jboss/docs/interest/jboss-web.xml" todir="${build.interest.dir}/WEB-INF" /> <copy file="${src.dir}/org/jboss/docs/interest/home.html" todir="${build.interest.dir}" /> <copy file="${build.classes.dir}/org/jboss/docs/interest/InterestServlet.class" todir="${build.interest.dir}/WEB-INF/classes/org/jboss/docs/interest" /> <jar jarfile="${build.interest.dir}/interest.war"> <fileset dir="${build.interest.dir}"> <include name="WEB-INF/**"/> <include name="home.html"/> </fileset> </jar> </target> <!-- Create the tutorial ear that uses the properties based security info --> <target name="ear" depends="ejb-jar,war"> <copy file="${src.dir}/org/jboss/docs/interest/application.xml" todir="${build.interest.dir}/META-INF" /> <jar jarfile="${build.interest.dir}/interest.ear"> <fileset dir="${build.interest.dir}"> <include name="META-INF/application.xml" /> <include name="interest.jar" /> <include name="interest.war" /> </fileset> </jar> </target> <target name="deploy-ejb-jar" depends="ejb-jar"> <!-- comment out the original: <copy file="${build.interest.dir}/interest.jar" todir="${jboss.dist}/deploy" /> --> <copy file="${build.interest.dir}/interest.jar" todir="${jboss.dist}/server/default/deploy" /> </target> <target name="deploy-ear" depends="ear"> <!-- comment out the original: <copy file="${build.interest.dir}/interest.ear" todir="${jboss.dist}/deploy" /> --> <copy file="${build.interest.dir}/interest.ear" todir="${jboss.dist}/server/default/deploy" /> </target> <target name="interest-client" depends="compile"> <java classname="org.jboss.docs.interest.InterestClient" fork="yes"> <classpath> <pathelement path="${classpath}"/> <pathelement location="${build.classes.dir}"/> <pathelement location="${src.resources}"/> </classpath> </java> </target> </project> In this file, the change is to make sure the 'deploy' directory is correct for Jboss3.2.5. After these change, I can run in the 'examples/build/' directory: ant intro-interest-jar ant intro-interest-deploy at this point, I open the 'server.log' and found there are a few lines like this: 2005-11-29 00:18:48,561 DEBUG [org.jboss.management.j2ee.factory.DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.destroy,sequenceNumber=300,timeStamp=1133237928561,message=null,userData=jboss.j2ee:jndiName=interest/Interest,plugin=pool,service=EJB] I have no idea what does this mean and I did some research on internet and couldn't find any solution for this. Could anyone help me with this problem? Many many thanks. Sincerely, X.Chen _________________________________________________________________ Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new MSN Search! Check it out! |