可利用ant -v -debug显示的信息,自己调试调试。
如果不行,可把结果贴出来,大家分析一下
如果不行,可把结果贴出来,大家分析一下
解决方案 »
- struts2解析action
- 为什么 会出异常 不能接受args[]
- struts+hibernate+spring中的一个问题(给分)
- 基于struts+hibernate的通用分页程序设计思路?
- 请教怎么结合流程控制和具体业务操作来实现具体的应用?(关于开源工作流AgileFlow的使用)
- 在struts中页面转发的问题
- J2EE---怎么才能发EMAIL 求助
- tomcat问题:怎样在首页上不显示index.jsp
- 用Java发送短信
- 有JBUILD8,请问如何搭建EJB环境?
- jbuilder7太占资源,而我机差,有什么办法啊
- struts 中WEB.XML 和CONFIG.XML的区别
Build sequence for target `jar' is [init, prepare, ejbdoclet, webdoclet, jmxdocl
et, jdodoclet, javabeans, hibernate, compile, jar]
Complete build sequence is [init, prepare, ejbdoclet, webdoclet, jmxdoclet, jdod
oclet, javabeans, hibernate, compile, jar, clean]init:
[echo] output:samples.gen-src.dir=E:\tools\jboss\xdoclet\XDOCLE~1\samples/.
./build.properties
Setting project property: DSTAMP -> 20030110
Setting project property: TSTAMP -> 0919
Setting project property: TODAY -> January 10 2003
Setting project property: TODAY -> 10-01-03
FileSet: Setup file scanner in dir E:\tools\jboss\xdoclet\XDOCLE~1\lib with patt
ernSet{ includes: [*.jar] excludes: [] }
FileSet: Setup file scanner in dir E:\tools\jboss\xdoclet\XDOCLE~1\samples\lib w
ith patternSet{ includes: [*.jar] excludes: [] }
FileSet: Setup file scanner in dir E:\tools\jboss\xdoclet\XDOCLE~1\lib with patt
ernSet{ includes: [*.jar] excludes: [] }BUILD FAILEDE:\tools\jboss\xdoclet\XDOCLE~1\samples\build.xml:43: taskdef class xdoclet.Docl
etTask cannot be found
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:180) at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:114)
at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:164)
at org.apache.tools.ant.Target.performTasks(Target.java:182)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.Project.executeTargets(Project.java:560)
at org.apache.tools.ant.Main.runBuild(Main.java:454)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
java.lang.NoClassDefFoundError: xjavadoc/ant/XJavadocTask
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
6)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java
:945)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:791
)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:170) at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:114)
at org.apache.tools.ant.Task.perform(Task.java:217)
at org.apache.tools.ant.Target.execute(Target.java:164)
at org.apache.tools.ant.Target.performTasks(Target.java:182)
at org.apache.tools.ant.Project.executeTarget(Project.java:601)
at org.apache.tools.ant.Project.executeTargets(Project.java:560)
at org.apache.tools.ant.Main.runBuild(Main.java:454)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)Total time: 3 seconds
<!-- Define the class path -->
<!-- =================================================================== -->
<path id="samples.class.path">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${samples.lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${dist.lib.dir}">
<include name="*.jar"/>
</fileset>
</path> <target name="init">
<echo message="output:samples.gen-src.dir=${xdoclet.root.dir}/build.properties"/>
<tstamp>
<format property="TODAY" pattern="d-MM-yy"/>
</tstamp>
<taskdef
name="xdoclet"
classname="xdoclet.DocletTask"
classpathref="samples.class.path" //注释:此处为build.xml的第43行
/>
看看有没有xdoclet-1.2b2.jar等文件。BTW: 你是不是修改了那个build.properties。
不过,现在的新问题是,我从jboss网站下载了jboss3.0的一个文档JBoss.3.0QuickStart.Draft3.pdf以及对应的代码JBoss.3.0TemplateAndExamples.zip,解压后,用按照文档的说明,用ant发布其模板工程template,显示"BUILD SUCCESSFUL",好像已经发布成功,并且,ejb-test.jar文件也已经copy到了server\default\deploy(我配的jboss.configuration=deploy)目录下面,好像一切都很正常.但是当我运行build\bin下面的run-client.bat时,TestClient.java文件如下:/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.client;import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject; import test.interfaces.TestSession;
import test.interfaces.TestSessionHome;public class TestClient { public static void main(String[] args){
try {
System.out.println("begin");
InitialContext lContext = new InitialContext();
System.out.println("before lookup");
TestSessionHome lHome = (TestSessionHome) lContext.lookup( "ejb/test/TestSession" );
System.out.println(lHome.getClass().getName());
TestSession lSession = lHome.create();
// Get a new Id of the Test Entity
int lId = lSession.getNewEntityId();
System.out.println( "New Entity Id is: " + lId );
lSession.remove();
} catch( Exception e ){
System.out.println("exception"+e.getMessage());
e.printStackTrace();
}
}}报错:
begin//我加的调试信息,进入main()
before lookup//查找HOME之前
exception test not bound//报错ejb/test/TestSession未绑定?
javax.naming.NameNotFoundException: test not bound
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:464)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at test.client.TestClient.main(TestClient.java:22)那么怎样才能把ejb Home绑定到jndi呢?谢谢