java - Maven project for Spring MVC Deploying in GlassFish Error(s) -


i have spring mvc web app created maven project. try deploy/run in glassfish, , receive following error(s).

the error(s) below:

cannot deploy springmvcjdbctemplate deploy failing=error occurred during deployment: exception while loading app : java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: org.apache.catalina.lifecycleexception: java.lang.classnotfoundexception: com.microsoft.sqlserver.jdbc.sqlserverdriver. please see server.log more details.

below have in 'pom.xml' file:

<dependencies>     <dependency>         <groupid>aopalliance</groupid>         <artifactid>aopalliance</artifactid>         <version>1.0</version>     </dependency>                <dependency>         <groupid>com.microsoft.sqlserver</groupid>         <artifactid>sqljdbc4</artifactid>         <version>4.0</version>         <scope>runtime</scope>     </dependency>                    <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-jdbc</artifactid>         <version>4.1.3.release</version>     </dependency>      <!-- spring core & mvc -->     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-context</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-webmvc</artifactid>         <version>${spring.version}</version>     </dependency>     <dependency>         <groupid>org.springframework</groupid>         <artifactid>spring-orm</artifactid>         <version>${spring.version}</version>         <type>jar</type>         <scope>compile</scope>     </dependency>             <!-- cglib @configuration -->     <dependency>         <groupid>cglib</groupid>         <artifactid>cglib-nodep</artifactid>         <version>${cglib.version}</version>         <scope>runtime</scope>     </dependency>      <!-- servlet spec -->     <dependency>         <groupid>javax.servlet</groupid>         <artifactid>javax.servlet-api</artifactid>         <version>3.1.0</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>javax.servlet.jsp</groupid>         <artifactid>javax.servlet.jsp-api</artifactid>         <version>2.3.1</version>         <scope>provided</scope>     </dependency>     <dependency>         <groupid>jstl</groupid>         <artifactid>jstl</artifactid>         <version>1.2</version>     </dependency> </dependencies> 

and have in 'mvcconfiguration.java' file (i use 'spring-mvc-achetype' maven project):

@bean public datasource getdatasource() {     drivermanagerdatasource datasource = new drivermanagerdatasource();     datasource.setdriverclassname("com.microsoft.sqlserver.jdbc.sqlserverdriver");     datasource.seturl("jdbc:sqlserver://7d0\\mssqlserver:1433;databasename=db_name");     datasource.setusername("usrnm");     datasource.setpassword("pwd");      return datasource; } 

i have added 'sqljdbc4.jar' file in 'c:\users\7d0.m2\repository\com\microsoft\sqlserver\sqljdbc4\4.0\', still receive same error(s).

how should fix error(s)? advance.

try place sqlserver jar file in lib dir of glassfish server


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -