Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. spring.datasource.url = jdbc:as400://blahblah....
  2. spring.datasource.username = myuser
  3. spring.datasource.password = password
  4. spring.datasource.driver-class-name=com.ibm.as400.access.AS400JDBCDriver
  5.  
  6. <GlobalNamingResources>
  7. <Resource name="jdbc/BLAH" ..... />
  8. </GlobalNamingResources>
  9.  
  10. spring.datasource.jndi-name=java:comp/env/jdbc/BLAH
  11. spring.jpa.database-platform=org.hibernate.dialect.DB2400Dialect
  12. spring.jpa.show-sql=true
  13.  
  14. o.s.w.c.s.GenericWebApplicationContext :
  15. Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException:
  16. Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration':
  17. Unsatisfied dependency expressed through constructor parameter 0;
  18. nested exception is org.springframework.beans.factory.BeanCreationException:
  19.  
  20. Error creating bean with name 'dataSource' defined in class path resource
  21. [org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfiguration.class]:
  22.  
  23. Bean instantiation via factory method failed;
  24. nested exception is org.springframework.beans.BeanInstantiationException:
  25. Failed to instantiate [javax.sql.DataSource]:
  26.  
  27. Factory method 'dataSource' threw exception; nested exception is
  28. org.springframework.jdbc.datasource.lookup.DataSourceLookupFailureException:
  29.  
  30. Failed to look up JNDI DataSource with name 'java:comp/env/jdbc/BLAH';
  31.  
  32. nested exception is javax.naming.NoInitialContextException:
  33. Need to specify class name in environment or system property, or as an applet parameter,
  34. or in an application resource file: java.naming.factory.initial
  35.  
  36. <parent>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-parent</artifactId>
  39. <version>1.4.2.RELEASE</version>
  40. <relativePath/>
  41. </parent>
  42. ...
  43. <dependencies>
  44. <dependency>
  45. <groupId>net.sf.jt400</groupId>
  46. <artifactId>jt400</artifactId>
  47. <version>6.7</version>
  48. <scope>provided</scope>
  49. </dependency>
  50. <dependency>
  51. <groupId>com.vaadin</groupId>
  52. <artifactId>vaadin-spring-boot-starter</artifactId>
  53. <version>1.1.1</version>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-web</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-data-jpa</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.springframework.boot</groupId>
  65. <artifactId>spring-boot-starter-tomcat</artifactId>
  66. <scope>provided</scope>
  67. </dependency>
  68. ....
  69. </dependencies>
  70.  
  71. @SpringBootApplication
  72. public class MyApplication {
  73. public static void main(String[] args) {
  74. SpringApplication.run(MyApplication.class, args);
  75. }
  76. }
  77.  
  78.  
  79. @SpringBootConfiguration
  80. @EnableAutoConfiguration
  81. @ComponentScan(basePackages = "com.company.myapp")
  82. @EnableJpaRepositories(basePackages = "com.company.myapp.repository")
  83. @EnableTransactionManagement
  84. @EnableVaadin
  85. @EnableVaadinServlet
  86. public class AppConfiguration {
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement