Quantcast

Wicket H2 Hibernate (beginner question)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Wicket H2 Hibernate (beginner question)

Arthur
Hi
I'am new at Wicket, and still learning it.

My problem, i want to integrate the H2 memDB into my project as an embedded server, the server should start with the application.
And use Hibernate without Spring or Databinder.

But I get stuck.

My Steps :
1: use maven  archetype with wicket quickstart
2: editing the pom.xml and add dependecies for H2, Hibernate, ....
3: use m2eclipse plugin to load it to eclipse
4: create the hibernate.cfg.xml and add the settings for H2
5: edit the web.xml and add :
    <listener>
    <listener-class>org.h2.server.web.DbStarter</listener-class>
    </listener>


Now when i start the application i get these error :
org.h2.jdbc.JdbcSQLException: Falscher Benutzer Name oder Passwort
Wrong user name or password [28000-158]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
        at org.h2.message.DbException.get(DbException.java:169)
        at org.h2.message.DbException.get(DbException.java:146)
        at org.h2.message.DbException.get(DbException.java:135)
        at org.h2.engine.Engine.validateUserAndPassword(Engine.java:301)
        at org.h2.engine.Engine.createSessionAndValidate(Engine.java:146)
        at org.h2.engine.Engine.createSession(Engine.java:121)
        at org.h2.engine.Engine.createSession(Engine.java:28)
        at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:285)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:110)
        at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:94)
        at org.h2.Driver.connect(Driver.java:72)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at org.h2.server.web.DbStarter.contextInitialized(DbStarter.java:50)
        at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
        at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1272)
        at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
        at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:489)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:224)
        at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
        at com.flaviait.Start.main(Start.java:35)

what do i do wrong, or do i miss some importent steps ?
THX for Help
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Wicket H2 Hibernate (beginner question)

Gabriel Landon
in your hibernate.cfg.xml have you put those line?

<property name="hibernate.connection.username">your_username</property>
<property name="hibernate.connection.password">your_password</property>

Default username and password migth be "sa" (http://www.h2database.com/html/advanced.html).
Loading...