Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Application Server  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 哪位在Jetty下配过JNDI数据源啊?帮帮忙吧
windshome





发贴: 16
积分: 0
于 2009-03-12 22:34 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我在一个jetty的web程序中配置数据源,在jetty.xml中配置之后,直接jetty启动失败,报:
2009-03-12 22:22:15.794:BlushNFO: Logging to STDERR via org.mortbay.log.StdErrLog
2009-03-12 22:22:15.997::WARN: Config error at <Call name="addDataSource"><Arg>
jdbc/DSTest</Arg><Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource"><Set name="URL
">jdbc:oracle:thinAngry127.0.0.1:1521:orcl</Set><Set name="User">ca23</Set><Set nam
e="Password">ca23</Set></New>
</Arg></Call>
2009-03-12 22:22:15.997::WARN: EXCEPTION
java.lang.IllegalStateException: No Method: <Call name="addDataSource"><Arg>jdbc
/DSTest</Arg><Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource"><Set name="URL
">jdbc:oracle:thinAngry127.0.0.1:1521:orcl</Set><Set name="User">ca23</Set><Set nam
e="Password">ca23</Set></New>
</Arg></Call> on class org.mortbay.jetty.Server
at org.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:553)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:244)

at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:206)

at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:966)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mortbay.start.Main.invokeMain(Main.java:194)
at org.mortbay.start.Main.start(Main.java:512)
at org.mortbay.start.Main.main(Main.java:119)

后来改在web-info下的jetty-env.xml中配置,启动没问题了,但是在JSP中lookup该数据源时,报:

Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

配置为:
<New id="DSTest" class="org.mortbay.jetty.plus.naming.Resource">
  <Arg>jdbc/DSTest</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
<Set name="URL">jdbc:oracle:thinAngry127.0.0.1:1521:orcl</Set>
<Set name="User">ca23</Set>
<Set name="Password">ca23</Set>

</New>
</Arg>
</New>

哪位配过的帮我看看?谢谢!
jetty版本是6.11




有了Swing为什么还要SWT?

话题树型展开
人气 标题 作者 字数 发贴时间
10436 哪位在Jetty下配过JNDI数据源啊?帮帮忙吧 windshome 2305 2009-03-12 22:34

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923