try this one---maybe!!
public static Context getInitialContext()
throws javax.naming.NamingException
{
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.TengahInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
} catch (NamingException ne) {
System.out.println("We were unable to get a connection to the WebLogic server at ");
System.out.println("Please make sure that the server is running.");
throw ne;
}
}
public static Context getInitialContext()
throws javax.naming.NamingException
{
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.TengahInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
} catch (NamingException ne) {
System.out.println("We were unable to get a connection to the WebLogic server at ");
System.out.println("Please make sure that the server is running.");
throw ne;
}
}
解决方案 »
- 怎么更改IntelliJ IDEA生成的注释的user的默认值
- luence如何分析制定类型的文件?
- 这个方法JOptionPane.showMessageDialog()为什么弹出来的提示框在页面的下方
- 帮我看看啊,怎么了啊,救命啊
- 急求用java/c++/c#解决获取摄像头数据并合成三维图像进行处理
- AssertEquals
- struts+hibernate+spring+mysql
- 被困了N天了,就没有人能回答这个问题吗?
- hibernet问题
- 下载的驱动程序如何使用(急)
- 使用WebLogic.ejbc编译时出现问题
- 各位老兄:哪又介绍java以及相关javascript,jsp,ejb,等好点的综述性的电子版资料或,我毕业论文要用 :) 谢谢!!!
throws javax.naming.NamingException {
try
{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.TengahInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
} catch (NamingException ne) {
System.out.println("We were unable to get a connection to the WebLogic server at ");
System.out.println("Please make sure that the server is running.");
throw ne;
}
}
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.TengahInitialContextFactory");
p.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
改成
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,
"t3://localhost:7001");
return new InitialContext(ht);试试看,祝你成功!
它是在哪个包里?
我按weblogic的ejb例子做的呀,应该不会错
我的classpath是:
CLASSPATH=.;e:\jdk\lib\Tools.jar;e:\jdk\lib\dt.jar;E:\jakarta-tomcat\lib\servlet.jar;e:\myjsp;e:\myjsp\server;E:\jdk\driver\xml4j.jar;E:\jdk\driver\xerces.jar;e:\BORLAND\VBROKER\lib\vbcpp.jar;E:\weblogic\lib\unpacked_jars\javax_ejb.zip;E:\Oracle\Ora81\jdbc\lib\classes111.zip;
我的是1504937
是这个吗?我已经加了
public static Context getWeblogicInitialContext()
throws javax.naming.NamingException {
try
{
return new InitialContext();
} catch (NamingException ne) {
System.out.println("We were unable to get a connection to the WebLogic server at ");
System.out.println("Please make sure that the server is running.");
throw ne;
}
}
但出现了新的错误,hehe
java.lang.Noclassdeffounderror:weblogic/rmi/extensions/RemoteObjectReference
我在weblogic510sp9.jar中没有找到这个类,why?
你们都是用jbuilder做的吗?不然这个问题应该很容易
就是在classpath加上路径,唉,折腾了我两天。
晚上结帖,一人十分,感谢大家。
java.sql.SQLException: Exception raised by connection pool :java.lang.SecurityException: User "guest" does not have Permission "reserve" based on ACL "weblogic.jdbc.connectionPool.mysqlPool".entity bean:
在home.create(1)时出错,怎么解决呢?
给分吧,有人知道的跟我说一声,[email protected]
新wt是:bingo.cabin not found
bingo为服务器名
cabin为表名
连接池的testtable为cabin