Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spring.datasource.url = jdbc:as400://blahblah....
- spring.datasource.username = myuser
- spring.datasource.password = password
- spring.datasource.driver-class-name=com.ibm.as400.access.AS400JDBCDriver
- <GlobalNamingResources>
- <Resource name="jdbc/BLAH" ..... />
- </GlobalNamingResources>
- spring.datasource.jndi-name=java:comp/env/jdbc/BLAH
- spring.jpa.database-platform=org.hibernate.dialect.DB2400Dialect
- spring.jpa.show-sql=true
- o.s.w.c.s.GenericWebApplicationContext :
- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException:
- Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration':
- Unsatisfied dependency expressed through constructor parameter 0;
- nested exception is org.springframework.beans.factory.BeanCreationException:
- Error creating bean with name 'dataSource' defined in class path resource
- [org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfiguration.class]:
- Bean instantiation via factory method failed;
- nested exception is org.springframework.beans.BeanInstantiationException:
- Failed to instantiate [javax.sql.DataSource]:
- Factory method 'dataSource' threw exception; nested exception is
- org.springframework.jdbc.datasource.lookup.DataSourceLookupFailureException:
- Failed to look up JNDI DataSource with name 'java:comp/env/jdbc/BLAH';
- nested exception is javax.naming.NoInitialContextException:
- Need to specify class name in environment or system property, or as an applet parameter,
- or in an application resource file: java.naming.factory.initial
- <parent>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-parent</artifactId>
- <version>1.4.2.RELEASE</version>
- <relativePath/>
- </parent>
- ...
- <dependencies>
- <dependency>
- <groupId>net.sf.jt400</groupId>
- <artifactId>jt400</artifactId>
- <version>6.7</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.vaadin</groupId>
- <artifactId>vaadin-spring-boot-starter</artifactId>
- <version>1.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-jpa</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-tomcat</artifactId>
- <scope>provided</scope>
- </dependency>
- ....
- </dependencies>
- @SpringBootApplication
- public class MyApplication {
- public static void main(String[] args) {
- SpringApplication.run(MyApplication.class, args);
- }
- }
- @SpringBootConfiguration
- @EnableAutoConfiguration
- @ComponentScan(basePackages = "com.company.myapp")
- @EnableJpaRepositories(basePackages = "com.company.myapp.repository")
- @EnableTransactionManagement
- @EnableVaadin
- @EnableVaadinServlet
- public class AppConfiguration {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement