Hi, please have a look to http://tomee.apache.org/containers-and-resources.html
format is <Resource ....> attribute = value otherKey = value2 ... </Resource> *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2012/10/15 CThorburn <cthorbu...@gmail.com> > I have spent three days now trying to get OpenJPA and Hibernate to work > under > both 1.0.0 and 1.5.0 web profiles without any luck so some help would be > much appreciated. I've tried this under Eclipse WTP and standalone with the > same results on startup. The truly maddening bits a re in bold below and > the > regex complaint is new for Hibernate. > > /Oct 15, 2012 10:42:16 AM org.apache.catalina.core.AprLifecycleListener > init > INFO: The APR based Apache Tomcat Native library which allows optimal > performance in production environments was not found on the > java.library.path: C:\Program > > Files\Java\jdk1.7.0_07\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program > > Files\7-Zip;C:\SERVERS\Apache2.2\PHP\;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program > Files\Intel\DMIX;C:\Program Files\ATI > > Technologies\ATI.ACE\Core-Static;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program > Files\Bazaar;C:\SERVERS\Ruby187\bin;. > Oct 15, 2012 10:42:16 AM org.apache.tomcat.util.digester.SetPropertiesRule > begin > WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting > property 'source' to 'org.eclipse.jst.jee.server:Trabajo-Web' did not find > a > matching property. > Oct 15, 2012 10:42:16 AM org.apache.coyote.AbstractProtocol init > INFO: Initializing ProtocolHandler ["http-bio-8080"] > Oct 15, 2012 10:42:16 AM org.apache.coyote.AbstractProtocol init > INFO: Initializing ProtocolHandler ["ajp-bio-8009"] > Oct 15, 2012 10:42:17 AM org.apache.openejb.util.OptionsLog info > INFO: Using > > 'openejb.jdbc.datasource-creator=org.apache.tomee.jdbc.TomEEDataSourceCreator' > Oct 15, 2012 10:42:17 AM org.apache.tomee.catalina.TomcatLoader > optionalService > INFO: Optional service not installed: > org.apache.tomee.webservices.TomeeJaxRsService > Oct 15, 2012 10:42:17 AM org.apache.tomee.catalina.TomcatLoader > optionalService > INFO: Optional service not installed: > org.apache.tomee.webservices.TomeeJaxWsService > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: > > ******************************************************************************** > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: OpenEJB http://openejb.apache.org/ > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: Startup: Mon Oct 15 10:42:17 BST 2012 > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: Copyright 1999-2012 (C) Apache OpenEJB Project, All Rights Reserved. > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: Version: 4.5.0 > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: Build date: 20120928 > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: Build time: 08:12 > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: > > ******************************************************************************** > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: openejb.home = C:\SERVERS\apache-tomee-webprofile-1.5.0 > Oct 15, 2012 10:42:17 AM org.apache.openejb.OpenEJB$Instance <init> > INFO: openejb.base = > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1 > Oct 15, 2012 10:42:17 AM org.apache.openejb.cdi.CdiBuilder initializeOWB > INFO: Created new singletonService > org.apache.openejb.cdi.ThreadSingletonServiceImpl@1f41bd4 > Oct 15, 2012 10:42:17 AM org.apache.openejb.cdi.CdiBuilder initializeOWB > INFO: Succeeded in installing singleton service > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > init > INFO: openejb configuration file is > > 'C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\tomee.xml' > Oct 15, 2012 10:42:17 AM org.apache.openejb.util.OptionsLog info > INFO: Using 'openejb.provider.default=org.apache.tomee' > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=Tomcat Security Service, type=SecurityService, > provider-id=Tomcat Security Service) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=Default Transaction Manager, > type=TransactionManager, provider-id=Default Transaction Manager) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=Default JDBC Database, type=Resource, > provider-id=Default JDBC Database) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=Default JDBC Database, type=Resource, > provider-id=Default JDBC Database) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=My Singleton Container, type=Container, > provider-id=Default Singleton Container) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=My Stateful Container, type=Container, > provider-id=Default Stateful Container) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureService > INFO: Configuring Service(id=My Stateless Container, type=Container, > provider-id=Default Stateless Container) > Oct 15, 2012 10:42:17 AM org.apache.openejb.util.OptionsLog info > INFO: Using 'openejb.system.apps=true' > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.ConfigurationFactory > configureApplication > INFO: Configuring enterprise application: null > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.InitEjbDeployments > deploy > INFO: Using openejb.deploymentId.format '{ejbName}' > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.InitEjbDeployments > deploy > INFO: Auto-deploying ejb openejb/Deployer: > EjbDeployment(deployment-id=openejb/Deployer) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.InitEjbDeployments > deploy > INFO: Auto-deploying ejb openejb/ConfigurationInfo: > EjbDeployment(deployment-id=openejb/ConfigurationInfo) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.InitEjbDeployments > deploy > INFO: Auto-deploying ejb MEJB: EjbDeployment(deployment-id=MEJB) > Oct 15, 2012 10:42:17 AM org.apache.openejb.config.AppInfoBuilder build > INFO: Enterprise application "openejb" loaded. > Oct 15, 2012 10:42:17 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating TransactionManager(id=Default Transaction Manager) > Oct 15, 2012 10:42:17 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating SecurityService(id=Tomcat Security Service) > Oct 15, 2012 10:42:17 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Resource(id=Default JDBC Database) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Resource(id=Default JDBC Database) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createResource > WARNING: unbounding resource openejb/Resource/Default JDBC Database can > happen because of a redeployment or because of a duplicated id > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Container(id=My Singleton Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Container(id=My Stateful Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.core.stateful.SimplePassivater > init > INFO: Using directory C:\Users\colin\AppData\Local\Temp for stateful > session > passivation > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Container(id=My Stateless Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Assembling app: openejb > Oct 15, 2012 10:42:18 AM org.apache.openejb.util.OptionsLog info > INFO: Using > 'openejb.jndiname.format={deploymentId}{interfaceType.openejbLegacyName}' > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=openejb/DeployerBusinessRemote) --> > Ejb(deployment-id=openejb/Deployer) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: > > Jndi(name=global/openejb/openejb/Deployer!org.apache.openejb.assembler.Deployer) > --> Ejb(deployment-id=openejb/Deployer) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=global/openejb/openejb/Deployer) --> > Ejb(deployment-id=openejb/Deployer) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=openejb/ConfigurationInfoBusinessRemote) --> > Ejb(deployment-id=openejb/ConfigurationInfo) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: > > Jndi(name=global/openejb/openejb/ConfigurationInfo!org.apache.openejb.assembler.classic.cmd.ConfigurationInfo) > --> Ejb(deployment-id=openejb/ConfigurationInfo) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=global/openejb/openejb/ConfigurationInfo) --> > Ejb(deployment-id=openejb/ConfigurationInfo) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=MEJB) --> Ejb(deployment-id=MEJB) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=global/openejb/MEJB!javax.management.j2ee.ManagementHome) > --> Ejb(deployment-id=MEJB) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.JndiBuilder > bind > INFO: Jndi(name=global/openejb/MEJB) --> Ejb(deployment-id=MEJB) > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.CdiBuilder initSingleton > INFO: Existing thread singleton service in SystemInstance() > org.apache.openejb.cdi.ThreadSingletonServiceImpl@1f41bd4 > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.OpenEJBLifecycle > startApplication > INFO: OpenWebBeans Container is starting... > Oct 15, 2012 10:42:18 AM org.apache.webbeans.plugins.PluginLoader startUp > INFO: Adding OpenWebBeansPlugin : [CdiPlugin] > Oct 15, 2012 10:42:18 AM org.apache.webbeans.plugins.PluginLoader startUp > INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin] > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.BeansDeployer > validateInjectionPoints > INFO: All injection points are validated successfully. > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.OpenEJBLifecycle > startApplication > INFO: OpenWebBeans Container has started, it took 94 ms. > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Created Ejb(deployment-id=openejb/Deployer, > ejb-name=openejb/Deployer, > container=My Stateless Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Created Ejb(deployment-id=MEJB, ejb-name=MEJB, container=My Stateless > Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Created Ejb(deployment-id=openejb/ConfigurationInfo, > ejb-name=openejb/ConfigurationInfo, container=My Stateless Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Started Ejb(deployment-id=openejb/Deployer, > ejb-name=openejb/Deployer, > container=My Stateless Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Started Ejb(deployment-id=MEJB, ejb-name=MEJB, container=My Stateless > Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Started Ejb(deployment-id=openejb/ConfigurationInfo, > ejb-name=openejb/ConfigurationInfo, container=My Stateless Container) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > deployMBean > INFO: Deployed > > MBean(openejb.user.mbeans:application=openejb,group=org.apache.openejb.assembler.monitoring,name=JMXDeployer) > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Deployed Application(path=openejb) > Oct 15, 2012 10:42:18 AM org.apache.openejb.server.SimpleServiceManager > start > INFO: ** Bound Services ** > Oct 15, 2012 10:42:18 AM org.apache.openejb.server.SimpleServiceManager > printRow > INFO: NAME IP PORT > Oct 15, 2012 10:42:18 AM org.apache.openejb.server.SimpleServiceManager > start > INFO: ------- > Oct 15, 2012 10:42:18 AM org.apache.openejb.server.SimpleServiceManager > start > INFO: Ready! > Oct 15, 2012 10:42:18 AM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 2366 ms > Oct 15, 2012 10:42:18 AM > org.apache.tomee.catalina.OpenEJBNamingContextListener bindResource > INFO: Importing a Tomcat Resource with id 'UserDatabase' of type > 'org.apache.catalina.UserDatabase'. > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Resource(id=UserDatabase) > Oct 15, 2012 10:42:18 AM org.apache.catalina.core.StandardService > startInternal > INFO: Starting service Catalina > Oct 15, 2012 10:42:18 AM org.apache.catalina.core.StandardEngine > startInternal > INFO: Starting Servlet Engine: Apache Tomcat/7.0.30 > Oct 15, 2012 10:42:18 AM org.apache.tomee.catalina.TomcatWebAppBuilder init > INFO: ------------------------- > TomcatWebAppBuilder.init > Oct 15, 2012 10:42:18 AM org.apache.openejb.config.ConfigurationFactory > configureApplication > INFO: Configuring enterprise application: > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT > Oct 15, 2012 10:42:18 AM org.apache.openejb.config.AppInfoBuilder build > INFO: Enterprise application > > "C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT" > loaded. > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Assembling app: > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.CdiBuilder initSingleton > INFO: Existing thread singleton service in SystemInstance() > org.apache.openejb.cdi.ThreadSingletonServiceImpl@1f41bd4 > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.OpenEJBLifecycle > startApplication > INFO: OpenWebBeans Container is starting... > Oct 15, 2012 10:42:18 AM org.apache.webbeans.plugins.PluginLoader startUp > INFO: Adding OpenWebBeansPlugin : [CdiPlugin] > Oct 15, 2012 10:42:18 AM org.apache.webbeans.plugins.PluginLoader startUp > INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin] > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.BeansDeployer > validateInjectionPoints > INFO: All injection points are validated successfully. > Oct 15, 2012 10:42:18 AM org.apache.openejb.cdi.OpenEJBLifecycle > startApplication > INFO: OpenWebBeans Container has started, it took 0 ms. > Oct 15, 2012 10:42:18 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Deployed > > Application(path=C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\ROOT) > Oct 15, 2012 10:42:19 AM org.apache.tomee.catalina.TomcatWebAppBuilder init > INFO: ------------------------- > TomcatWebAppBuilder.init /admin > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.DeploymentLoader > mergeBeansXml > SEVERE: Unable to read beans.xml from > > :file:/C:/projects/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/Trabajo-Web/WEB-INF/beans.xml > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.ConfigurationFactory > configureApplication > INFO: Configuring enterprise application: > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Trabajo-Web > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.InitEjbDeployments > deploy > INFO: Auto-deploying ejb EngineBean: > EjbDeployment(deployment-id=EngineBean) > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AutoConfig deploy > INFO: Configuring PersistenceUnit(name=trabajo, > provider=org.hibernate.ejb.HibernatePersistence) > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AutoConfig > logAutoCreateResource > *INFO: Auto-creating a Resource with id 'Default JDBC DatabaseNonJta' of > type 'DataSource for 'trabajo'. > *Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AutoConfig deploy > INFO: Configuring Service(id=Default JDBC DatabaseNonJta, type=Resource, > provider-id=Default JDBC Database) > Oct 15, 2012 10:42:19 AM org.apache.openejb.assembler.classic.Assembler > createRecipe > INFO: Creating Resource(id=Default JDBC DatabaseNonJta) > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AutoConfig > setJtaDataSource > *INFO: Adjusting PersistenceUnit trabajo <jta-data-source> to Resource ID > 'Default JDBC Database' from 'trabajo' > *Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AutoConfig > setNonJtaDataSource > INFO: Adjusting PersistenceUnit trabajo <non-jta-data-source> to Resource > ID > 'Default JDBC DatabaseNonJta' from 'trabajoUnmanaged' > Oct 15, 2012 10:42:19 AM org.apache.openejb.config.AppInfoBuilder build > INFO: Enterprise application > > "C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Trabajo-Web" > loaded. > Oct 15, 2012 10:42:19 AM org.apache.openejb.assembler.classic.Assembler > createApplication > INFO: Assembling app: > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Trabajo-Web > Oct 15, 2012 10:42:19 AM org.hibernate.annotations.common.Version <clinit> > INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final} > Oct 15, 2012 10:42:19 AM org.hibernate.Version logVersion > INFO: HHH000412: Hibernate Core {4.1.7.Final} > Oct 15, 2012 10:42:19 AM org.hibernate.cfg.Environment <clinit> > INFO: HHH000206: hibernate.properties not found > Oct 15, 2012 10:42:19 AM org.hibernate.cfg.Environment > buildBytecodeProvider > INFO: HHH000021: Bytecode provider name : javassist > Oct 15, 2012 10:42:19 AM org.hibernate.ejb.Ejb3Configuration configure > INFO: HHH000204: Processing PersistenceUnitInfo [ > name: trabajo > ...] > Oct 15, 2012 10:42:25 AM > org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator > instantiateExplicitConnectionProvider > INFO: HHH000130: Instantiating explicit connection provider: > org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider > Oct 15, 2012 10:42:26 AM org.hibernate.tool.hbm2ddl.SchemaExport execute > ERROR: HHH000231: Schema export unsuccessful > org.hibernate.tool.hbm2ddl.ImportScriptException: Error during statement > execution (file: '/import.sql'): insert into User (id, username, password, > createdOn, locale, langPref, name, title) values (1, 'blah', 'password', > '2012-09-25T14:00:00', 'en', 'en', 'blah blah', 'Mr') > at > org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:451) > at > org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:378) > at > org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:304) > at > org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:293) > at > > org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:487) > at > > org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750) > at > > org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) > at > > org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) > at > > org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) > at > > org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) > at > > org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:52) > at > > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:102) > at > > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:93) > at > > org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:150) > at > > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:658) > at > > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:532) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:793) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:746) > at > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > Caused by: java.sql.SQLDataException: data exception: invalid datetime > format > at org.hsqldb.jdbc.Util.sqlException(Unknown Source) > at org.hsqldb.jdbc.Util.sqlException(Unknown Source) > at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) > at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > > org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor$StatementProxy.invoke(StatementDecoratorInterceptor.java:238) > at $Proxy71.executeUpdate(Unknown Source) > at > > org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64) > at > org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:446) > ... 29 more > Caused by: org.hsqldb.HsqlException: data exception: invalid datetime > format > at org.hsqldb.error.Error.error(Unknown Source) > at org.hsqldb.error.Error.error(Unknown Source) > at org.hsqldb.Scanner.scanDateParts(Unknown Source) > at org.hsqldb.Scanner.newTimestamp(Unknown Source) > at org.hsqldb.Scanner.convertToDatetimeInterval(Unknown Source) > at org.hsqldb.types.DateTimeType.convertToType(Unknown Source) > at org.hsqldb.StatementDML.getInsertData(Unknown Source) > at org.hsqldb.StatementInsert.getResult(Unknown Source) > at org.hsqldb.StatementDMQL.execute(Unknown Source) > at org.hsqldb.Session.executeCompiledStatement(Unknown Source) > at org.hsqldb.Session.executeDirectStatement(Unknown Source) > at org.hsqldb.Session.execute(Unknown Source) > ... 39 more > > Oct 15, 2012 10:42:26 AM org.apache.tomee.catalina.OpenEJBContextConfig > processAnnotationsFile > SEVERE: OpenEJBContextConfig.processAnnotationsFile: failed. > java.util.regex.PatternSyntaxException: Unknown character property name {r} > near index 4 > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Trabajo-Web\WEB-INF\classes > ^ > at java.util.regex.Pattern.error(Pattern.java:1924) > at java.util.regex.Pattern.charPropertyNodeFor(Pattern.java:2730) > at java.util.regex.Pattern.family(Pattern.java:2685) > at java.util.regex.Pattern.sequence(Pattern.java:2043) > at java.util.regex.Pattern.expr(Pattern.java:1964) > at java.util.regex.Pattern.compile(Pattern.java:1665) > at java.util.regex.Pattern.<init>(Pattern.java:1337) > at java.util.regex.Pattern.compile(Pattern.java:1022) > at java.lang.String.replaceFirst(String.java:2119) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.getSubPackage(OpenEJBContextConfig.java:192) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsFile(OpenEJBContextConfig.java:151) > at > > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1296) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:89) > at > > org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) > at > > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > > Oct 15, 2012 10:42:26 AM org.apache.tomee.catalina.OpenEJBContextConfig > processAnnotationsFile > SEVERE: OpenEJBContextConfig.processAnnotationsFile: failed. > java.util.regex.PatternSyntaxException: Unknown character property name {r} > near index 4 > > C:\projects\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Trabajo-Web\WEB-INF\classes > ^ > at java.util.regex.Pattern.error(Pattern.java:1924) > at java.util.regex.Pattern.charPropertyNodeFor(Pattern.java:2730) > at java.util.regex.Pattern.family(Pattern.java:2685) > at java.util.regex.Pattern.sequence(Pattern.java:2043) > at java.util.regex.Pattern.expr(Pattern.java:1964) > at java.util.regex.Pattern.compile(Pattern.java:1665) > at java.util.regex.Pattern.<init>(Pattern.java:1337) > at java.util.regex.Pattern.compile(Pattern.java:1022) > at java.lang.String.replaceFirst(String.java:2119) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.getSubPackage(OpenEJBContextConfig.java:192) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.processAnnotationsFile(OpenEJBContextConfig.java:151) > at > > org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1296) > at > > org.apache.tomee.catalina.OpenEJBContextConfig.webConfig(OpenEJBContextConfig.java:89) > at > > org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878) > at > > org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > / > > > The config that I believe affects things: > > conf/system.properties (nothing set) > > conf/context.xml > <Context> > <WatchedResource>WEB-INF/web.xml</WatchedResource> > </Context> > > conf/server.xml > <Server port="8005" shutdown="SHUTDOWN"> > <Listener className="org.apache.tomee.catalina.ServerListener"/> > <Listener SSLEngine="on" > className="org.apache.catalina.core.AprLifecycleListener"/> > <Listener className="org.apache.catalina.core.JasperListener"/> > <Listener > className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/> > <Listener > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> > <Listener > className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/> > > <GlobalNamingResources> > <Resource auth="Container" description="User database that can be > updated and saved" > factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > name="UserDatabase" pathname="conf/tomcat-users.xml" > type="org.apache.catalina.UserDatabase"/> > </GlobalNamingResources> > > <Service name="Catalina"> > <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/> > <Engine defaultHost="localhost" name="Catalina"> > > <Realm className="org.apache.catalina.realm.LockOutRealm"> > <Realm className="org.apache.catalina.realm.UserDatabaseRealm" > resourceName="UserDatabase"/> > </Realm> > > <Host appBase="webapps" autoDeploy="true" name="localhost" > unpackWARs="true"> > > <Valve className="org.apache.catalina.valves.AccessLogValve" > directory="logs" pattern="%h %l %u %t "%r" %s %b" > prefix="localhost_access_log." suffix=".txt"/> > > <Context docBase="Trabajo-Web" path="/admin" reloadable="true" > source="org.eclipse.jst.jee.server:Trabajo-Web"/></Host> > </Engine> > </Service> > </Server> > > > > > > conf/tomee.xml > <?xml version="1.0" encoding="UTF-8"?> > <tomee> > > > <Container id="My Singleton Container" type="SINGLETON"> > # Specifies the maximum time an invocation could wait for the > # singleton bean instance to become available before giving up. > # > # After the timeout is reached a > javax.ejb.ConcurrentAccessTimeoutException > # will be thrown. > # > # Usable time units: nanoseconds, microsecons, milliseconds, > # seconds, minutes, hours, days. Or any combination such as > # "1 hour and 27 minutes and 10 seconds" > > AccessTimeout = 30 seconds > > </Container> > > > <Container id="My Stateful Container" type="STATEFUL"> > # Specifies the maximum time an invocation could wait for the > # stateful bean instance to become available before giving up. > # > # After the timeout is reached a > javax.ejb.ConcurrentAccessTimeoutException > # will be thrown. > # > # Usable time units: nanoseconds, microsecons, milliseconds, > # seconds, minutes, hours, days. Or any combination such as > # "1 hour and 27 minutes and 10 seconds" > > AccessTimeout = 30 seconds > > # The passivator is responsible for writing beans to disk > # at passivation time. Different passivators can be used > # by setting this property to the fully qualified class name > # of the PassivationStrategy implementation. The passivator > # is not responsible for invoking any callbacks or other > # processing, its only responsibly is to write the bean state > # to disk. > # > # Known implementations: > # org.apache.openejb.core.stateful.RAFPassivater > # org.apache.openejb.core.stateful.SimplePassivater > > Passivator org.apache.openejb.core.stateful.SimplePassivater > > # Specifies the time to wait between invocations. This > # value is measured in minutes. A value of 5 would > # result in a time-out of 5 minutes between invocations. > # A value of zero would mean no timeout. > > TimeOut 20 > > # Specifies the frequency (in seconds) at which the bean cache is checked > for > # idle beans. > > Frequency 60 > > # Specifies the size of the bean pools for this > # stateful SessionBean container. > > Capacity 1000 > > # Property name that specifies the number of instances > # to passivate at one time when doing bulk passivation. > # Must be less than the PoolSize. > > BulkPassivate 100 > > </Container> > > > <Container id="My Stateless Container" type="STATELESS"> > > # Specifies the time an invokation should wait for an instance > # of the pool to become available. > # > # After the timeout is reached, if an instance in the pool cannot > # be obtained, the method invocation will fail. > # > # Usable time units: nanoseconds, microsecons, milliseconds, > # seconds, minutes, hours, days. Or any combination such as > # "1 hour and 27 minutes and 10 seconds" > > AccessTimeout = 30 seconds > > # Specifies the size of the bean pools for this stateless > # SessionBean container. If StrictPooling is not used, instances > # will still be created beyond this number if there is demand, but > # they will not be returned to the pool and instead will be > # immediately destroyed. > > MaxSize = 10 > > # Specifies the minimum number of bean instances that should be in > # the pool for each bean. Pools are prefilled to the minimum on > # startup. Note this will create start order dependencies between > # other beans that also eagerly start, such as other @Stateless > # beans with a minimum or @Singleton beans using @Startup. The > # @DependsOn annotation can be used to appropriately influence > # start order. > # > # The minimum pool size is rigidly maintained. Instances in the > # minimum side of the pool are not eligible for IdleTimeout or > # GarbageCollection, but are subject to MaxAge and flushing. > # > # If the pool is flushed it is immediately refilled to the minimum > # size with MaxAgeOffset applied. If an instance from the minimum > # side of the pool reaches its MaxAge, it is also immediately > # replaced. Replacement is done in a background queue using the > # number of threads specified by CallbackThreads. > > MinSize = 0 > > # StrictPooling tells the container what to do when the pool > # reaches it's maximum size and there are incoming requests that > # need instances. > # > # With strict pooling, requests will have to wait for instances to > # become available. The pool size will never grow beyond the the > # set MaxSize value. The maximum amount of time a request should > # wait is specified via the AccessTimeout setting. > # > # Without strict pooling, the container will create temporary > # instances to meet demand. The instances will last for just one > # method invocation and then are removed. > # > # Setting StrictPooling to false and MaxSize to 0 will result in > # no pooling. Instead instances will be created on demand and live > # for exactly one method call before being removed. > > StrictPooling = true > > # Specifies the maximum time that an instance should live before > # it should be retired and removed from use. This will happen > # gracefully. Useful for situations where bean instances are > # designed to hold potentially expensive resources such as memory > # or file handles and need to be periodically cleared out. > # > # Usable time units: nanoseconds, microsecons, milliseconds, > # seconds, minutes, hours, days. Or any combination such as > # "1 hour and 27 minutes and 10 seconds" > > MaxAge = 0 hours > > # Specifies the maximum time that an instance should be allowed to > # sit idly in the pool without use before it should be retired and > # removed. > # > # Usable time units: nanoseconds, microsecons, milliseconds, > # seconds, minutes, hours, days. Or any combination such as > # "1 hour and 27 minutes and 10 seconds" > > IdleTimeout = 0 minutes > > </Container> > > <Resource name="trabajo" auth="Container" type="javax.sql.DataSource" > maxActive="100" maxIdle="30" maxWait="10000" > username="colin" password="colin" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/trabajo"/> > > <Resource name="trabajoUnmanaged" auth="Container" > type="javax.sql.DataSource" > maxActive="100" maxIdle="30" maxWait="10000" > username="colin" password="colin" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/trabajo"/> > > > <Deployments dir="apps/" /> > > </tomee> > > > > persistence.xml > <persistence xmlns="http://java.sun.com/xml/ns/persistence" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/persistence > http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" > version="2.0"> > <persistence-unit name="trabajo"> > <provider>org.hibernate.ejb.HibernatePersistence</provider> > <transaction-type>JTA</transaction-type> > <jta-data-source>trabajo</jta-data-source> > <non-jta-data-source>trabajoUnmanaged</non-jta-data-source> > > > <class>com.trabajo.jpa.UserJPA</class> > <properties> > <property name="hibernate.hbm2ddl.auto" value="create-drop"/> > </properties> > </persistence-unit> > </persistence> > > I've got the suggested hibernate jars in {tomme_install}/lib > > I can't think of anything else I should need other than to ask: if I've > failed to set up my application datasources correctly surely a failure > indication is more in order rather than an aribtrary assignment to an HSQL > instance and a warning? > > > > > > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/DataSource-Adjustment-tp4658033.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >