Actually, Marcus, you can use the text value of an XML element in your
schema.  You use the push-content rule.


On 1/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Thanks....getting closer!

Now I only have to solve the id generator problem.

Error building service honeycomb.hibernate.HibernateSessionFactory: Error at 
jar:file:/C:/home/me/.m2/repository/com/javaforge/honeycomb/HoneycombHibernate/0.3.3/HoneycombHibernate-0.3.3.jar!/META-INF/hivemodule.xml,
 line 15, column 30: Unable to initialize service 
honeycomb.hibernate.HibernateSessionFactory (by invoking method init on 
com.javaforge.honeycomb.hivemind.hibernate.HibernateSessionFactory): could not 
instantiate id generator


-------- Original-Nachricht --------
Datum: Thu, 4 Jan 2007 09:10:31 +0100
Von: [EMAIL PROTECTED]
An: users@tapestry.apache.org
Betreff: RE: RE: RE: HoneycombLib/Hibernate problem

> Oh, now I see it:
>
> Instead of
>
>   <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
>
>
> you need to write
>
> <property name="dialect" value="org.hibernate.dialect.MySQLDialect" />
>
> since in HiveMind descriptors text-elements are alway treated as
> comments,
> contrary to the syntax in hibernate.cfg.xml
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, January 03, 2007 10:01 PM
> > To: Tapestry users
> > Subject: Re: RE: RE: HoneycombLib/Hibernate problem
> >
> >          <dependency>
> >           <groupId>mysql-connector-java</groupId>
> >           <artifactId>mysql-connector-java</artifactId>
> >           <version>3.1.14</version>
> >         </dependency>
> >
> > (only a manual maven install worked though).
> >
> > The mysql connector is found corrctly.
> >
> >
> > The console output:
> >
> > launching Jetty webapp: / on address: domain.de:8080 using
> > dir: [C:\java\tapestry\workspace\DomainWeb\src\main\webapp]
> > 21:51:11.796 INFO   [main]
> > org.mortbay.log.LogImpl.add(LogImpl.java:109) >16> added
> > [EMAIL PROTECTED]
> > 21:51:11.765 INFO   [main]
> > org.mortbay.log.LogImpl.reset(LogImpl.java:228) >11> reset
> > 21:51:11.828 INFO   [main]
> > org.mortbay.log.LogImpl.add(LogImpl.java:109) >11> added
> > [EMAIL PROTECTED]
> > log4j:WARN No appenders could be found for logger
> > (org.mortbay.http.HttpServer).
> > log4j:WARN Please initialize the log4j system properly.
> > 21:51:11.921 INFO   [main]
> > org.mortbay.util.FileResource.<clinit>(FileResource.java:60)
> > >10> Checking Resource aliases
> > 21:51:14.562 INFO   [main]
> > org.apache.tapestry.ApplicationServlet.init(ApplicationServlet
> > .java:211) >12> Initialized application servlet
> > 'HoneycombTemplateWeb': 797 millis to create HiveMind
> > Registry, 2.219 millis overall.
> > 21:51:14.578 INFO   [main]
> > org.mortbay.http.SocketListener.start(SocketListener.java:204)
> >  >06> Started SocketListener on 127.0.0.1:8080
> > 21:51:58.000 INFO   [SocketListener0-1]
> > org.hibernate.cfg.annotations.Version.<clinit>(Version.java:15
> > ) >89> Hibernate Annotations 3.2.0.CR1
> > 21:51:58.015 INFO   [SocketListener0-1]
> > org.hibernate.cfg.Environment.<clinit>(Environment.java:499)
> > >94> Hibernate 3.2 cr2
> > 21:51:58.015 INFO   [SocketListener0-1]
> > org.hibernate.cfg.Environment.<clinit>(Environment.java:532)
> > >94> hibernate.properties not found
> > 21:51:58.015 INFO   [SocketListener0-1]
> > org.hibernate.cfg.Environment.buildBytecodeProvider(Environmen
> > t.java:666) >95> Bytecode provider name : cglib
> > 21:51:58.031 INFO   [SocketListener0-1]
> > org.hibernate.cfg.Environment.<clinit>(Environment.java:583)
> > >94> using JDK 1.4 java.sql.Timestamp handling
> >
> >
> > And more from the website output:
> >
> >
> > Stack Trace:
> > java.util.Hashtable.put(Unknown Source)
> > java.util.Properties.setProperty(Unknown Source)
> > org.hibernate.cfg.Configuration.setProperty(Configuration.java:1289)
> > com.javaforge.honeycomb.hivemind.hibernate.HibernateProperty.a
> > pplyTo(HibernateProperty.java:38)
> > com.javaforge.honeycomb.hivemind.hibernate.HibernateSessionFac
> > tory.<init>(HibernateSessionFactory.java:100)
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> > Source)
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unkn
> > own Source) java.lang.reflect.Constructor.newInstance(Unknown Source)
> > org.apache.hivemind.util.ConstructorUtils.invoke(ConstructorUt
> > ils.java:139)
> > org.apache.hivemind.service.impl.BuilderFactoryLogic.instantia
> > teExplicitConstructorInstance(BuilderFactoryLogic.java:135)
> > org.apache.hivemind.service.impl.BuilderFactoryLogic.instantia
> > teCoreServiceInstance(BuilderFactoryLogic.java:109)
> > org.apache.hivemind.service.impl.BuilderFactoryLogic.createSer
> > vice(BuilderFactoryLogic.java:75)
> > org.apache.hivemind.service.impl.BuilderFactory.createCoreServ
> > iceImplementation(BuilderFactory.java:42)
> > org.apache.hivemind.impl.InvokeFactoryServiceConstructor.const
> > ructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:62)
> > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
> > .constructCoreServiceImplementation(AbstractServiceModelImpl.java:108)
> > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
> > .constructNewServiceImplementation(AbstractServiceModelImpl.java:158)
> > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
> > .constructServiceImplementation(AbstractServiceModelImpl.java:140)
> > org.apache.hivemind.impl.servicemodel.SingletonServiceModel.ge
> > tActualServiceImplementation(SingletonServiceModel.java:69)
> > $ServiceImplementationFactory_10fe9bad67b._service($ServiceImp
> > lementationFactory_10fe9bad67b.java)
> > $ServiceImplementationFactory_10fe9bad67b.createCoreServiceImp
> lementation($ServiceImplementationFactory_10fe9bad67b.java)
> > $ServiceImplementationFactory_10fe9bad67a.createCoreServiceImp
> lementation($ServiceImplementationFactory_10fe9bad67a.java)
> > org.apache.hivemind.impl.InvokeFactoryServiceConstructor.const
> > ructCoreServiceImplementation(InvokeFactoryServiceConstructor.java:62)
> > org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
> > .constructCoreServiceImplementation(AbstractServiceModelImpl.java:108)
> > com.javaforge.honeycomb.hivemind.statefulservice.StatefulServi
> > ceModel.constructStatefulService(StatefulServiceModel.java:253)
> > com.javaforge.honeycomb.hivemind.statefulservice.StatefulServi
> > ceModel.obtainPooledService(StatefulServiceModel.java:232)
> > com.javaforge.honeycomb.hivemind.statefulservice.StatefulServi
> > ceModel.getServiceImplementationForCurrentThread(StatefulServi
> > ceModel.java:211)
> > $Session_10fe9bad64f._service($Session_10fe9bad64f.java)
> > $Session_10fe9bad64f.getTransaction($Session_10fe9bad64f.java)
> > $Session_10fe9bad650.getTransaction($Session_10fe9bad650.java)
> > $Session_10fe9bad651.getTransaction($Session_10fe9bad651.java)
> > com.javaforge.honeycomb.service.AbstractPersistenceService.rol
> > lback(AbstractPersistenceService.java:66)
> > com.javaforge.honeycomb.tapestry.TransactionalDirectService.ha
> > ndleError(TransactionalDirectService.java:90)
> > com.javaforge.honeycomb.tapestry.TransactionalDirectService.tr
> > iggerComponent(TransactionalDirectService.java:84)
> > org.apache.tapestry.engine.DirectService.service(DirectService
> > .java:132)
> > $IEngineService_10fe9bad5ba.service($IEngineService_10fe9bad5ba.java)
> > org.apache.tapestry.services.impl.EngineServiceOuterProxy.serv
> > ice(EngineServiceOuterProxy.java:66)
> > org.apache.tapestry.engine.AbstractEngine.service(AbstractEngi
> > ne.java:248)
> > org.apache.tapestry.services.impl.InvokeEngineTerminator.servi
> > ce(InvokeEngineTerminator.java:60)
> > $WebRequestServicer_10fe9bad598.service($WebRequestServicer_10
> > fe9bad598.java)
> > $WebRequestServicer_10fe9bad594.service($WebRequestServicer_10
> > fe9bad594.java)
> > org.apache.tapestry.services.impl.WebRequestServicerPipelineBr
> > idge.service(WebRequestServicerPipelineBridge.java:56)
> > $ServletRequestServicer_10fe9bad57a.service($ServletRequestSer
> > vicer_10fe9bad57a.java)
> > org.apache.tapestry.request.DecodedRequestInjector.service(Dec
> > odedRequestInjector.java:55)
> > $ServletRequestServicerFilter_10fe9bad576.service($ServletRequ
> > estServicerFilter_10fe9bad576.java)
> > $ServletRequestServicer_10fe9bad57c.service($ServletRequestSer
> > vicer_10fe9bad57c.java)
> > org.apache.tapestry.multipart.MultipartDecoderFilter.service(M
> > ultipartDecoderFilter.java:52)
> > $ServletRequestServicerFilter_10fe9bad574.service($ServletRequ
> > estServicerFilter_10fe9bad574.java)
> > $ServletRequestServicer_10fe9bad57c.service($ServletRequestSer
> > vicer_10fe9bad57c.java)
> > org.apache.tapestry.services.impl.SetupRequestEncoding.service
> > (SetupRequestEncoding.java:53)
> > $ServletRequestServicerFilter_10fe9bad578.service($ServletRequ
> > estServicerFilter_10fe9bad578.java)
> > $ServletRequestServicer_10fe9bad57c.service($ServletRequestSer
> > vicer_10fe9bad57c.java)
> > $ServletRequestServicer_10fe9bad56e.service($ServletRequestSer
> > vicer_10fe9bad56e.java)
> > org.apache.tapestry.ApplicationServlet.doService(ApplicationSe
> > rvlet.java:123)
> > org.apache.tapestry.ApplicationServlet.doPost(ApplicationServl
> > et.java:168)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
> > org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebAp
> > plicationHandler.java:496)
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler
> > .java:569)
> > org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> > org.mortbay.jetty.servlet.WebApplicationContext.handle(WebAppl
> > icationContext.java:624)
> > org.mortbay.http.HttpContext.handle(HttpContext.java:1434)
> > org.mortbay.http.HttpServer.service(HttpServer.java:896)
> > org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
> > org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
> > org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
> > org.mortbay.http.SocketListener.handleConnection(SocketListene
> > r.java:244)
> > org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366)
> > org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
> >
> > Thanks for your help!
> >
> >
> > -------- Original-Nachricht --------
> > Datum: Wed, 3 Jan 2007 13:35:22 +0100
> > Von: [EMAIL PROTECTED]
> > An: users@tapestry.apache.org
> > Betreff: RE: RE: HoneycombLib/Hibernate problem
> >
> > > Somehow the hibernate session factory is not initialised correctly.
> > > Usually, there's some more info in the logs. Some wild
> > guesses: is the
> > > MySQL driver on the classpath? I.e did you add a dependency in your
> > > pom.xml? Did you try to run the "unit"-Tests from the core
> > project? If
> > > that works, is the Mysql-jar in your web-inf lib?
> > >
> > > As for debugging: you can use mvn war:exploded and deploy it in a
> > > Tomcat instance started from Eclipse. You can also start Maven from
> > > within Eclipse (with the jetty:run goal).
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, January 03, 2007 12:41 PM
> > > > To: Tapestry users; users@tapestry.apache.org
> > > > Subject: Re: RE: HoneycombLib/Hibernate problem
> > > >
> > > > Hi there!
> > > >
> > > > Inside the generated Core project I adapted the
> > hivemodule.xml file
> > > > like that:
> > > >
> > > > <contribution
> > > > configuration-id="honeycomb.hibernate.HibernateSessionFactory">
> > > >
> > > >             <entity
> > > > clazz="com.javaforge.honeycomb.hibernate.audit.AuditEvent" />
> > > >
> > > >                 <entity clazz="com.domain.Foo" />
> > > >             <entity clazz="com.domain.Bar" />
> > > >
> > > >             <property
> > > > name="dialect">org.hibernate.dialect.MySQLDialect</property>
> > > >                 <property
> > > > name="connection.driver_class">org.gjt.mm.mysql.Driver</property>
> > > >                 <property name="connection.username">root</property>
> > > >                 <property name="connection.password">thepass</property>
> > > >                 <property
> > > > name="connection.url">jdbc:mysql://localhost:3306/test</property>
> > > >
> > > >   </contribution>
> > > >
> > > > .
> > > >
> > > > When I now enter an item on the website and want to save it, it
> > > > throws an exception:
> > > >
> > > > org.apache.hivemind.ApplicationRuntimeException
> > > > Unable to construct service
> > > > honeycomb.hibernate.HibernateSessionFactory: Error
> > building service
> > > > honeycomb.hibernate.HibernateSessionFactory: Failure invoking
> > > > constructor for class
> > > > com.javaforge.honeycomb.hivemind.hibernate.HibernateSessionFac
> > > > tory: java.lang.NullPointerException
> > > > location:
> > > > jar:file:/C:/home/me/.m2/repository/com/javaforge/honeycomb/Ho
> > > > neycombHibernate/0.3.3/HoneycombHibernate-0.3.3.jar!/META-INF/
> > > > hivemodule.xml, line 28, column 74      23
> > </invoke-factory>
> > > > 24      <interceptor service-id="hivemind.LoggingInterceptor"/>
> > > > 25      </service-point>
> > > > 26
> > > > 27      <service-point id="HibernateSession"
> > > > interface="org.hibernate.Session">
> > > > 28      <invoke-factory service-id="HibernateSessionFactory"
> > > > model="stateful"/>
> > > > 29      <interceptor service-id="hivemind.LoggingInterceptor"/>
> > > > 30      </service-point>
> > > > 31
> > > > 32      <implementation
> > > > service-id="honeycomb.audit.AuditInterceptor"> Den
> > > > 33      Audit-Interceptor instanziieren.
> > > >
> > > >
> > > > Unable to construct service
> > > > honeycomb.hibernate.HibernateSessionFactory: Error
> > building service
> > > > honeycomb.hibernate.HibernateSessionFactory: Failure invoking
> > > > constructor for class
> > > > com.javaforge.honeycomb.hivemind.hibernate.HibernateSessionFac
> > > > tory: java.lang.NullPointerException
> > > > location:
> > > > jar:file:/C:/home/me/.m2/repository/com/javaforge/honeycomb/Ho
> > > > neycombHibernate/0.3.3/HoneycombHibernate-0.3.3.jar!/META-INF/
> > > > hivemodule.xml, line 12, column 37      7
> > > > <configuration-point id="HibernateSessionFactory"
> > > > 8       schema-id="HibernateSessionFactory"/>
> > > > 9
> > > > 10      <service-point id="HibernateSessionFactory"
> > > > parameters-occurs="none"
> > > > 11
> > interface="org.apache.hivemind.ServiceImplementationFactory">
> > > > 12      <invoke-factory model="singleton">
> > > > 13      <construct
> > > > 14
> > > > class="com.javaforge.honeycomb.hivemind.hibernate.HibernateSes
> > > > sionFactory"
> > > > 15      initialize-method="init">
> > > > 16      <configuration>HibernateSessionFactory</configuration>
> > > > 17      <service>hivemind.ShutdownCoordinator</service>
> > > >
> > > > p.s.: Can you debug "inside" maven without copying the
> > source files
> > > > in to the project source folder?
> > > >
> > > > -------- Original-Nachricht --------
> > > > Datum: Wed, 3 Jan 2007 09:02:28 +0100
> > > > Von: [EMAIL PROTECTED]
> > > > An: users@tapestry.apache.org
> > > > Betreff: RE: HoneycombLib/Hibernate problem
> > > >
> > > > > Which hivemodule.xml did you change? You only need to
> > change the
> > > > > following contribution in the generated core project's
> > > > hivemodule.xml:
> > > > >
> > > > >  <contribution
> > > > > configuration-id="honeycomb.hibernate.HibernateSessionFactory">
> > > > >       ...
> > > > >         <property name="dialect"
> > > > > value="org.hibernate.dialect.HSQLDialect"/>
> > > > >         <property name="connection.username" value="sa"/>
> > > > >         <property name="connection.url"
> > > > > value="jdbc:hsqldb:hsql://localhost/testdb"/>
> > > > >         <property name="connection.password" value=""/>
> > > > >         <property name="connection.driver_class"
> > > > > value="org.hsqldb.jdbcDriver"/>
> > > > >         <property name="show_sql" value="true"/>
> > > > >   </contribution>
> > > > >
> > > > > There's no need to change anything inside the honeycomb libs
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > > > > Sent: Sunday, December 31, 2006 2:43 AM
> > > > > > To: users@tapestry.apache.org
> > > > > > Subject: HoneycombLib/Hibernate problem
> > > > > >
> > > > > > I am trying to use HoneycombLib with MySQL and adapted the
> > > > > > hivemodule.xml file.
> > > > > >
> > > > > > It seems like it still uses the hivemodule.xml file from
> > > > inside the
> > > > > > HoneycombHibernate-0.3.3.jar file?
> > > > > >
> > > > > > Any ideas how I can get it to work with MySQL or Postgres?
> > > > > >
> > > > > >
> > > > > >
> > > > > > org.apache.hivemind.ApplicationRuntimeException
> > > > > > Unable to construct service
> > > > > > honeycomb.hibernate.HibernateSessionFactory: Error
> > > > building service
> > > > > > honeycomb.hibernate.HibernateSessionFactory: Failure invoking
> > > > > > constructor for class
> > > > > > com.javaforge.honeycomb.hivemind.hibernate.HibernateSessionFac
> > > > > > tory: java.lang.NullPointerException
> > > > > > location:
> > > > > > jar:file:/C:/home/dev/.m2/repository/com/javaforge/honeycomb/H
> > > > > > oneycombHibernate/0.3.3/HoneycombHibernate-0.3.3.jar!/META-INF
> > > > > > /hivemodule.xml, line 28, column 74
> > > > > >
> > > > > >
> > > >
> > --------------------------------------------------------------------
> > > > > > - To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > > > > > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > --------------------------------------------------------------------
> > > > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > --------------------------------------------------------------------
> > > > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to