Package Web app with MSBuild on Windows Server 2012 RC - msbuild

I'm using a Windows Server 2012 RC with IIS 8 (on Windows Azure, the new VMs).
I've got TeamCity installed as my build server. I migrated from a current installation where everything worked fine.
The only thing that doesn't work is running MSBuild with the Package target against an ASP.NET MVC 3 application.
The last section of the MSBuild log, just before it has to actually create the package looks like this:
[MyProject\MyProject.MvcClient\MyProject.MvcClient\MyProject.MvcClient.csproj] PipelinePreDeployCopyAllFilesToOneFolder
[21:46:16][PipelinePreDeployCopyAllFilesToOneFolder] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] Publish Pipeline Deploy phase Pre-Deploy CopyAllFilesToOneFolder Stage
[21:46:16][MyProject\MyProject.MvcClient\MyProject.MvcClient\MyProject.MvcClient.csproj] Package
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] Invoking Web Deploy to generate the package with the following settings:
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(LocalIisVersion) is 7
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(DestinationIisVersion) is 7
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(UseIis) is True
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IisUrl) is http://myproject.web
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IncludeIisSettings) is true
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(_DeploymentUseIis) is True
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(DestinationUseIis) is True
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IisUrl_SiteID) is 2
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IisUrl_SiteFriendlyName) is myproject.web
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IisUrl_SiteRelativePath) is /
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(IisServer_IisAppPoolName) is myproject.web
[21:46:16][Package] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] $(_Destination_IisServer_IisAppPoolName) is myproject.web
[21:46:16][Package] MakeDir
[21:46:16][MakeDir] Creating directory "F:\Workspace\DeployPackages\2012-07-11_09-45-53\".
[21:46:16][Package] CallTarget
[21:46:16][CallTarget] GenerateMsdeployManifestFiles
[21:46:16][GenerateMsdeployManifestFiles] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] Generate source manifest file for Web Deploy package/publish ...
[21:46:16][GenerateMsdeployManifestFiles] CallTarget
[21:46:16][CallTarget] CollectDatabasesToPublish
[21:46:16][CollectDatabasesToPublish] MakeDir
[21:46:16][MakeDir] Creating directory "obj\Release\Database".
[21:46:16][CallTarget] PackageUsingManifest
[21:46:16][PackageUsingManifest] GetPublishingLocalizedString
[21:46:16][GetPublishingLocalizedString] Packaging into F:\Workspace\DeployPackages\2012-07-11_09-45-53\MyProject.msbuild.zip.
[21:46:16][PackageUsingManifest] VSMSDeploy
[21:46:16][VSMSDeploy] Starting Web deployment task from source:manifest(F:\Workspace\DeployPackages\2012-07-11_09-45-53\MyProject.msbuild.SourceManifest.xml) to Destination:package(F:\Workspace\DeployPackages\2012-07-11_09-45-53\MyProject.msbuild.zip).
[21:46:16][VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009, 5): Web deployment task failed. (There was an error reading IIS configuration schema from 'C:\Windows\system32\inetsrv\config\schema\'.)
[21:46:16][VSMSDeploy] Package failed.
[21:46:16][MyProject\MyProject.MvcClient\MyProject.MvcClient\MyProject.MvcClient.csproj] Project MyProject\MyProject.MvcClient\MyProject.MvcClient\MyProject.MvcClient.csproj failed.
[21:46:16][MyProject\MyProject.msbuild.teamcity] Project MyProject\MyProject.msbuild.teamcity failed.
[21:46:16]Process exited with code 1
And the actual error message being this:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3009, 5): Web deployment task failed. (There was an error reading IIS configuration schema from 'C:\Windows\system32\inetsrv\config\schema\'.)
First, I tried running the build agent as Administrator, since I thought this might be security related. That didn't help.
Then I tried to install Web Deploy 3.0 on the server. No luck either.
Last thing I can do, but really don't want to do -- is to remove the IIS settings from the project file.
Any ideas?

Related

CruiseControl.Net restarts after project with msbuild task

I'm trying to setup a fairly simple CruiseControl.NET build server and I'm seeing strange behavior with a project using MSBuild. Everytime the project's build is run and it executes msbuild (either through forcing or through a change in source control), the build completes successfully but CCNet also restarts. I notice this because the 'Next Build Time' of all the projects are moved ahead to the current time + initialSeconds.
This behavior appears whether I'm running CCNet as a serivce or through the command line executable.
When running on the command line, the debug output doesn't give me anything useful - it just immediately jumps from the last line of the project's build to the 'startup' output.
Additional information:
TFS is the source control server
My build is only hitting the working directory
My publish is just copying from the working directory to the artifact directory
If I comment out the msbuild task, running the project build does not restart CruiseControl
Not hitting or updating the Server or State directories of CruiseControl during build
Nothing useful in Event Viewer when this happens and I'm running as a service. CCService doesn't report stopping/starting - it's like cruise control is internally restarting.
And here is the msbuild configuration:
<tasks>
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>$[$CCNetWorkingDirectory]\$(PathToSolution)</workingDirectory>
<projectFile>$(SolutionFile)</projectFile>
<buildArgs>/p:Configuration=Release /v:d</buildArgs>
<timeout>900</timeout>
</msbuild>
</tasks>
Finally, here is the trace log at the end of the msbuild process / restart of server.
Done building target "Build" in project "MYAPP.sln".
Done Building Project "C:\CCNet\WD\NET\Main\MYAPP\MYAPP.sln" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:05.35
2014-08-26 20:11:41,881 [NET.App.MYAPP] [INFO] - Delete merged file 'C:\CCNet\BuildArtifacts\NET.App.MYAPP\msbuild-results-dcf002da-d0d0-4d0a-8b86-fb25adaf1ac3.xml'.
2014-08-26 20:11:46,478 [NET.App.MYAPP] [INFO] - Integration complete: Success - 8/26/2014 8:11:41 PM
2014-08-26 20:11:46,579 [NET.App.MYAPP] [INFO] - Integrator for project: NET.App.MYAPP is now stopped.
2014-08-26 20:11:57,444 [257] [INFO] - CruiseControl.NET Server 1.8.5.0 -- .NET Continuous Integration Server
2014-08-26 20:11:57,465 [257] [INFO] - Copyright © 2003 - 2014 ThoughtWorks Inc. All Rights Reserved.
2014-08-26 20:11:57,466 [257] [INFO] - .NET Runtime Version: 2.0.50727.5477 Image Runtime Version: v2.0.50727
2014-08-26 20:11:57,467 [257] [INFO] - OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1 Server locale: English (United States)
2014-08-26 20:11:57,467 [257] [INFO] - Reason: File change delay finished
2014-08-26 20:11:57,944 [CCNet Server] [INFO] - Reading configuration file "C:\CCNet\Server\ccnet.config"
2014-08-26 20:11:58,347 [CCNet Server] [WARN] - Configuration does not have any version information - assuming the configuration is for version 1.8
2014-08-26 20:11:58,800 [CCNet Server] [INFO] - Log cache time set to 5 minutes
2014-08-26 20:11:58,990 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,991 [CCNet Server] [INFO] - CruiseManager: Listening on url: tcp://32.32.29.129:21234/CruiseManager.rem
2014-08-26 20:11:58,992 [CCNet Server] [INFO] - Registered channel: tcp
2014-08-26 20:11:58,993 [CCNet Server] [INFO] - CruiseServerClient: Listening on url: tcp://32.32.29.129:21234/CruiseServerClient.rem
2014-08-26 20:11:58,994 [CCNet Server] [INFO] - Starting CruiseControl.NET Server
It looks like ccnet is noticing a change to a .dll file within the application directory and restarting to assimilate the changes.
Ccnet is looking for changes to any .dll file so if your build outputs at least one to this directory it would cause a restart.

Worklight 6.1.0.1 ant build on z/Linux - encoding issue? bug?

I have a jazz build server I am using to build my application using the provided ant scripts. The build works fine on our AIX build server. However, I migrated to another server running z/Linux and the application will not load.
I compared the two wlapp files and there is only one difference between them.
On AIX (working), the following code appears in index.html:
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
on z/Linux (not working), the following code appears in index.html
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
This section of code is injected by the worklight ant tasks. It is not our code.
Any suggestions?
Tried it again:
wslnx029:/home/wl # cat build.xml
<project basedir="." name="build-tools" default="build-application">
<taskdef resource="com/worklight/ant/defaults.properties">
<classpath>
<pathelement location="/home/wl/worklight-ant-builder-6.1.0.jar" />
</classpath>
</taskdef>
<target name="build-application">
<app-builder applicationfolder="/home/wl/proj6101/apps/app6101"
worklightserverhost="http://localhost:9080/worklight"
outputfolder="/home/wl/proj6101/bin"/>
</target>
</project>
wslnx029:/home/wl # ./apache-ant-1.7.1/bin/ant -verbose
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: /home/wl/ibm-java-s390x-60/jre
Detected OS: Linux
parsing buildfile /home/wl/build.xml with URI = file:/home/wl/build.xml
Project base dir set to: /home/wl
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `build-application' is [build-application]
Complete build sequence is [build-application, ]
build-application:
[echo] Worklight Ant Task version 6.1.0.01.20140801-1626
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.builder.sourcemanager.handlers.android.AndroidManifestSourceHandler checkBuildTarget
[app-builder] WARNING: FWLST1119W: Android build will fail because the API level used to compile the project is not supported by the Worklight Studio.
[app-builder] It is recommended to use Android API level 18 which is the latest API level supported by the Worklight Studio. Use the Android SDK Manager to install API level 18, configure your project to build with API level 18 by updating the Project Build Target in Project / Properties / Android dialog.
[app-builder] Aug 4, 2014 9:43:19 AM com.worklight.ant.builders.ApplicationBuilderTask execute
[app-builder] SUCCESS: FWLST2001I: Successfully built environments: [android, common]
BUILD SUCCESSFUL
Total time: 1 second
This is the resulting HTML part:
<script>
// Define WL namespace.
var WL = WL ? WL : {};
/**
* WLClient configuration variables.
* Values are injected by the deployer that packs the gadget.
*/
WL.StaticAppProps = {
"APP_DISPLAY_NAME": "app6101",
"APP_ID": "app6101",
"APP_SERVICES_URL": "\/apps\/services\/",
"APP_VERSION": "1.0",
"ENVIRONMENT": "android",
"LOGIN_DISPLAY_TYPE": "embedded",
"WORKLIGHT_NATIVE_VERSION": "3180588129",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140716-1751",
"WORKLIGHT_ROOT_URL": "\/apps\/services\/api\/app6101\/android\/"
};</script>

worklight build failed due to missing "temp" files of my html

I've been running builds successfully for weeks, but the builds started failing this morning. I tried dropping the WorklightServerHome folder so that the schema would be recreated, but that didn't solve it. Any ideas?
[2013-03-29 09:11:47] Worklight Server started successfully on localhost:8080
[2013-03-29 09:11:47] Activating Worklight project: MyFishingReportProject2...
[2013-03-29 09:11:50] FWLSE3005I: Application raw reports are disabled.
[2013-03-29 09:11:50] FWLST0010I: ====== Started server for project MyFishingReportProject2-project-customization; Worklight version=5.0.6.20130311-0918-developer-edition
[2013-03-29 09:11:50] Activation done.
[2013-03-29 09:11:50] Starting adapter deployment on Worklight Server
[2013-03-29 09:11:50] Deploying adapter: FishingReportDB
[2013-03-29 09:11:50] Server host: localhost
[2013-03-29 09:11:50] Server port: 8080
[2013-03-29 09:11:51] FWLSE0084I: Deployed adapter 'FishingReportDB' successfully.
[2013-03-29 09:11:51] Adapter deployed successfully
[2013-03-29 09:11:54] Activation done.
[2013-03-29 09:11:56] Starting build process: application 'MyFishingReport', all environments
[2013-03-29 09:11:57] FWLST1040E: common build failed: File 'C:\Users\IBM_AD~1\AppData\Local\Temp\worklightBuildcommon5213198707751472627\preview\default\MyFishingReport.html' does not exist
[2013-03-29 09:11:59] FWLST1040E: mobilewebapp build failed: File 'C:\Users\IBM_AD~1\AppData\Local\Temp\worklightBuildmobilewebapp2958050589803221945\www\default\MyFishingReport.html' does not exist
[2013-03-29 09:12:00] FWLST1040E: android build failed: File 'C:\Users\IBM_AD~1\AppData\Local\Temp\worklightBuildandroid8850935126627789257\www\default\MyFishingReport.html' does not exist
[2013-03-29 09:12:00] Application 'MyFishingReport' with all environments build finished.
[2013-03-29 09:12:00] FWLST1035I: No environments to build.
As the user wrote in a comment, the problem happened due to accidental move operation of the HTML file from its right location (the root of the apps\theApp folder).

Unable to deploy artifacts

I get the following when trying to deploy artifcats from within my job:
[ERROR] uniqueVersion == false is not anymore supported in maven 3
[INFO] Deployment in dav:https://repository-xinco.forge.cloudbees.com/snapshot (id=cloudbees-private-repository,uniqueVersion=false)
Deploying the main artifact Card-Game-Extension-1.0-SNAPSHOT.pom
Downloading: dav:https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/maven-metadata.xml
Uploading: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom
Uploading: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom
ERROR: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:141)
at hudson.maven.reporters.MavenArtifactRecord.deploy(MavenArtifactRecord.java:182)
at hudson.maven.RedeployPublisher.perform(RedeployPublisher.java:158)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:707)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:682)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:997)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:629)
at hudson.model.Run.run(Run.java:1433)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
Caused by: org.sonatype.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:280)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:211)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:443)
at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:137)
... 11 more
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact simple.server:Card-Game-Extension:pom:1.0-20120820.205113-1 from/to cloudbees-private-repository (dav:https://repository-xinco.forge.cloudbees.com/snapshot): Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:950)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:837)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.put(WagonRepositoryConnector.java:467)
at org.sonatype.aether.impl.internal.DefaultDeployer.deploy(DefaultDeployer.java:274)
... 14 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: https://repository-xinco.forge.cloudbees.com/snapshot/simple/server/Card-Game-Extension/1.0-SNAPSHOT/Card-Game-Extension-1.0-20120820.205113-1.pom. Return code is: 401
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:379)
at org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.put(AbstractHttpClientWagon.java:287)
at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:332)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$PutTask.run(WagonRepositoryConnector.java:811)
... 16 more
[INFO] Deployment failed after 0.74 sec
Build step 'Deploy artifacts to my Private CloudBees Repository' changed build result to FAILURE
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
Is there anything to set up in the repository I'm unaware of?
You are using the Deploy artifacts to my Private CloudBees Repository publisher.
You need to enable the Assign unique versions to snapshots option on the Advanced options for that plugin.
Once you do that it should deploy just fine.
"uniqueVersion == false is not anymore supported in maven 3", even being reported as an ERROR, won't stop the deployment.
This seems to be a configuration issue in your account, will follow-up on https://cloudbees.zendesk.com/tickets/5055
It was a repository permission issue.

Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver

I get success when i test it using database wizard.
But
I get the following error while i run my jsf/adf application ::
C:\Users\dev4\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\sqlConnTestApp\ViewController_sqlWebApp.war
[12:55:18 PM] Wrote Enterprise Application Module to C:\Users\dev4\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\sqlConnTestApp
[12:55:18 PM] Deploying Application...
<Jul 10, 2012 12:55:19 PM IST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application sqlConnTestApp is not versioned.>
<Jul 10, 2012 12:55:20 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1341905118356' for task '4'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:290)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
Truncated. see log file for complete stacktrace
Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:301)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:75)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:131)
at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:686)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:230)
Truncated. see log file for complete stacktrace
>
<Jul 10, 2012 12:55:20 PM IST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'sqlConnTestApp'.>
<Jul 10, 2012 12:55:20 PM IST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:290)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
Truncated. see log file for complete stacktrace
Caused By: weblogic.common.resourcepool.ResourceSystemException: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
at weblogic.jdbc.common.internal.JDBCUtil.parseException(JDBCUtil.java:301)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.loadDriver(ConnectionEnvFactory.java:75)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.<init>(ConnectionEnvFactory.java:131)
at weblogic.jdbc.common.internal.ConnectionPool.initPooledResourceFactory(ConnectionPool.java:686)
at weblogic.common.resourcepool.ResourcePoolImpl.start(ResourcePoolImpl.java:230)
Truncated. see log file for complete stacktrace
>
[12:55:21 PM] #### Deployment incomplete. ####
[12:55:21 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
#### Cannot run application sqlConnTestApp due to error deploying to IntegratedWebLogicServer.
[Application sqlConnTestApp stopped and undeployed from Server Instance IntegratedWebLogicServer]
Even i added the jar file in the classpath.I am using sqljdbc4.jar version.
Put the slqjdbc4.jar or sqljdbc.jar library file in lib folder under DefaultDomain in your IntegratedWLS installation path, if running in in IDE.
C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\lib -
or
C:\Users\user\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\lib
Previous answer worked very well for me, I'm using Jdeveloper 12c with integrated weblogic, in my case I used sqljdbc4 jar file because it provides support for java 7:
"
Put the slqjdbc4.jar or sqljdbc.jar library file in lib folder under DefaultDomain in your IntegratedWLS installation path, if running in in IDE.
C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\lib -
or
C:\Users\user\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\DefaultDomain\lib
".
Commented just in case anyone is facing the same problem.