- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试为 Jetty (7.4.1.v20110513) 配置一个 c3p0 数据库连接池,但我一直收到 java.lang.IllegalArgumentException :
C:\jetty7>java -jar start.jar
2011-05-29 00:29:51.843:INFO::jetty-7.4.1.v20110513
2011-05-29 00:29:51.875:INFO::Deployment monitor C:\jetty7\webapps at interval 1
2011-05-29 00:29:51.890:INFO::Deployable added: C:\jetty7\webapps\block
2011-05-29 00:29:52.093:INFO::started o.e.j.w.WebAppContext{/block,file:/C:/jett
y7/webapps/block/},C:\jetty7\webapps\block
2011-05-29 00:29:52.171:INFO::Deployable added: C:\jetty7\webapps\hello
2011-05-29 00:29:53.000:WARN::Failed startup of context o.e.j.w.WebAppContext{/h
ello,file:/C:/jetty7/webapps/hello/},C:\jetty7\webapps\hello
java.lang.IllegalArgumentException: Object is not of type class org.eclipse.jett
y.webapp.WebAppContext
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur
e(XmlConfiguration.java:310)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.jav
a:273)
at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebX
mlConfiguration.java:88)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:4
23)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1192)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandle
r.java:586)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:449
)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:58)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(Stan
dardStarter.java:36)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:1
80)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentM
anager.java:482)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.j
ava:135)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(Scan
ningAppProvider.java:137)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(Sc
anningAppProvider.java:50)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:601)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:394)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:329)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:58)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(Scanni
ngAppProvider.java:114)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:58)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(Deploymen
tManager.java:543)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.
java:218)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:58)
at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(Aggregate
LifeCycle.java:41)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand
ler.java:50)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrappe
r.java:90)
at org.eclipse.jetty.server.Server.doStart(Server.java:258)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:58)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:11
97)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:112
0)
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.eclipse.jetty.start.Main.invokeMain(Main.java:469)
at org.eclipse.jetty.start.Main.start(Main.java:604)
at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
at org.eclipse.jetty.start.Main.main(Main.java:79)
2011-05-29 00:29:53.046:INFO::Deployment monitor C:\jetty7\contexts at interval
1
2011-05-29 00:29:53.046:INFO::Deployable added: C:\jetty7\contexts\test.xml
2011-05-29 00:29:53.125:INFO::Extract jar:file:/C:/jetty7/webapps/test.war!/ to
C:\Documents and Settings\Welcome\Local Settings\Temp\jetty-0.0.0.0-8080-test.wa
r-_-any-\webapp
2011-05-29 00:29:54.062:INFO::started o.e.j.w.WebAppContext{/,file:/C:/Documents
%20and%20Settings/Welcome/Local%20Settings/Temp/jetty-0.0.0.0-8080-test.war-_-an
y-/webapp/},C:\jetty7/webapps/test.war
2011-05-29 00:29:56.015:INFO:org.eclipse.jetty.servlets.TransparentProxy:Transpa
rentProxy @ /javadoc to http://download.eclipse.org/jetty/stable-7/apidocs
2011-05-29 00:29:56.015:INFO::Deployable added: C:\jetty7\contexts\javadoc.xml
2011-05-29 00:29:56.046:INFO::started o.e.j.s.h.ContextHandler{/javadoc,file:/C:
/jetty7/javadoc}
2011-05-29 00:29:56.125:INFO::Started SelectChannelConnector@0.0.0.0:8080 STARTI
NG
这是我的 WEB-INF 目录中的 web.xml 和 jetty-web.xml 文件。
jetty -web.xml:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<New id="mysql" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/mysql</Arg>
<Arg>
<New class="com.mchange.v2.c3p0.ComboPooledDataSource">
<Set name="Url">jdbc:mysql://localhost:3306/mysql</Set>
<Set name="User">user</Set>
<Set name="Password">pw</Set>
</New>
</Arg>
</New>
</Configure>
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<description>Caucho Technology's PHP Implementation</description>
<resource-ref>
<description>My DataSource Reference</description>
<res-ref-name>jdbc/mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<servlet>
<servlet-name>cs</servlet-name>
<servlet-class>cs</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>cs</servlet-name>
<url-pattern>/servlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Quercus Servlet</servlet-name>
<servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Quercus Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.php</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
目前我在我的 WEB-INF/lib 目录中放置了以下 jar:
c3p0-0.9.1.2.jar
commons-dbcp-1.4.jar
commons-pool-1.5.6.jar
mysql-connector-java-5.1.16-bin.jar
有人请告诉我我的配置有什么问题。
最佳答案
您的 jetty-web.xml 仍然指的是用于 Jetty 6 的 org.mortbay.*
。
对于 Jetty 7,更改
org.mortbay.jetty.webapp.WebAppContext
到 org.eclipse.jetty.webapp.WebAppContext
和
org.mortbay.jetty.plus.naming.Resource
到 org.eclipse.jetty.plus.jndi.Resource
。
关于java - jetty 7 + MySQL 配置 [java.lang.IllegalArgumentException : Object is not of type class org. eclipse.jett y.webapp.WebAppContext],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6163951/
我刚刚编写了这些代码,但输出不同。第二个代码的输出符合我的预期,但第一个代码的输出不正确。但为什么呢? def fib(n): x = 0 y = 1 print x
#include #include #define CUBE(y)y*(y*y) main() { int j; j = CUBE(-2+4);
这个问题在这里已经有了答案: Multiple assignment and evaluation order in Python (11 个答案) 关闭 1 年前。 我看到下面的代码,但不知道它做
我正在阅读 book , 并讲了 typeclass Eq 的定义 有两个功能== , /=在等式中,它们被实现为: x == y = not (x /= y) x /= y = not (
我最近参加了一个代码力量竞赛。在比赛的编辑部分,我看到了按位运算符之间的一种美妙关系,即 x + y = x & y + x |是的我还不知道证据。我拿了几个数字来看看这个等式是否正确。我很高兴知道这
我使用 CGRectMake(x,x,x,x) 在我的 View 中放置了一个按钮,当然 x 是位置和大小。当我使用 -(BOOL)shouldAutoRotate... 旋转 View 时,我想将按
this.x = (Math.random()*canvasWidth); this.y = (Math.random()*canvasHeight); (1) this.shift = {x: th
我想将此代码运行为“if 'Britain' or 'UK' in string do stuff, but don't do stuff if "Ex UK" 在字符串中": #Case insen
早上好,我是新来的,我带来了一个小问题。我无法针对以下问题开发有效的算法:我需要找到三个正数 x、y 和 z 的组合,以便 x + y、x - y、y + z、y - z、x + z 和 x - z
我现在正在使用 C++ 编写方案的解释器。我有一个关于定义和 lambda 的问题。 (define (add x y) (+ x y)) 扩展为 (define add (lambda (x y)
我正在尝试使用一台主机通过 FTP 将内容上传到另一台主机。 “我不会打开到 172.xxx.xxx.xxx(仅到 54.xxx.xxx.xxx)的连接”甚至不相关,因为我没有连接到那个主持人。这是托
在 Python 中,使用 [] 解包函数调用有什么区别? , 与 ()还是一无所有? def f(): return 0, 1 a, b = f() # 1 [a, b] = f() # 2
给定方程 z = z(x,y) 2 个表面 I和 II : z_I(x, y) = a0 + a1*y + a2*x + a3*y**2 + a4*x**2 + a5*x*y z_II(x, y)
几年前我有这个面试问题,但我还没有找到答案。 x 和 y 应该是什么才能形成无限循环? while (x = y && x != y) { } 我们尝试了 Nan,infinity+/-,null f
我正在尝试使用 Camel FTP Producer 将文件发送到第三方 ftp 服务器(似乎由 Amazon 托管),但遇到了一个问题,写入文件失败,并显示:文件操作失败...主机尝试数据连接 x.
关闭。这个问题需要details or clarity .它目前不接受答案。 想改进这个问题吗? 通过 editing this post 添加细节并澄清问题. 关闭 8 年前。 Improve t
我正在使用 torch.tensor.repeat() x = torch.tensor([[1, 2, 3], [4, 5, 6]]) period = x.size(1) repeats = [1
#include int main() { int x = 9; int y = 2; int z = x - (x / y) * y; printf("%d", z
我很难理解先有定义然后有两个异或表达式的含义。这个定义的作用是什么? 我尝试发送 x=8, y=7,结果是 x=15 和 y=8为什么会这样? 这是程序: #define FUNC(a,b) a^=b
我正在尝试使用 SIMD 优化此功能,但我不知道从哪里开始。 long sum(int x,int y) { return x*x*x+y*y*y; } 反汇编函数如下所示: 4007a0
我是一名优秀的程序员,十分优秀!