WebLogic/Ant question

I have a folder containing a whole bunch of EJB deployment descriptors. I've been developing in JBoss (because it's free!) but now need to deploy under WebLogic, which requires, in addition to the J2EE requirements, this weblogic-ejb-jar.xml. Is there a good way to automate the creation of these in Ant when it's building the project?

Ant cannot create or write to text files, specifically an XML file. It can however copy an XML file, paste, rename or wrap it in a JAR file. I highly recommend using Ant for your builds, but I don't think it will help you create and XML file.
tj...

Similar Messages

  • Eclipse and WebLogic Ant Tasks

    In WL_HOME/server/lib/ant/ is an ant.jar. It has a "defaults.properties" containing all of the ant taskdefs. I tried to extract that so that my build.xml could use them but it keeps complaining about weblogic.ant.taskdefs.perforce.P4Changes cannot be found. The reason why is that it's under the wrong package. How does one run the weblogic ant tasks outside of the weblogic ant installation? Thanks, Jeremy

    bengali.Hi,
    you also have to include a <taskdef> for the servicegen task of >weblogicThat's why I did but I still have a problem with the source2wsdd
    ant task ( the other tasks run correctly within Eclipse).
    I get a :
    [source2wsdd] source2wsdd: Cannot find doclet class weblogic.webservice.tools.ddgen.ServiceGen
    [source2wsdd] 1 error
    BUILD FAILED: build.xml:324: javadoc execution failed
    Total time: 3 seconds
    The problem is that my source2wsdd has been defined with a well suited classpath
    and is also called with the right classpath.
    The problem only happens with this task !
    Bengali

  • Taskdef class  weblogic.ant.taskdef.management.WLdeployn  cannot be found.

    Hi,
    we are deploying war in weblogic server but getting error like taskdef class  weblogic.ant.taskdef.management.WLdeployn  cannot be found.*
    we are creating directory and copying required jars in to that directory and we referening that directory name in classpath of taskdef .
    <!--property defined -->
    <property name="wl_jar" value="${wllib}/weblogic.jar"/>
    <!--copy jars into wllib directory -->
    <target name="copylibs">
    <mkdirdir="wllib"/>
    <copyto dir="wllib" file="weblogic.jar" verbose="true" preservelastmodified="true" />
    </target>
    <!--weblogic taskdef for deploy war on weblogic server. -->
    <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" >
    <classpath >
    <pathelement location="${wl_jar}"/>
    </classpath>
    </taskdef>
    But getting taskdef class weblogic.ant.taskdef.management.WLdeployn cannot be found .
    please give me a solution.
    Thanks,

    Hi
    This error "java.lang.NoClassDefFound weblogic/util/debug" kind of looks familiar while running some standalone Java client programs that refer to stuff deployed on Weblogic. The ideal way to fix is generate wlfullclient.jar and add that in the classpath. Adding or calling setDomainEnv.sh (.cmd) will also work, but try using this wlfullclient approach also. The below post have the links that has all the details.
    Re: Corrupted JAR:C:\workspace\weblogic.jar
    Thanks
    Ravi Jegga

  • Weblogic ant tasks integration in Eclipse

    Hi,
    I would like to make Weblogic ant tasks ( web services one) work in Eclipse 3.0
    . Someone on this newsgroup suggested to just add weblogic.jar and webservices.jar
    to the built-in ant classpath of Eclipse. The problem is that it doesn't work
    for me. The tasks don't run because ant doesn't recognize the tasks.
    What should I do ? If anyone has already managed to do it, please let me know.
    bengali.

    bengali.Hi,
    you also have to include a <taskdef> for the servicegen task of >weblogicThat's why I did but I still have a problem with the source2wsdd
    ant task ( the other tasks run correctly within Eclipse).
    I get a :
    [source2wsdd] source2wsdd: Cannot find doclet class weblogic.webservice.tools.ddgen.ServiceGen
    [source2wsdd] 1 error
    BUILD FAILED: build.xml:324: javadoc execution failed
    Total time: 3 seconds
    The problem is that my source2wsdd has been defined with a well suited classpath
    and is also called with the right classpath.
    The problem only happens with this task !
    Bengali

  • Weblogic ant task wsdl2service - truncating soapaction

    Hi all,
    I'm using the weblogic ant utility "wsdl2service" to deploy my webservice. Here is the ant snippet of my script.
    <taskdef name="wsdl2service" classname="weblogic.ant.taskdefs.webservices.wsdl2service.WSDL2Service"/>
    <wsdl2service wsdl="${dev.dir}/wsdl/${myService}.wsdl" destDir="${build.dir}/wsjar"
         typeMappingFile="AutoType/in_types.xml" packageName="${in_class_packagename}" generateImpl="True">
    <classpath>
         <pathelement path="${lib3}"/>
         <pathelement path="${lib1}"/>
    <pathelement path="${lib2}"/>
         <pathelement path="AutoType/inventoryNotificationType.jar"/>
    </classpath>     
    </wsdl2service>
    It compiles properly and prepares the build. But after deploying the build, when i try to browse the wsdl thru internet browser, it is not populating the SOAPACTION attribute of SOAP:OPERATION element of my wsdl. So in the internetbroser the SOAPAction attribute is having empty value though it is present in the wsdl.
    Can some one tell why the WSDL2SERVICE tool is not populating the SOAPACTION attribute?

    Hi Jay,
    Thanks for your help.
    I am using weblogic 8.1 and Apache Ant version 1.5.3
    Jay I do not have client source code. When I am generating client using clientgen ant task, it gives me only a .jar file with .class files in it.
    I added .jar file generated by clientgen task in 'run' but now I am getting another error.
    <target name="run">
    <java classname="clientpkg.MathFace_Stub" fork="true" >
    <arg value="http://localhost:${port}/WebServices/MyFirstService?WSDL"/>
    <arg value="10"/>
    <arg value="17"/>
    <classpath>
    <pathelement location="staging"/>
    <pathelement location="${wl.home}/server/lib/weblogic.jar"/>
    <pathelement location="staging/MyFirstService_client.jar"/>
    <pathelement location="/ffdt01/resmgt/kul/ws"/>
    <pathelement path="staging"/>
    </classpath>
    </java>
    </target>
    --- This is giving below error:
    cu dmwls(162)$ ant run
    Buildfile: build.xml
    run:
    +[java] Exception in thread "main" j*ava.lang.NoSuchMethodError:* main+
    +[java] Java Result: 1+
    BUILD SUCCESSFUL
    Total time: 1 second
    Edited by: [email protected] on Feb 19, 2010 1:53 PM

  • Weblogic ant task

    Hi all,
    I'm trying to write a build script for starting the Weblogic server, stopping it, deploy applications and delete them from server. Till now it has been done manually, like clicking the startCmd.bat for the corresponding server domain. I have specifically mentioned some memory properties in MEM_ARGS (-Xms256m -Xmx512m -XX:MaxPermSize=128m). How can one specify the same memory arguments in Weblogic Ant task (wlserver). Thanks in advance.

    Hi all,
    I'm trying to write a build script for starting the Weblogic server, stopping it, deploy applications and delete them from server. Till now it has been done manually, like clicking the startCmd.bat for the corresponding server domain. I have specifically mentioned some memory properties in MEM_ARGS (-Xms256m -Xmx512m -XX:MaxPermSize=128m). How can one specify the same memory arguments in Weblogic Ant task (wlserver). Thanks in advance.

  • EJB newbie - ant question

    Hi,
    This is an ant question. Hope it is ok for me to ask this here.
    I have a windows xp machine.
    I have ant installed in C:\libraries\apache-ant-1.6.1
    ANT_HOME=C:\libraries\apache-ant-1.6.1\
    PATH has C:\libraries\apache-ant-1.6.1\bin
    ANT home is a system variable.
    Inspite of this, I am not able to use ant.
    I get the following error. Am i missing something?
    ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
    Thanks,
    Suma

    Hi !
    please do the following
    1. go to the desktop and right click on the mycomputer and select properties
    2.click advanced tab on the properties
    3. then click on the environment variables.
    then in the environment variables choose path for the system variables
    in that path
    suppose you installed ant in c:\libraries
    edit path: c:\libraries\ant1.6.1\bin;.;
    and also go to the systemvariable classpath
    and edit classpath as
    add this
    c:\libraries\ant1.6.1\lib;.;
    then close the properties box
    open the command prompt
    and type ant
    definetly it will work...

  • Weblogic ant wsdl2service - truncating soapaction

    Hi all,
    I'm using the weblogic ant utility "wsdl2service" to deploy my webservice. Here is the ant snippet of my script.
    <taskdef name="wsdl2service" classname="weblogic.ant.taskdefs.webservices.wsdl2service.WSDL2Service"/>
    <wsdl2service wsdl="${dev.dir}/wsdl/${myService}.wsdl" destDir="${build.dir}/wsjar"
    typeMappingFile="AutoType/in_types.xml" packageName="${in_class_packagename}" generateImpl="True">
    <classpath>
    <pathelement path="${lib3}"/>
    <pathelement path="${lib1}"/>
    <pathelement path="${lib2}"/>
    <pathelement path="AutoType/inventoryNotificationType.jar"/>
    </classpath>
    </wsdl2service>
    It compiles properly and prepares the build. But after deploying the build, when i try to browse the wsdl thru internet browser, it is not populating the SOAPACTION attribute of SOAP:OPERATION element of my wsdl. So in the internetbroser the SOAPAction attribute is having empty value though it is present in the wsdl.
    Can some one tell why the WSDL2SERVICE tool is not populating the SOAPACTION attribute?

    no problem -- thanks for responding so quick!
    "Neal Yin" <[email protected]> wrote in message
    news:3d87a87e$[email protected]..
    Sorry, "output" should be "destDir" as in autotype. We will correct thedoc.
    >
    -Neal
    "Mike" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I've got autotype working, but I can't get wsdl2service to work.
    If I specify the "output" attribute, I get a message indicating that it
    is
    not supported:
    "The <wsdl2service> task doesn't support the "output" attribute."
    If I take away the "output" attribute, I get a message indicating thatit
    is
    required:
    "Output attribute must be set."
    Here is my ant file:
    <taskdef name="autotype"
    classname="weblogic.ant.taskdefs.webservices.javaschema.JavaSchema"/>
    <taskdef name="wsdl2service"
    classname="weblogic.ant.taskdefs.webservices.wsdl2service.WSDL2Service"/>
    >>
    <target name="buildfromscratch">
    <autotype wsdl="c:\mywsdl.wsdl" packageName="com.xyz.types"
    destDir="./autotype"/>
    <wsdl2service wsdl="c:\mywsdl.wsdl" output="./test"
    typeMappingFile="./autotype.types.xml" packageName="com.xyz" />
    </target>
    I double checked that the classname associated with the taskdef iscorrect
    with what manoj specified etc.
    Thanks in advance for your help.
    Mike

  • JSP Weblogic server question.

              Hi,
              I'm new with Weblogic, and I have running the server already. I'm able to run servlets
              through the browser, however I want to start working with JSP. I created a sample
              jsp file and when trying to launch it through the browser I get a 404 message error.
              So my question is how can I make weblogic to act as a jsp server as well?
              Thank you for any help.
              A.R.
              

    Copy your JSP file into the
              config/mydomain/applications/
              DefaultWebApp directory
              In a web browser, request the JSP file using the following URL:
              http://localhost:7001/sampleJsp.jsp
              "A.R." wrote:
              > Hi,
              > I'm new with Weblogic, and I have running the server already. I'm able to run servlets
              > through the browser, however I want to start working with JSP. I created a sample
              > jsp file and when trying to launch it through the browser I get a 404 message error.
              > So my question is how can I make weblogic to act as a jsp server as well?
              >
              > Thank you for any help.
              > A.R.
              

  • Workshop Weblogic config questions

    I'm using Oracle Workshop for WebLogic 10.3 and I'm hoping someone can answer some setup/config questions.
    When I double click on the server (WebLogic Server v10.3 at localhost) a window opens with various settings that manage how workshop and weblogic work together.
    Under "Startup & Deployment" I have the following turned on:
    Launch WebLogic server in Eclipse console
    Always start WebLogic Server in debug mode
    Ignore project compilation errors when publishing (I have this turned on because of errors in a portal project, the errors aren't inmportant, and don't prevent the project form running)
    Run stand-alone web module directly from workspace
    So, first question, with these settings I was able to quickly switch to debug mode, with out restarting the server, now the server restarts whenever I turn debugging on. What have I done that has stopped this working correctly? How can I get it to start debugging without a full restart?
    next question, what happens if I turn on "Start WebLogic Server in Express Mode"? As far as I can tell nothing happens.
    Lastly, under "Automatic Publishing" I have it set to "Never publish automatically", if I choose another setting workshop essentially freezes because it's constantly publishing. So whenever I make a change, even in a jsp, I need to remove the project, then re-add it to see my changes in the browser. This is frustrating, not just because it takes 8 or 9 minutes (8 or 9 MINUTES!!!), but because the project doesn't run properly until it is redeployed. You'd think that if it needs to be re-deployed, then none of my changes should matter on the server until it is re-deployed.
    So, my question is, Is there any way to get this re-deployment to happen faster?
    Thanks for any and all help

    Well, in my experience performance is not bad as you experienced. Is it locally connected server or remotely connected server? If it is a remote server, network issue could cause this latency issue.
    Is performance better if you run the server without enabling debug mode? If yes, probably you can also review any break points set.
    You could also try out the following options
    1) Run workshop with -clean option, by opening command prompt and navigating to workshop_home\'workshop.exe -clean'
    2) Untick the option 'Launch WebLogic server in Eclipse console' and start server which would enable server to start on command prompt
    3) This would enable you to take multiple thread dumps (cutl +Break) on the server console output, while performance is very bad, to see where threads are halt.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Basic Ant Question

    Any Ant experts out there? This is such a basic question and I'm surprised it's not attacked point-blank in the Ant docs. I must be missing something.
    I'm trying to use ant to build a makefile that can be used on both Unix and Windows. Basically the only difference between the two environments will be the name of the company root directory (designated by the environment variable CAEROOT which is defined under both OS's).
    How can I access that environment variable with ant??? The obvious attempt shown below doesn't work because I guess Ant thinks it's a property.
    <code>
    <project name="XMLDBBridge" default="compile" basedir=".">
    <!-- set global properties for this build -->
    <property name="src" value="src"/>
    <property name="build" value="classes"/>
    <property name="caeroot" value="${CAEROOT}/"/>
    <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    </target>
    <target name="compile" depends="init">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" classpath="${caeroot}/JLib/OracleJDBC/;
    ${caeroot}/JLib/OracleXDK/lib/xsu12.jar"/>
    </target>
    <target name="clean">
    <!-- Delete the ${build} directory trees -->
    <delete dir="${build}"/>
    </target>
    </project>
    </code>

    In case anyone else ever has this same problem.
    I finally figured out how to get environment variables working in ant. It's quite nice but doesn't really figure anywhere in the docs even though I feel its one of the key usages for ant.
    <code>
    <project name="XMLDBBridge" default="compile" basedir=".">
    <!-- set global properties for this build -->
    <property name="src" value="src"/>
    <property name="build" value="classes"/>
    <property environment="envvar"/>
    <target name="init">
    <!-- Create the time stamp -->
    <tstamp/>
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}"/>
    </target>
    <target name="compile" depends="init">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src}" destdir="${build}" classpath="${envvar.CAEROOT}/JLib/OracleJDBC/;
    ${envvar.CAEROOT}/JLib/OracleXDK/lib/xsu12.jar"/>
    </target>
    <target name="clean">
    <!-- Delete the ${build} directory trees -->
    <delete dir="${build}"/>
    </target>
    </project>
    </code>

  • Exam weblogic 12c questions test

    What will be your answer to:
    When your WebLogic Server solution needs to be scaled out with additional capacity and you
    don’t want to add additional hardware, which three techniques should you us?
    A. Assign more than one managed server to a physical hardware that allows better CPU
    utilization.
    B. Assign more than one application to one managed server to better utilize threads within a single
    JVM process.
    C. Assign the same application to more than one managed server to load balance requests
    between servers.
    D. Assign the same heap size to the managed server across the cluster for easier control of
    memory footprint
    E. Create a virtualized environment with hypervisor for an easier solution
    When your WebLogic Server solution needs to be scaled out with additional capacity and you
    don’t want to add additional hardware, which three techniques should you us?
    A. Assign more than one managed server to a physical hardware that allows better CPU
    utilization.
    B. Assign more than one application to one managed server to better utilize threads within a single
    JVM process.
    C. Assign the same application to more than one managed server to load balance requests
    between servers.
    D. Assign the same heap size to the managed server across the cluster for easier control of
    memory footprint
    E. Create a virtualized environment with hypervisor for an easier solution
    A common approach to solve application performance issues is to add more hardware. Which two reasons describe why this alone does not always solve performance problems?
    A. There may be a bottleneck in the application that additional hardware would not solve.
    B. Adding more hardware is costly and time consuming.
    C. Adding hardware at the application layer may place additional load on an already overloaded
    database, network appliance, or storage system.
    D. Adding more hardware may introduce new configuration requirements that need to be tested.
    Thanks
    Maxi

    Hello user7776, I am also looking for answers to the above Questions. Can you please send me the correct answers if you got the answers already? I really appreciate your response. Thank you sir.
    -VCS

  • About weblogic license  questions  before weblogic10.3 version

    Someone asked me about the license type'question earlier,and the following is a license.bea details.
    <license
    component="Cluster"
    cpus="unvalued"
    expiration="never"
    ip="any"
    licensee="Customer"
    serial="454493271161-2642471307168"
    type="RTK"/type="SDK"
    units="unlimited"
    signature="MC0CFDfPUvOf1UEyeQqN9StdR73a6SUNAhUAlV6dn5xy2/30omfdMfFQbIoe9Qk="
    />
    Q1:I know most of them except license type's parameter value.what's meaning of "RTK" & "SDK" ?
    Q2:what's meaning of signature ?
    Q3:from weblogic10.3,there is no need to set a license.bea file in your BEA_HOME,and how customer be authorized to use ?
    Who can tell me ?
    Thank you !

    Weblogic Licensing <a class="jive-link-external" href="http://www.togotutor.com">http://www.togotutor.com</a> (Learn Programming and Administration for Free at Togotutor)
    Q1:I know most of them except license type's parameter value.what's meaning of "RTK" & "SDK" ?
    Not sure about it
    Q2:what's meaning of signature ?
    Signature is the like a security key encrypted per license
    Q3:from weblogic10.3,there is no need to set a license.bea file in your BEA_HOME,and how customer be authorized to use ?
    using registry.xml
    Thanks
    Togotutor
    <b><a class="jive-link-external" href="http://www.togotutor.com">http://www.togotutor.com</a> (Learn Programming and Administration for Free)</b>
    Edited by: togotutor on Aug 12, 2010 3:19 PM

  • "Deploy portal with ant" question

    Hello Experts!
    I am quite new to WebCenter, and I have a requirement to automate compile and deploy tasks of my Portal Application (Framework Application). I have read some docs and blogs and this forum too. Could you clarify me the difference between following:
    - deploy through ojdeploy
    - wldeploy
    - python script (WLST)?

    ojdeploy allows you to use the Deployment Targets defined in your JDeveloper project/workspace. I have found this the simplest way to package up my code into an ADF Library JAR or an EAR file.
    wldeploy is an ant wrapper for the functionality provided by weblogic.Deployer i.e. deploy related functions.
    wlst is a jython based command-line utility that provides deployer functions and also administrative functions. I prefer using wlst for my deployments. I usually invoke wlst via the "exec" task in Ant.

  • Setting up the environment for a WebLogic Ant task

    The documentations always starts:
    1.. On Windows NT, execute the setWLSEnv.cmd command, located in the
    directory WL_HOME\server\bin, where WL_HOME is the top-level directory of
    your WebLogic Server installation.
    2.. On UNIX, execute the setWLSEnv.sh command, located in the directory
    WL_HOME/server/bin, where WL_HOME is the top-level directory of your
    WebLogic Server installation.
    How much of what's in those bat files (or sh files on UNIX) do I actually
    need? Can I set the environment in Ant without calling the batch files --
    i.e. no system environment variables?
    TIA,
    Robert Snyder
    [email protected]

    Being a JBoss geek I cannot let it pass to recommend to at least investigate JBoss 7.1 as a possible alternative to Glassfish :)
    Also MySQL works fine and is very common and thus very much documented, which is a big plus. But I would not pass up the chance to look into PostgreSQL as well. To me that is basically the perfect balance between the simplicity of MySQL and the power of an Oracle DBMS.
    It depends on what you want to do with it of course, a simple web application works perfectly fine on MySQL, but then you probably also don't need the horsepower of a full enterprise container. You can also just use Tomcat 7 which is fast, easy to setup, well documented and doesn't use up so many resources either.

Maybe you are looking for

  • HT201263 My sons 2ndG ipod touch has a disabled try again in 22,482,070 minutes waring across the top.

    It will not turn off & it will not go into recovery mode. I had to completely delete & reinstall itunes just so it woulkd even show up there. Now it says "Can not connect enter correct passcode on ipod" Which of course I don't have that option. He di

  • QuickSort Recursion

    Hello, I am trying to create a programme where a user has to input 8 integers into an array, and it quicksorts them using an array. I have the QuickSort programme ready which is: * 8th of September 2008 * Let a user input different numbers, and quick

  • Can one application access two clusters at once?

    Can I access two clusters simultaneously? Without Extend? something like: Order o = new Order(); prodClusterOrderCache.put(o); devClusterOrderCache.put(o);Thanks, Andrew

  • Selecting any file as 'Open With' crashes the Finder and worse than this...

    This is happening w/ ANY file on my system & quite a pain if I want to open something in quicktime 7 instead of x.... can't do it. So then I open QT 7 & try to open it that way & doing it that way only crashes QT instead of the Finder. I just ran Dis

  • How old is my hard drive?

    Hi. I replaced my original hard drive about 2 or 3 years ago with a Samsung HM 500 LR. I am not sure exactly when, but I know it had a 3-year warranty. Anyway, I got a S.M.A.R.T. status FAILING message today so I need to replace it ASAP! Is there any