Hi,
I followed the instructions from Nicolas to add the DataSource in the
Jetty config and now I'm facing this error:
[WARN] Configuration problem at <resource-ref><description>MySQl
Connection</description><res-ref-name>jdbc/skyline</res-ref-name><res-
type>javax.sql.DataSource</res-type><res-auth>Container</res-auth></
resource-ref>
java.lang.ClassCastException: org.mortbay.jetty.plus.naming.Resource
cannot be cast to org.mortbay.jetty.plus.naming.NamingEntry
at org.mortbay.jetty.plus.naming.NamingEntry.lookupNamingEntry
(NamingEntry.java:211)
at org.mortbay.jetty.plus.naming.NamingEntry.bindToENC
(NamingEntry.java:104)
at org.mortbay.jetty.plus.webapp.Configuration.bindResourceRef
(Configuration.java:73)
at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initResourceRef
(AbstractConfiguration.java:262)
at
org.mortbay.jetty.plus.webapp.AbstractConfiguration.initWebXmlElement
(AbstractConfiguration.java:161)
at org.mortbay.jetty.webapp.WebXmlConfiguration.initialize
(WebXmlConfiguration.java:289)
at org.mortbay.jetty.plus.webapp.AbstractConfiguration.initialize
(AbstractConfiguration.java:133)
at org.mortbay.jetty.webapp.WebXmlConfiguration.configure
(WebXmlConfiguration.java:222)
at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configure
(AbstractConfiguration.java:113)
at org.mortbay.jetty.webapp.WebXmlConfiguration.configureWebApp
(WebXmlConfiguration.java:180)
at org.mortbay.jetty.plus.webapp.AbstractConfiguration.configureWebApp
(AbstractConfiguration.java:96)
at org.mortbay.jetty.plus.webapp.Configuration.configureWebApp
(Configuration.java:124)
at org.mortbay.jetty.webapp.WebAppContext.startContext
(WebAppContext.java:1217)
at org.mortbay.jetty.handler.ContextHandler.doStart
(ContextHandler.java:513)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
448)
at skyline.frontend.server.helper.CustomJettyLauncher
$WebAppContextWithReload.doStart(CustomJettyLauncher.java:412)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:130)
at org.mortbay.jetty.handler.RequestLogHandler.doStart
(RequestLogHandler.java:115)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at org.mortbay.jetty.handler.HandlerWrapper.doStart
(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:39)
at skyline.frontend.server.helper.CustomJettyLauncher.start
(CustomJettyLauncher.java:464)
at com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:365)
at com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
I have both necessary libraries in my WEB-INF/lib directory, created
the CustomJettyLauncher as described and added the xml config:
entry in web.xml:
<resource-ref>
<description>MySQl Connection</description>
<res-ref-name>jdbc/skyline</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jetty-env.xml:
<?xml version="1.0"?>
<New id="skyline" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jdbc/skyline</Arg>
<Arg>
<New
class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<Set name="Url">jdbc:mysql://localhost:3306/skyline</
Set>
<Set name="User">root</Set>
<Set name="Password">admin</Set>
</New>
</Arg>
</New>
</Configure>
Can anyone of you tell me, what I did wrong?
Kind Regards,
Christian
On Jul 20, 5:00 am, Henning <
henning.br...@googlemail.com> wrote:
> You have to add the jetty-*.jar's in the launch configuration
> properties' classpath. The project classpath is not used for the
> internal jetty server.
>
> I made a description in my blog (in german):
>
>
http://curtstech.blogspot.com/2009/07/gwt-16-hosted-mode-internen-jet...
> > > > Wilton- Hide quoted text -
>
> - Show quoted text -