Sun-appserv-deploy cutom Ant task

Hi
I wanted to use sun-appserv-deploy custom ant task in my build file to deploy an archive. But the file attribute requires EXISTING file which is constantly being deleted and recreated during development...
    <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
        <classpath refid="j2ee.classpath"/>   
    </taskdef>
    <sun-appserv-deploy
      file="webapp1.war"
      contextroot="/webapp1"
      name="webapp1WAR
      force="true"
      precompilejsp="false"
      verify="false"
      upload="true"
      user="admin"
      passwordfile="${passwordfile}"
      host="localhost"
      port="4848"
      asinstalldir="${j2ee.home}"/>
Unless the "webapp1.war" exists the enitre build.xml file invalidates (in eclipse)
How do I use this custom task during my development time (obviously when I run clean the WAR file is removed which invalidates my build.xml)
Is there a workaround for this?
Thanks
Z...

You have to include an additional attribute in the task:
<sun-appserv-deploy ... generatermistubs="true" />Edited by: sjfischli on May 15, 2008 8:54 AM

Similar Messages

  • Sun-appserv-deploy task fails

    Hi There,
    I am trying to deploy an EJB module into the Sun Application Server 8 using ANT scripts.
    The given below is the script, I use.
    <taskdef name="sun-appserv-deploy"
    classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
    <classpath>
    <pathelement location="${appSerLib}/sun-appserv-ant.jar"/>
    </classpath>
    </taskdef>
    <target name="doDeploy">
    <sun-appserv-deploy file="${destDir}/${ejbJarName}" name="SampleEjb"
    force="true" type="ejb" verify="false" user="admin" password="#infy123"
    host="localhost" port="4848" generatermistubs="true" asinstalldir="${appServer}"/>
    </target>
    The build fails throwing the below error
    A Sun Java System Application Server 8 admin CLI class could not be found (com.sun.enterprise.cli.framework.InputsAndOutputs). Use the asinstalldir attribute, set the asinstall.dir property, or add the appropriate JARs to the classpath.
    See the script I have mentioned the asinstalldir attribute in the sun-appserv-deploy.
    Need help to resolve it.
    ..Thiruppathy.R

    Use the 'asant' command to run your script rather than 'ant'. This will set up the required environment variables to allow the task to execute.
    Cheers
    Spencer

  • Eclipse: Ant: sun-appserv-deploy, not working, help please.

    Hello,
    Trying to use Eclipse: Ant to deploy using the build.xml to localhost. I have the following target in my Ant build.xml file, but it's not picking up the <sun-appserv-deploy> tag.
    I have the following file is the Ant classpath:
    C:\Sun\studio5u1_se\appserver7\lib\ant\lib\jakarta-ant-1.4.1-optional.jar.
    I'm not asking for Eclipse configuration or Ant help, but what .jar file(s) do I need and where do they have to be for Ant to recognize the <sun-appserv-deploy> tag?

    The sun-appserv-deploy tasks are defined in the sun-appserv-ant.jar (which I think is in C:\Sun\studio5u1_se\appserver7\lib on your machine).
    Check the ant documentation for instructions on integrating tasks into your environment.
    vbk

  • Using sun-appserv-deploy without asant

    Hello,
    I want to use the sun-appserv-deploy ant task without having to use asant.
    I've got the following taskdefs:
      <taskdef name="sun-appserv-deploy"
               classpathref="sunone.classpath"
               classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
      />
      <taskdef name="sun-appserv-undeploy"
               classpathref="sunone.classpath"
               classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask"
      />
      <taskdef name="sun-appserv-admin"
               classpathref="sunone.classpath"
               classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.AdminTask"
      />Running the following target with these I get the following error:
    target:<target name="sunone-deploy">
        <sun-appserv-deploy
          precompilejsp="${sunone.precompilejsp}"
          verify="${sunone.verify}"
          upload="${sunone.upload}"
          force="${sunone.force}">
            <server
              host="${sunone.host}"
              port="${sunone.port}"
              user="${sunone.user}"
              password="${sunone.password}"
              instance="${sunone.instance}"
            />
          <component file="${component.file}"/>
        </sun-appserv-deploy>
      </target>error:build.xml:34: A Sun Java System Application Server 8 admin CLI class could not be found (com.s
    un.enterprise.cli.framework.InputsAndOutputs).  Use the asinstalldir attribute, set the asinstall.dir property, or add t
    he appropriate JARs to the classpath.So I've added the asinstalldir property to to the script as follows but I still get the error.
    <sun-appserv-deploy
          precompilejsp="${sunone.precompilejsp}"
          verify="${sunone.verify}"
          upload="${sunone.upload}"
          force="${sunone.force}"
          asinstalldir="${sunone.home}">

    Why don't you try out the other two suggestions in the error message? Setting the server classpath should work!

  • ClassCastException on Deploy to Sun Appserver 8.1 from Netbeans 4.1

    I am working with an academic group that has chosen to use the Netbeans 4.1/Sun Appserver 8.1 integrated combo. We are running a standard ejb app and a standard web app (java servlets, Struts flavor) that talks to the ejb app.
    But the Sun Appserver is incredibly unstable with regard to the web container. If the problem is really Sun's, I can't believe
    that they released something such as this. We get a ClassCastException related to jsp configuration everytime we
    'deploy' from Netbeans to the web container.
    And sometimes, the ejb container seems to just "disappear" from our runtime execution. In this situation, the web container gets no data from the ejb container, so that the form fields in the result html show up empty. Could the ClassCastException at deployment time be the problem? If not, what can we do to stabilize our deployment?
    I've posted the error with system info below. Any help or ideas would be much appreciated. Thank you in advance!
    [ o/s: Windows XP sp2 ]
    [ jdk: 1.4.02 ]
    [ Sun Appserver 8.1 ]
    [ Netbeans 4.1 with 'deploy' command running ]
    [ Netbeans deploying a standard ejb app and a standard web app, Struts
    1.2 flavor ]
    [ Error message: ]
    Redeploying
    C:\CMU\AdvancedProject\Develop�ment\se-2004-spring-pt-advance�d-team2\PETv3_Struts\dist\PETv�3_Struts.war
    java.lang.ClassCastException
    at
    org.netbeans.modules.j2ee.sun.�dd.impl.web.model_2_4_1.SunWeb�App.setJspConfig(SunWebApp.jav�a:850)
    at
    org.netbeans.modules.j2ee.sun.�dd.impl.web.SunWebAppProxy.set�JspConfig(SunWebAppProxy.java:�342)
    at
    org.netbeans.modules.j2ee.sun.�share.configBean.WebAppRoot$1.�getDDSnippet(WebAppRoot.java:3�01)
    at
    org.netbeans.modules.j2ee.sun.�share.configBean.Base.addToGra�phs(Base.java:625)
    at
    org.netbeans.modules.j2ee.sun.�share.configBean.SunONEDeploym�entConfiguration.saveDConfigBe�an(SunONEDeploymentConfigurati�on.java:349)
    at
    org.netbeans.modules.j2ee.sun.�share.configBean.SunONEDeploym�entConfiguration.save(SunONEDe�ploymentConfiguration.java:317�)
    at
    org.netbeans.modules.j2ee.depl�oyment.config.ConfigSupportImp�l.getDeploymentPlanFileForDist�ribution(ConfigSupportImpl.jav�a:248)
    at
    org.netbeans.modules.j2ee.depl�oyment.config.ConfigSupportImp�l.getConfigurationFile(ConfigS�upportImpl.java:224)
    at
    org.netbeans.modules.j2ee.depl�oyment.impl.projects.Deploymen�tTargetImpl.getConfigurationFi�le(DeploymentTargetImpl.java:1�80)
    at
    org.netbeans.modules.j2ee.depl�oyment.impl.TargetServer.deplo�y(TargetServer.java:615)
    at
    org.netbeans.modules.j2ee.depl�oyment.devmodules.api.Deployme�nt.deploy(Deployment.java:129)
    at org.netbeans.modules.j2ee.ant.�Deploy.execute(Deploy.java:62)
    at org.apache.tools.ant.UnknownEl�ement.execute(UnknownElement.j�ava:275)
    at org.apache.tools.ant.Task.perf�orm(Task.java:364)
    at org.apache.tools.ant.Target.ex�ecute(Target.java:341)
    at org.apache.tools.ant.Target.pe�rformTasks(Target.java:369)
    at org.apache.tools.ant.Project.e�xecuteTarget(Project.java:1214�)
    at org.apache.tools.ant.Project.e�xecuteTargets(Project.java:106�2)
    at
    org.apache.tools.ant.module.br�idge.impl.BridgeImpl.run(Bridg�eImpl.java:234)
    at
    org.apache.tools.ant.module.ru�n.TargetExecutor.run(TargetExe�cutor.java:242)
    at
    org.netbeans.core.execution.Ru�nClassThread.run(RunClassThrea�d.java:125)
    Start registering the project's server resources
    Finished registering server resources

    Thanks for your post!
    I have been meaning to reply to this for so long that I have forgotten the exact details of how we fixed this. However, the issue with the ejb container 'disappearing' at random times during application operation was resolved by doing something different in the ejb container. As I recall, the ejb code that we had when the problem existed should not have caused this kind of problem, but we found a work-around.
    The 'ClassCastException' on deploy was apparently due to a problem with the portability of Netbeans Java code. Space characters in file paths appear to have caused this problem.

  • The sun-appserv-admin task doesn't support

    Help! - this is driving me nuts! I am trying to build the bookstore example and get this error on asant steps that involve the admin-command-common target (such as "asant deploy-war").
    I am running Studio Creator with SunAppServer8 under it. The command looks right. If I remove the passwordfile line from the admin-command-common target, I get the same error on another attribute in the command.
    The password file exists where it should and contains valid information, including the correct password.
    I have run this same bookstore example build on another workstation and it worked, but on that box, there was an instance of SunAppserver 7 (not under Studio Creator). That build was successful so I assume this is a configuration issue, but I don't know what it is. I am attaching the error and the listprops. If anyone knows what is wrong I sure would appreciate your help
    Thanks!
    Robert Hill
    C:\j2eetutorial14\examples\web\bookstore1>asant deploy-war
    Buildfile: build.xml
    deploy-war:
    admin_command_common:
    [echo] Doing admin task deploy bookstore1.war
    BUILD FAILED
    file:C:/j2eetutorial14/examples/common/targets.xml:36: The <sun-appserv-admin> t
    ask doesn't support the "passwordfile" attribute.
    Total time: 1 second
    C:\j2eetutorial14\examples\web\bookstore1>
    C:\j2eetutorial14\examples\web\bookstore>asant listprops
    Buildfile: build.xml
    listprops:
    [echo] Path information
    [echo] j2ee.home = C:/Sun/Creator/SunAppServer8
    [echo] j2ee.tutorial.home = C:/j2eetutorial14
    [echo] j2ee.home = C:/Sun/Creator/SunAppServer8
    [echo] env.Path = .;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
    ;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Common Fil
    es\Adaptec Shared\System;c:\Program Files\Microsoft SQL Server\90\Tools\Binn\;c:
    \j2sdk1.4.2_06\bin;C:\Sun\Creator\SunAppServer8\bin;C:\j2sdk1.4.2_06
    [echo] env.PATH = ${env.PATH}
    [echo] Classpath information
    [echo] classpath = C:\j2sdk1.4.2_06
    [echo] Admin information
    [echo] admin.password =
    [echo] admin.password.file = C:/j2eetutorial14/examples/common/admin-passwo
    rd.txt
    [echo] admin.host = localhost
    [echo] admin.user = admin
    [echo] admin.port = 14848
    [echo] https.port = 18181
    [echo] Domain information
    [echo] domain.resources = "domain.resources"
    [echo] domain.resources.port = 18080
    [echo] Database information
    [echo] db.root = C:/Sun/Creator/SunAppServer8/pointbase
    [echo] db.driver = com.pointbase.jdbc.jdbcUniversalDriver
    [echo] db.host = localhost
    [echo] db.port = 19092
    [echo] db.sid = sun-appserv-samples
    [echo] db.url = jdbc:pointbase:server://localhost:19092/sun-appserv-samples
    [echo] db.user = pbpublic
    [echo] db.pwd = pbpublic
    [echo] url.prop = DatabaseName
    [echo] ds.class = com.pointbase.jdbc.jdbcDataSource
    [echo] db.jvmargs = -ms16m -mx32m
    BUILD SUCCESSFUL
    Total time: 1 second
    C:\j2eetutorial14\examples\web\bookstore>
    clipped from targets.xml
    <target name="admin_command_common">
    <echo message="Doing admin task ${admin.command}"/>
    <sun-appserv-admin
    command="${admin.command}"
    user="${admin.user}"
    passwordfile="${admin.password.file}"
    host="${admin.host}"
    port="${admin.port}"
    asinstalldir="${j2ee.home}" />
    </target>

    Dude!
    Try this.
    change that target I was talkin about to
    <target name="admin_command_common">
         <property file="${j2ee.home}/j2eetutorial14/examples/common/admin-password.txt"/>
    <echo message="Doing admin task ${admin.command} with password"/>
    <sun-appserv-admin
    command="${admin.command}"
    user="${admin.user}"
    password="${AS_ADMIN_PASSWORD}"
    host="${admin.host}"
    port="${admin.port}"
    />
    </target>
    Reason?
    well, the blinkin 'asinstalldir' attrib is ... optional!
    The build succeeds and deploys the war.
    C:\java\Sun\Appserver\j2eetutorial14\examples\web\bookstore1>asant deploy-war
    Buildfile: build.xml
    deploy-war:
    admin_command_common:
    [echo] Doing admin task deploy bookstore1.war with password
    [sun-appserv-admin] Executing: deploy port 4848 host localhost --password ad
    min123 --user admin bookstore1.war
    [sun-appserv-admin] Command deploy executed successfully.
    BUILD SUCCESSFUL
    Total time: 7 seconds

  • Error during deploying using sapdeploy ant task

    I am attempting to deploy a simple service which I have created using Dev studio. Instead of deploying using Dev studio, I want to use ant task for the same.
    This is the output I see in the console:
    deploy:
    [sapdeploy] Starting deployment with the following properties:
    [sapdeploy] Version Handling Rule: all
    [sapdeploy] Error Handling Strategies: [error action: 'prerequisites', error strategy: 'stop', error action: 'deploy', error strategy: 'stop']
    [sapdeploy] The targeted SAP J2EE Engines are: [server host: 'myhost', server port '50000', user name 'J2EE_ADMIN'.]
    [sapdeploy] Starting to validate the data...
    [sapdeploy] Validation ended
    [sapdeploy] root dir C:\temp\HelloWorldEAR
    [sapdeploy] Selected archives for deployment:
    [sapdeploy] 1: 'C:\temp\HelloWorldEAR\HelloWorldEAR.ear'
    [sapdeploy] Starting validation for the engine 'server host: 'myhost', server port '50000', user name 'J2EE_ADMIN'.'
    [sapdeploy] Engine data validated successfully
    [sapdeploy] Starting deployment for the engine 'server host: 'myhost', server port '50000', user name 'J2EE_ADMIN'.'
    [sapdeploy] An error occured during the deployment.
    [sapdeploy] The result of the deployment is: Error
    [sapdeploy] Deployment ended
    Where can I get more details of what might be wrong with the deploy process? I tried "-v" flag but to no avail. Syslog of the server shows nothing of interest.
    Thanks in advance for any help.
    Regards,
    Sameer

    Logs will be in log\dc_log folder.

  • ANT task wsgen error while deploying RPC style web service

    Hi
    I am trying to assemble/deploy an rpc style weblogic web service using the 'wsgen'
    Ant task and the build.xml scripts provided with the samples. I get this error:
    Please help
    Thanks,
    Praveen
    C:\test>ant
    Buildfile: build.xml
    webservice:
    clean:
    [delete] Deleting directory C:\test\build
    init:
    [mkdir] Created dir: C:\test\build
    [mkdir] Created dir: C:\test\build\META-INF
    [copy] Copying 5 files to C:\test\build\META-INF
    compile_ejb:
    [javac] Compiling 5 source files to C:\test\build
    jar_ejb:
    [jar] Building jar: C:\test\a_statelessSession.jar
    ejbc:
    all:
    wsgen:
    Error at line:8 col:12 ':' Already got a ':' in name
    at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseExc
    on(SAXElementFactory.java:60)
    at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:
    at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(Babe
    EventStream.java:28)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:6
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:5
    at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.
    :1125)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:
    at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper
    a:1415)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:148
    at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1517)
    at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    at org.apache.tools.ant.Main.runBuild(Main.java:421)
    at org.apache.tools.ant.Main.main(Main.java:149)
    BUILD SUCCESSFUL
    Total time: 34 seconds
    C:\test>

    WLS6.1, service pack 2? I didn't know there were any service packs for 6.1 and
    6.0 didn't support wsgen and web services??
    simon.
    manoj cheenath <[email protected]> wrote:
    >
    >
    This is a known bug which is fixed in WLS 6.1 SP2.
    The workaround is to change the complex data types
    to have more than one level package names.
    for eg: change ....
    package foo;
    class Data{}
    to :
    package foo.bar;
    class Data{}
    -manoj
    Praveen wrote:
    Hi
    I am trying to assemble/deploy an rpc style weblogic web service usingthe 'wsgen'
    Ant task and the build.xml scripts provided with the samples. I getthis error:
    Please help
    Thanks,
    Praveen
    C:\test>ant
    Buildfile: build.xml
    webservice:
    clean:
    [delete] Deleting directory C:\test\build
    init:
    [mkdir] Created dir: C:\test\build
    [mkdir] Created dir: C:\test\build\META-INF
    [copy] Copying 5 files to C:\test\build\META-INF
    compile_ejb:
    [javac] Compiling 5 source files to C:\test\build
    jar_ejb:
    [jar] Building jar: C:\test\a_statelessSession.jar
    ejbc:
    all:
    wsgen:
    Error at line:8 col:12 ':' Already got a ':' in name
    at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseExc
    on(SAXElementFactory.java:60)
    at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:
    at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(Babe
    EventStream.java:28)
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:6
    at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:5
    at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.
    :1125)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:
    at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper
    a:1415)
    at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:148
    at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1517)
    at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
    at org.apache.tools.ant.Target.execute(Target.java:153)
    at org.apache.tools.ant.Project.runTarget(Project.java:898)
    at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    at org.apache.tools.ant.Main.runBuild(Main.java:421)
    at org.apache.tools.ant.Main.main(Main.java:149)
    BUILD SUCCESSFUL
    Total time: 34 seconds
    C:\test>
    -----------------------------------------------------------------<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    This is a known bug which is fixed in WLS 6.1 SP2.
    <p>The workaround is to change the complex data types
    <br>to have more than one level package names.
    <p>for eg: change ....
    <p><font color="#3366FF">package foo;</font>
    <br>class Data{}
    <p>to :
    <p><font color="#3333FF">package foo.bar;</font>
    <br>class Data{}
    <p>-manoj
    <p>Praveen wrote:
    <blockquote TYPE=CITE>Hi
    <br>I am trying to assemble/deploy an rpc style weblogic web service
    using
    the 'wsgen'
    <br>Ant task and the build.xml scripts provided with the samples. I get
    this error:
    <br>Please help
    <br>Thanks,
    <br>Praveen
    <br>-----------------------------------------------------------------
    <br>C:\test>ant
    <br>Buildfile: build.xml
    <p>webservice:
    <p>clean:
    <br>   [delete] Deleting directory C:\test\build
    <p>init:
    <br>    [mkdir] Created dir: C:\test\build
    <br>    [mkdir] Created dir: C:\test\build\META-INF
    <br>     [copy] Copying 5 files to C:\test\build\META-INF
    <p>compile_ejb:
    <br>    [javac] Compiling 5 source files to C:\test\build
    <p>jar_ejb:
    <br>      [jar] Building jar: C:\test\a_statelessSession.jar
    <p>ejbc:
    <p>all:
    <p>wsgen:
    <br>Error at line:8 col:12  ':' Already got a ':' in name
    <br>        at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseExc
    <br>on(SAXElementFactory.java:60)
    <br>        at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:
    <br>        at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(Babe
    <br>EventStream.java:28)
    <br>        at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:6
    <br>        at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:5
    <br>        at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java
    <br>)
    <br>        at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.
    <br>:1125)
    <br>        at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:
    <br>)
    <br>        at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper
    <br>a:1415)
    <br>        at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:148
    <br>        at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1517)
    <br>        at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    <br>        at org.apache.tools.ant.Target.execute(Target.java:153)
    <br>        at org.apache.tools.ant.Project.runTarget(Project.java:898)
    <br>        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    <br>        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
    <br>        at org.apache.tools.ant.Target.execute(Target.java:153)
    <br>        at org.apache.tools.ant.Project.runTarget(Project.java:898)
    <br>        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
    <br>        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
    <br>        at org.apache.tools.ant.Main.runBuild(Main.java:421)
    <br>        at org.apache.tools.ant.Main.main(Main.java:149)
    <p>BUILD SUCCESSFUL
    <p>Total time: 34 seconds
    <p>C:\test>
    <br>-----------------------------------------------------------------</blockquote>
    </html>

  • Deploying to Sun AppServer PE 8.1 (build b41-fcs) with an Oracle database

    Hello,
    I'm trying to deploy an application to Sun AppServer PE 8.1(an external server, not the embedded one).
    I already know that the direct deployment preview feature doesn't work with 8.1:
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=50572
    So I tried the export war method, and correctly configured the resource ref with the deployment tool. The deployment itself worked fine, but I can't access the database.
    The oracle drivers, from their web site don't work, I get the following exception:
    [#|2005-01-25T20:33:48.642+0000|SEVERE|sun-appserver-pe8.1|javax.enterprise.system.container.web|_ThreadID=19;|WebModule[/smwebinterface]userView Initialization Failure
    javax.faces.FacesException: java.sql.SQLException: JDBC driver does not support PreparedStatement.getMetaData()
    (...)I also tried to use the JSC bundled drivers as explained in
    http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/appserver7.html
    and I got the following exception:
    [#|2005-01-25T19:44:56.236+0000|WARNING|sun-appserver-pe8.1|javax.enterprise.system.stream.err|_ThreadID=15;|JdbcRowSetXImpl (prepare): [sunm][Oracle JDBC Driver]This driver is locked for use with embedded applications.|#]
    [#|2005-01-25T19:44:56.252+0000|SEVERE|sun-appserver-pe8.1|javax.enterprise.system.container.web|_ThreadID=15;|WebModule[/smwebinterface]userView Initialization Failure
    javax.faces.FacesException: java.sql.SQLException: [sunm][Oracle JDBC Driver]This driver is locked for use with embedded applications.
         at com.sun.jsfcl.data.RowSetDataModel.synchronize(RowSetDataModel.java:1197)
         at com.sun.jsfcl.data.RowSetDataModel.connect(RowSetDataModel.java:962)
         at
    Caused by: java.sql.SQLException: [sunm][Oracle JDBC Driver]This driver is locked for use with embedded applications.
         at com.sun.sql.jdbc.base.BaseExceptions.createException(Unknown Source)
         at com.sun.sql.jdbc.base.BaseExceptions.getException(Unknown Source)
         at com.sun.sql.jdbc.base.BaseConnection.prepareStatement(Unknown Source)
         at com.sun.gjc.spi.ConnectionHolder.prepareStatement(ConnectionHolder.java:407)
         at com.sun.sql.rowset.JdbcRowSetXImpl.prepare(JdbcRowSetXImpl.java:560)
         at com.sun.sql.rowset.JdbcRowSetXImpl.getMetaData(JdbcRowSetXImpl.java:1005)
         at com.sun.jsfcl.data.RowSetDataModel.synchronize(RowSetDataModel.java:1172)
         ... 92 more
    |#]It appears that these drivers are somehow locked to JSC and cannot be used in production servers, despite what the tutorial says ....
    Has anybody dealt with this issue before? Can someone help me with this?
    Thanx,
    Pedro Pires

    Oracle drivers have that limitation - that's one reason why we ship with our own drivers for accessing oracle.
    For trying to use the JSC bundled drivers in 8.1 - there's license restrictions (read $$$) involved with using JSC bundled drivers and "other" app servers. It this case, 8.1 PE (emphasis on the PE) is classified as an "other".
    Buying 8.1 (i.e., non PE), or waiting for JSC to bundle 8.1, seem to be your options if 8.1 is required.

  • Deploying bpm 11g project sar file using ant task

    I am trying to deploy the bpm project using ant task file. The status I get is [deployComposite] ---->Deploying composite success. However when I check the deployments, they are not there. If I try to deploy this using Jdeveloper it works correctly. I need to get this to work for production deployments. Any suggestions?
    C:\Oracle\Middleware\Oracle_SOA1\bin>ant -f ant-sca-deploy.xml -DserverURL=http:
    //10.140.183.71:7001 -DsarLocation=N:\RuleBasedProjectInitiate\deploy\RequestPro
    ject.ear -Doverwrite=true -Duser=weblogic
    Buildfile: C:\Oracle\Middleware\Oracle_SOA1\bin\ant-sca-deploy.xml
    [echo] oracle.home = C:\Oracle\Middleware\Oracle_SOA1\bin/..
    deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
    [deployComposite] created temp dir =C:\DOCUME~1\azeltov\LOCALS~1\Temp\deploy_cli
    ent_1279894885343
    [deployComposite] Creating HTTP connection to host:10.140.183.71, port:7001
    [deployComposite] Enter username and password for realm 'default' on host 10.140
    .183.71:7001
    [deployComposite] Authentication Scheme: Basic
    [deployComposite] Username:
    weblogic
    [deployComposite] Password:
    [deployComposite] Received HTTP response from the server, response code=200
    [deployComposite] clean up temp dir: C:\DOCUME~1\azeltov\LOCALS~1\Temp\deploy_cl
    ient_1279894885343
    [deployComposite] ---->Deploying composite success.
    BUILD SUCCESSFUL
    Total time: 4 seconds
    C:\Oracle\Middleware\Oracle_SOA1\bin>

    You can always deploy the ADF web apps from the Application (top menu) deploy option. Just make sure you're deploying the EAR profile for the project. Deploying the web projects from the composite deployment wizard can be convenient. But I think it's often the case that you deploy them (the composite and forms) separately (e.g. you make a series of changes to the composite without needed to redeploy the UI projects).
    Bottom line is you don't have to delete the projects to be able to modify/deploy them.

  • Wldeploy Ant task deploys app in 'New' state

    I am trying to deploy a web application in WL 10.0 using the wldeploy Ant task. However, everytime the application is deployed, the consolidated state is 'New' (or deferred deployment). I have to bounce the servers everytime to bring the app in the Active state.
    Here is my code:
    <target name="undeployWeb">
              <!-- Undeploy the existing deployment -->
              <wldeploy action="undeploy" verbose="true" debug="false" name="${deploymentName}" user="${weblogicUsername}" password="${weblogicPassword}" adminurl="${weblogicAdminURL}" targets="${weblogicTargetServers}" failonerror="false" />
    </target>
    <!-- Deploy .WAR to a target server -->
    <target name="deployWeb">
              <!-- Deploy the application remotely -->
              <wldeploy action="deploy" stage="stage" usenonexclusivelock="true" source="${weblogicDeploymentLocation}/${deploymentName}.war" remote="true" name="${deploymentName}" upload="false" user="${weblogicUsername}" password="${weblogicPassword}" verbose="true" adminurl="${weblogicAdminURL}" debug="true" targets="${weblogicTargetServers}" />
    </target>
    Is there any way to avoid the bounce of the target servers? I wish to activate the web app straightaway. Please help.
    ~hartbrekk

    Thanks user10939158, for looking into this.
    Reason I am saying network is not an issue here because the artifact copy to the remote servers and deployment happens fast, it is just at the step of closing DM connection, it is waiting for a long time (>5 mins). I am guessing that the Deployment Manager message exchanges with the server (internally) has something to do with LAN vs WAN. And, I would expect deployment over WAN take a minute extra as opposed to 5-9 minutes extra what we are seeing now.
    Yes, I tried running the wlst script on the remote server and it is fast as well.
    Just to clarify, I do not have a local server. I run the plain simple ant script on a build box(lean linux box) which is in the US.
    Thanks for your help again.
    - Kris
    Edited by: kris_2000 on May 25, 2010 2:08 PM

  • How do I get Ant task deploy to fail on error within an ojdeploy-build ?

    I am calling ojdeploy on an xml file with several <deploy> tasks within the <ojdeploy-build> task.
    FYI this dramatically increases performance when doing several deployments.
    I want to find a way to have the script stop with an error as soon as one of the <deploy> tasks fails with an error (such as a compile error). It does not currently do this.
    Is there a way to get the script to stop as soon as a <deploy> task fails within the outer <ojdeploy-build> task?
    (eg. could I somehow check the return code for each deploy explicitly and do an exit if the deploy fails)
    My Ant book claims that Ant tasks normally fail on error, and when one task fails the Ant script stops at that point. Some Ant tasks (such as exec) have an explicit failonerror attribute which can change this behavior to ignore a non-zero return code from the task and continue executing the Ant script.
    It seems to me that the <ojdeploy-build> task has a serious bug where it (probably using java try-catch) ignores the error from <deploy> and keeps going to the next <deploy>, violating a basic design principle of a proper Ant task.
    Where can I find the java code for <ojdeploy-build> to confirm my suspicion and then report the bug officially?
    Meanwhile, I am very interested in finding some workaround for this bug that preserves having several <deploy> in one script. If I put just one <deploy> in each <ojdeploy-build>, the huge performance improvement is lost.

    I played with it some more and it seems that failonerror and resultproperty actually work in JDev 11.1.1.4.0 They are inherited from the [url http://ant.apache.org/manual/Tasks/exec.html]Ant Exec task and work, you just have to set failonerror="true", e.g.
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
                      executable="${oracle.jdeveloper.ojdeploy.executable}"
                      failonerror="true"
                      resultproperty="ojdeploy.exit.code"
                      ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
                      ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
    ...Note that resultproperty is useful only if failonerror="false", use one or the other.

  • Weblogic 9.1 Deployment errors using the ANT task wldeploy

    I am not able to deploy applicatons using the ANT task. The same works with Weblogic 8.1. It is throwing a NoClassDefFoundError. It is looking for a class by name javax/management/InvalidAttributeValueException.
    This class file is shipped as part of jmx.jar. I tried to include it and then there was another NoClassDefFoundError that occured.
    The problem is I don't want to keep adding these different jars to make the ant deployment work. Can anyone please let me know what could be the problem.
    I am using a Windows XP OS and 1.4.2_10 as java version.
    I have added all the jars in the weblogic91\server\lib directory to the classpath.
    Also I have my apache ant tasks set in the classpath.
    Thanks
    Shankar Chandrasekaran

    Have had a bit of these CLASSPATH issues when jumping versions.
    Have had the best success when I create a different profile for each one, making sure the version you want is the only one defined. the main thing my profile sets is
    unset PATH
    unset CLASSPATH
    unset JAVA_HOME
    then
    export PATH=
    export CLASSPATH= the weblogic 9 one
    export JAVA_HOME= the one with 9
    or however they do it in windows, but make sure you CLASSPATH is only refencing the 9 jars

  • Deploy and Bind ant tasks

    Re,
    I am using the 10.1.3 beta of oc4j and we are starting to run into some problems with using the oracle deploy and bind ant tasks provided. As our application is growing, the deploy task is taking longer and longer (which by itself is not really a problem since that is to be expected, and when I say long it is only a few seconds so it is tolerable). The problem (I think) lies in the ant tasks. Our "bind" tasks depends on the "deploy" task. But, it seems that sometimes the bind task actually starts before the deploy task is finished. So, we are wondering if there is something wrong with the deploy task. Either oc4j is sending a signal that the deploy is complete before it actually is or the deploy ant task is just waiting a few seconds and then assuming it is complete.
    The only way for us to make this problem go away is to run the deploy ant task, look at the console to see that the deploy is finished and then run the bind task separately. Needless to say, that is a bit annoying and hard to automate.
    Any ideas?

    Chris,
    Thanks. I dont think that is it. The process waits a while (so maybe they are the ones doing a sleep).
    I am hoping to find out what is actually happening under the hood and if there is in fact a 'wait' giong on, implore to the development staff that they fix that issue before things are GA. Or, if something else is going on ... maybe I can fix it on my end.
    Thanks,
    Greg

  • Deploy war file to Sun Appserver 8.2

    Hi,
    I am trying to deploy my application to a Sun Appserver 8.2 (appl. uses mysql) , when I use remote deployment from the IDE the application runs fine on this server however when I export it as a WAR file I get the error message stated below. I am using exactly the same datasources as when I use remote deployment and I am using the sun-web.xml and web.xml descriptor files from the remote deployment. Anybody got an idea what is wrong?
    [#|2006-06-07T02:52:29.237+0800|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.container.web|_ThreadID=31;|StandardWrappe
    rValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: java.sql.SQLException
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.destroy(ViewHandlerImpl.java:601)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:316)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:225)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)
    Caused by: javax.faces.FacesException: org.apache.jasper.JasperException: java.sql.SQLException
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:331)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:132)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)
    ... 41 more
    Caused by: org.apache.jasper.JasperException: java.sql.SQLException
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
    at sun.reflect.GeneratedMethodAccessor456.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
    at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
    at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
    at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
    at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
    at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
    at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:326)
    ... 43 more

    Hi!
    First of all, you don't need to change something in web.xml. This file is exported into WAR file by Creator 2 IDE. So, don't replace web.xml after exporting of WAR.
    Also you can try to change version of DTD in sun-web.xml to one older (to sun-web-app_2_3-0.dtd, for example).
    Or could you post your sun-web.xml?
    Thanks,
    Roman.

Maybe you are looking for

  • How do i find out who is using my iTunes account?

    I have multiple Apple TV's in multiple locations all on my account.  I have recently been charged for a bunch of TV shows but i cannot figure out who is ordering them - or what location.  Any ideas?

  • Reading Files From Network Share

    I am attempting to read files on a shared volume of a Windows 2003 machine from a Forte client (win2k - 5.0.26). If doing this is possible, how does one reference a remote file? Thanks, -skynet-

  • Homogeneous System Copy process: PRD to QAS on MSSQL

    We have a need to refresh our QAS system with a copy of PRD - the method I have been researching is a homogeneous database copy. I am having difficulty finding step-by-step documentation to carry this out for release R/3 4.6C. The only client refresh

  • Exporting HDV to SD for iDVD

    Have been using the "Send to Compressor" in FCP 7 for HDV export to Blu Ray. But have a wedding project shot in 1080i that I want to use one of the iDVD menus. Project is 2 hours and 18 minutes so exporting to two discs isn't an issue. Disc 1 is one

  • What exactly can you do with NFC on WinPhone 8.1?

    Hi I was wondering when "exciting" things are gonna happen with NFC technology.  So, yeah, we can "share pictures, contacts and more" by tapping phones against each other.  Boring, especially when you think about it that with "old technology" like bl