|
I'm using the following script to generate an EAR file from a WAR:
includeTargets << grailsScript("_GrailsWar") target(ear: "Creates an EAR file from a Grails WAR") { war() event("StatusUpdate", ["Building EAR file"]) generateApplicationXml() def warDest = new File(warName).parentFile def earFile = "${projectTargetDir}/${contextRoot}.ear" ant.ear(destfile:earFile, appxml:appXml, update:true) { fileset(dir:warDest, includes:"*.war") } event("StatusFinal", ["Done creating EAR $earFile"]) } target(defineContextRoot:"defines the context root") { contextRoot = "${grailsAppName}${grailsAppVersion ? '-'+grailsAppVersion : ''}" } target(generateApplicationXml:"Generates an application.xml file") { depends(defineContextRoot) def warDest = new File(warName) appXml = "${projectTargetDir}/application.xml" new File(appXml).write """\ <?xml version="1.0" encoding="UTF-8"?> <application xmlns=http://java.sun.com/xml/ns/j2ee xmlns:xsi="http://www.w3.org/ 2001/XMLSchema-instance" xsi:schemaLocation="http:// java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ application_1_4.xsd" version="1.4"> <display-name>${grailsAppName}</display-name> <module> <web> <web-uri>${warDest.name}</web-uri> <context-root>${contextRoot}</context-root> </web> </module> </application> """ } setDefaultTarget(ear) I execute the script by running "run-script buildEAR" Below is the error that I'm getting, any idea what might be wrong here? Configuring Spring Security LDAP ... | Error Error executing script RunScript: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Cannot resolve reference to bean 'dataSourceUnproxied' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSourceUnproxied': Invocation of init method failed; 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 (Use --stacktrace to see the full trace) --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
