14 Replies Latest reply on Nov 17, 2008 6:37 PM by R Vince

    Cant figure why I cant run this example

    R Vince Newbie

      I am trying to deploy an application that utilizes Struts & Spring & JPA & Hibernate as found and detailed at the Apache site:

      http://struts.apache.org/2.0.12/docs/struts-2-spring-2-jpa-ajax.html

      I think there must be something missing in that article (particularly to configuring for mysql ) When I create my war file and go to deploy it, I get the JBoss trace below -- can anyone tell me, from that, what I am missing or need to do? Somehow, I smell I dont have things configured properly for mysql, though I have followed everything in that article. -R. Vince

      ---JBOSS Trace -----

      11:19:45,281 INFO [TomcatDeployer] deploy, ctxPath=/ssa, warUrl=.../tmp/deploy/
      tmp57256ssa-exp.war/
      11:19:46,921 INFO [WebappClassLoader] validateJarFile(G:\jboss-4.2.3.GA\server\
      default\.\tmp\deploy\tmp57256ssa-exp.war\WEB-INF\lib\servlet-api.jar) - jar not
      loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Serv
      let.class
      11:19:47,453 INFO [[/ssa]] Initializing Spring root WebApplicationContext
      11:19:47,468 INFO [ContextLoader] Root WebApplicationContext: initialization st
      arted
      11:19:47,515 INFO [XmlWebApplicationContext] Refreshing org.springframework.web
      .context.support.XmlWebApplicationContext@4cb3a4: display name [Root WebApplicat
      ionContext]; startup date [Sat Nov 15 11:19:47 EST 2008]; root of context hierar
      chy
      11:19:47,625 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from S
      ervletContext resource [/WEB-INF/applicationContext.xml]
      11:19:47,781 INFO [XmlWebApplicationContext] Bean factory for application conte
      xt [org.springframework.web.context.support.XmlWebApplicationContext@4cb3a4]: or
      g.springframework.beans.factory.support.DefaultListableBeanFactory@14e1705
      11:19:48,546 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in
      org.springframework.beans.factory.support.DefaultListableBeanFactory@14e1705: de
      fining beans [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostP
      rocessor#0,personService,entityManagerFactory,dataSource,transactionManager,org.
      springframework.aop.config.internalAutoProxyCreator,org.springframework.transact
      ion.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transa
      ction.interceptor.TransactionInterceptor#0,org.springframework.transaction.confi
      g.internalTransactionAdvisor,personAction]; root of factory hierarchy
      11:19:48,656 INFO [DriverManagerDataSource] Loaded JDBC driver: com.mysql.jdbc.
      Driver
      11:19:49,078 INFO [LocalContainerEntityManagerFactoryBean] Building JPA contain
      er EntityManagerFactory for persistence unit 'punit'
      11:19:49,125 INFO [Version] Hibernate EntityManager 3.2.1.GA
      11:19:49,140 INFO [Version] Hibernate Annotations 3.2.1.GA
      11:19:49,156 INFO [Environment] Hibernate 3.2.4.sp1
      11:19:49,171 INFO [Environment] hibernate.properties not found
      11:19:49,171 INFO [Environment] Bytecode provider name : javassist
      11:19:49,187 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      11:19:49,421 INFO [Ejb3Configuration] found EJB3 Entity bean: quickstart.model.
      Person
      11:19:49,453 INFO [Configuration] Reading mappings from resource : META-INF/orm
      .xml
      11:19:49,453 INFO [Ejb3Configuration] [PersistenceUnit: punit] no META-INF/orm.
      xml found
      11:19:49,531 INFO [AnnotationBinder] Binding entity from annotated class: quick
      start.model.Person
      11:19:49,593 INFO [EntityBinder] Bind entity quickstart.model.Person on table P
      erson
      11:19:49,781 INFO [ConnectionProviderFactory] Initializing connection provider:
      org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      11:19:49,796 INFO [InjectedDataSourceConnectionProvider] Using provided datasou
      rce
      11:19:49,953 WARN [SettingsFactory] Could not obtain connection metadata
      java.sql.SQLException: Access denied for user 'root'@'localhost' (using password
      : YES)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771)
      at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3649)
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2558)
      at com.mysql.jdbc.Connection.(Connection.java:1485)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
      :266)
      at java.sql.DriverManager.getConnection(DriverManager.java:582)
      at java.sql.DriverManager.getConnection(DriverManager.java:154)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnec
      tionFromDriverManager(DriverManagerDataSource.java:174)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnec
      tionFromDriver(DriverManagerDataSource.java:165)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.get
      ConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.get
      Connection(AbstractDriverBasedDataSource.java:119)
      at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
      Connection(InjectedDataSourceConnectionProvider.java:47)
      .
      .
      .