Properties props=System.getProperties();
使用这句的话,你要在运行的时候(java ......)指定Context的两个属性
使用这句的话,你要在运行的时候(java ......)指定Context的两个属性
解决方案 »
- java怎么往scv文件中追加内容?
- java开发
- 开发webService
- 写了import org.apache.struts.action.*出现错误
- 急 求助:webservice发布问题
- struts里面点击一个*.do的连接,重定向到另一个页面.实现错误请指教
- 请问tomcat要付费吗?
- weblogic中defaultwebapp下的jsp调用ejb的问题?
- 问个小问题,2003server下可以安装Apache Tomcat 4.1和mysql 吗?
- 关于XML的固有的标签?
- 请求帮助class文件在执行中的问题
- J2EE平台开发OA,把工作流分成一个独立的控制模块,怎样运作的呀,请各位高手指教
编译
部署
测试一步一步来,初学最好不要用ide。这个问题,可能出在部署上。
使用这句的话,你要在运行的时候(java ......)指定Context的两个属性
怎样指定呢?
jb9+weblogic8.1测试jsp正常运行,
不知道在EJB中是不是正确的?
EJB部署不正确,没有正确的JNDI名字
怎样部署呢?
请大家不要笑话我,求求大家帮我解决一下
谢谢了
Context ctx=new InitialContext(props);
------------------------------------------
改成
String initialFactory="weblogic.jndi.WLInitialContextFactory";
String providerUrl="t3://localhost:7001";
Properties props=new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,initialFactory);
props.put(Context.PROVIDER_URL,providerUrl);
Context ctx=new InitialContext(props);
javax.naming.NameNotFoundException: Unable to resolve 'HelloHome' Resolved ; remaining name 'HelloHome'
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at weblogic.jndi.internal.ServerNamingNode_811_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at examples.HelloClient.main(HelloClient.java:26)
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'HelloHome' Resolved
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:869)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:230)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:166)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:188)
at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
Exception in thread "main" 书上的代码要求你在输入java命令是输入Context参数,你肯定没有,假如不想的话,可以如上所示代码,或写一个propertie文件把参数输进去,
我的确没有呀,
或写一个propertie文件把参数输进去,从来没有用过呀
不过以前我不知道怎么的,运行成功过,现在不行了!!!
那位大侠再帮我解决一下,很急兄,都4个小时还是出错