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

Similar Messages

  • 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

    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.

  • 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

  • ClassCastException using Subant and wldeploy ant task

    Hi!
    I'm using subant to call all diffrent build.xml files located in subdirectories. The buildfile looks like this:
    <project name="extern.call" default="callall">
         <target name="callall">
              <fileset      id="buildfile.set" dir=".." includes="*2/build.xml">
                   <exclude name="Br*2/*"/>
              </fileset>
              <subant target="deploy-local" inheritall ="false" failonerror="true">
                   <fileset      refid="buildfile.set"/>
              </subant>
         </target>
    </project>
    The first called build.xml files works fine ... but the execution of the second build.xml (it's not important which file is the second one, it's crash always at the second call), stop with a "java.lang.ClassCastException".
    See Stacktrace:
    [subant] weblogic.Deployer -debug -nowait -verbose -upload -noexit -name ClarifyRead -source \build\ClarifyRead\delivery\ClarifyRead.ear -targets myserver -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
    [subant] dumping Exception stack
    [subant] java.lang.ClassCastException
    [subant] at weblogic.management.deploy.utils.DeployerHelper.uploadSource(DeployerHelper.java:586)
    [subant] at weblogic.Deployer.runBodyWithAuthenticatedSubject(Deployer.java:824)
    [subant] at weblogic.Deployer.runBody(Deployer.java:711)
    [subant] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [subant] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [subant] at weblogic.Deployer.runMain(Deployer.java:566)
    [subant] at weblogic.Deployer.mainWithExceptions(Deployer.java:576)
    [subant] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [subant] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [subant] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [subant] at java.lang.reflect.Method.invoke(Method.java:324)
    [subant] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:264)
    [subant] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:204)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.Target.execute(Target.java:301)
    [subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
    [subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [subant] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
    [subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:182)
    [subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:112)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.Target.execute(Target.java:301)
    [subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
    [subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
    [subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
    There is no diffrent between using ant in eclipse environment or as standalone, the result it the same.
    Do someone else have the same problem?
    Kind regards
    Joseph

    Hi
    I got the same message and I couldn't resolve it too, I am wordering if you got the key to the problem?
    Thanks
    Daivd Huang

  • 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

  • Bugs in jdoc and jdoclet Ant tasks?

    (The relevant lines in the build.xml file are at the end of this message.)
    I encountered a problem with the jdoc Ant task:
    - I added a description for a class in the metadata file. Everything rans
    fine. Then I added another class to the metadata file, when the jdoc task
    is invoked again by Ant the new class is not enhanced at all.
    - However when I run the jdoc on the metadata file outside Ant, the new
    class is enhanced.
    I can't run the jdoclet task at all because Ant complains that it can't
    find the class com.solarmetric.modules.integration.ant.KodoDocletTask.
    However it doesn't have any problem finding the class
    com.solarmetric.modules.integration.ant.JDOEnhancerTask. Aren't they both
    in the kodo-jdoee.jar? I also tried using the classpath element inside the
    target for the jdoclet without success.
    Thanks for your help.
    Here is an extract of the build.xml file:
    <!--Set the classpath-->
    <path id="classpath">
    <pathelement location="d:/books/JDO/KODO/kodo-jdoee2.3.3/lib/jdo1_0.jar"/>
    <pathelement
    location="d:/books/JDO/KODO/kodo-jdoee-2.3.3/lib/kodo-jdoee.jar"/>
    <pathelement location="C:\java\xdoclet-1.1.2\lib\xdoclet.jar"/>
    </path>
    <target name="taskdefs">
    <taskdef name="jdodoclet"
    classname="com.solarmetric.modules.integration.ant.KodoDocletTask"/>
    <!-- the above line causes an error -->
    <taskdef name="jdoc"
    classname="com.solarmetric.modules.integration.ant.JDOEnhancerTask"/>
    <!-- no problem with the above -->
    <target name="enhanceAll" depends="compile">
    <jdoc>
    <fileset dir="./classes/quocp">
    <include name="ent.jdo" />
    </fileset>
    <config licenseKey="<license key removed>" />
    <classpath refid="classpath"/>
    </jdoc>
    </target>

    Actually I did have a classpath issue, the xdoclet jar was not being
    included properly; once I got it included I now get this error:
    BUILD FAILED: java.lang.LinkageError: duplicate class definition:
    org/apache/log4j/Category
    I think the xdoclet is incompatible with the version of log4j I have....but
    I don't know for certain.
    So I tried moving to the latest and greatest xdoclet and now I get a new
    error (and it fails earlier):
    Finding class com.solarmetric.modules.integration.ant.JDODocletSubTask
    Exception reading component C:\dev2\java\devlib\kodo-jdo.jar
    BUILD FAILED: java.lang.NoClassDefFoundError:
    com/solarmetric/modules/integration/ant/JDODocletSubTask
    One thing I have learned today is the -debug flag when running ant...very
    helpful in finding out where the failure is occuring.
    Any ideas you might have on how to proceed would be helpful...is there a way
    to run the xdoclet stuff without the ant tasks?
    Thanks,
    Steven Balthazor
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Steven-
    If you include the Kodo devel jars in your system CLASSPATH, does it
    work? I.e., is it a problem with the classpath, or with the XDoclet
    integration in general?
    In article <[email protected]>, Steven Balthazor wrote:
    I have followed these instructions to the letter; but I am unable to get
    the
    Doclet task to work in ant. Specifically my taskdef:
    <taskdef name="jdodoclet"
    classname="com.solarmetric.modules.integration.ant.KodoDocletTask">
    <classpath refid="cp" />
    </taskdef>
    Generates the following error when running ant:
    BUILD FAILED: file:C:/dev2/java/devbuild.xml:54: taskdef class
    com.solarmetric.modules.integration.ant.KodoDocletTask cannot be found
    Now I would think this is a classpath problem; except if I change the
    taskdef to:
    <taskdef name="jdodoclet"
    classname="com.solarmetric.modules.integration.ant.SchemaToolTask">
    <classpath refid="cp" />
    </taskdef>
    I get a new error:
    BUILD FAILED: file:C:/dev2/java/devbuild.xml:56: The <jdodoclet> task
    doesn't support the nested "jdotags" element.
    This looks like it is finding the SchemaToolTask and failing in the
    implementation of jdodoclet. As far as I can tell, KodoDocletTask and
    SchemaToolTask are in the same jar. So what gives?
    I am using Kodo 2.5.2; and I have Xdoclet 1.1.2 in my classpath.
    Any help would be appreciated.
    Steven Balthazor
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    I'm guessing that the kodo jars are not in the classpath when you
    launch
    ant. If this is the case, then you must specify a classpath in your
    taskdef, and probably in the jdodoclet execution as well. You can do
    this with something like this:
    <target ...>
    <taskdef ...>
    <classpath refid="cp"/>
    </taskdef>
    <jdodoclet ...>
    <classpath refid="cp"/>
    </jdodoclet>
    </target>
    This assumes that you've defined a path somewhere in your ant buildfile
    with an id of 'cp'.
    -Patrick
    Quoc Pham wrote:
    Hi Patrick,
    I still haven\'t been able to solve the problem with the jdoclet
    task:
    >>>>
    >>>>
    I can\\\'t run the jdoclet task at all because Ant complains thatit
    >>>>
    can\\\'t
    find the class
    com.solarmetric.modules.integration.ant.KodoDocletTask.
    However it doesn\\\'t have any problem finding the class
    com.solarmetric.modules.integration.ant.JDOEnhancerTask. Aren\\\'tthey
    both
    in the kodo-jdoee.jar? I also tried using the classpath element
    inside
    the
    target for the jdoclet without success.
    Here is the jdoclet task:
    classname=\\\"com.solarmetric.modules.integration.ant.KodoDocletTask\\\"/>
    >>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>>
    When I run the above task, I got the error message:
    Buildfile: build.xml
    generateJdoMetadata
    BUILD FAILED
    file:d/jdev903/jdev/mywork/JDO/Ent/build.xml:102:taskdef class
    com.solarmetric.modules.integration.ant.KodoDocletTask cannot be
    found
    >>>>
    >>>>
    Questions:
    - How do I let ant know the class path to use to run this task?
    - What should the value of sourcepath be?
    - What should the value of dir be? The directory where the .javafiles
    reside?--
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Where are the bpelc and related ant tasks documented?

    Hi,
    Can anyone tell me where the soa suite-related ant tasks are documented? I only found a little bit of information and some examples in the developers guide.
    Thanks,
    Mark Nelson

    chapter 19.4.2.
    http://download-east.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/deployproc.htm#sthref3614

  • Error 403--Forbidden using eclipse and weblogic

    hi,
    i am new here on j2ee
    I am using eclipse3.4 and weblogic 9.1.2 on xp. I am trying to make simple hello world servlet
    here is what i did
    on the eclipse click New and click on Dynamic project
    click on Servlet and write following code for the servlet
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    * Servlet implementation class SecondServlet
    public class SecondServlet extends HttpServlet {
         public void service (HttpServletRequest req, HttpServletResponse res)
         throws IOException
              res.setContentType("text'html");
              PrintWriter out = res.getWriter();
              out.println("<html><head>" + "<title> Hello World </title></head>" +
                        "<h1>Hello Worldasd </h1></body></html>");
    folder structure and file web.xml is created by eclipse itself.
    then i started weblogic from the eclipse
    and i have following error
    http://localhost:7001/SecondServlet/
    Error 403--Forbidden
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.4 403 Forbidden
    The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated. If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, it SHOULD describe the reason for the refusal in the entity. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

    I do connect with router/modem
    eclipse did create weblogic.xml. here it is
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <wls:jsp-descriptor>
    <wls:keepgenerated>true</wls:keepgenerated>
    <wls:working-dir>C:\Documents and Settings\Owner\My Documents\jj\java-files\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\SecondServlet</wls:working-dir>
    <wls:debug>true</wls:debug>
    </wls:jsp-descriptor>
    <wls:context-root>SecondServlet</wls:context-root>
    </wls:weblogic-web-app>
    i did create a user proejct domain in weblogic.
    I did try by login through localhost:7001/console. but it didn't work. following is the problem
    Error 503--Service Unavailable
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.5.4 503 Service Unavailable
    The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
    Note: The existence of the 503 status code does not imply that a server must use it when becoming overloaded. Some servers may wish to simply refuse the connection.
    any more suggestion will be helpful.
    this is just a start so please i need to solve this problem so that i can move ahead
    thanks
    Edited by: chitochez on Dec 18, 2008 5:45 AM

  • Remote Debugging w/ Eclipse and Weblogic

    Hi,
              I'd like to debug my Servlets/EJB's running on a Weblogic 6.1 SP4. My
              IDE is Eclipse 2.1
              To enable remote debugging I start Weblogic with that additional JVM
              options:
              -classic -Xdebug -Xnoagent
              -Xrunjdwp:transport=dt_socket,address=5000,suspend=y,server=y
              and configured my Remote Application in Eclipse accordingly.
              The connection successes.
              Problem: When I reach my breakpoint, Eclipse pops up an error message:
              "Attempting to install a breakpoint in the type
              com.xxx....
              that has no line number attributes. The breakpoint cannot be
              installed. Class files must be generated with the line number
              attributes.
              Reason:
              Absent Line Number Information"
              I compiled my sources with enabled debug option.
              Any comments and ideas are appreciated.
              Cheers,
              Jan.
              

    Sorry!
              the debug option was NOT enabled (seems that my ant script is too
              complex at this stadium...)
              Cheers,
              Jan.
              [email protected] (Jan-Friedrich Mutter) wrote in message news:<[email protected]>...
              > Hi,
              >
              > I'd like to debug my Servlets/EJB's running on a Weblogic 6.1 SP4. My
              > IDE is Eclipse 2.1
              > To enable remote debugging I start Weblogic with that additional JVM
              > options:
              >
              > -classic -Xdebug -Xnoagent
              > -Xrunjdwp:transport=dt_socket,address=5000,suspend=y,server=y
              >
              > and configured my Remote Application in Eclipse accordingly.
              >
              > The connection successes.
              >
              > Problem: When I reach my breakpoint, Eclipse pops up an error message:
              > "Attempting to install a breakpoint in the type
              > com.xxx....
              > that has no line number attributes. The breakpoint cannot be
              > installed. Class files must be generated with the line number
              > attributes.
              > Reason:
              > Absent Line Number Information"
              >
              > I compiled my sources with enabled debug option.
              >
              > Any comments and ideas are appreciated.
              >
              > Cheers,
              > Jan.
              

  • A Tip for using EJB 3.0 with WebLogic Ant Tasks

    I started out writing this up as a problem, but then I found the answer so I'm, posting a tip instead.
    When I tried to write an EJB [stateless] using EJB 3.0 in my legacy Weblogic ear project I started getting this error:
    <pre>
    No EJBs found in the ejb-jar file 'test'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    </pre>
    This is why: wlcompile will put the class files in the App-Inf/classes directory unless it finds an ejb-jar.xml file in the META-INF directory for the module it is working on. With EJB 3.0, I wasn't using an ejb-jar.xml file because it was unnecessary. Later, Appc runs and it complains <b>because there are no classes module directory, they went into the shared ear folder instead.</b>
    Here's I how it working again: Use javac [not wlcompile] to compile the EJB 3.0 module and make sure that the class files go into the correct module directory. Then you can use wlappc to generate all the associated files for the EJB. I have sucessfully deployed an ear file that uses both EJB 2.x and EJB 3.0 with this approach.
    I wish Weblogic's own ejb3.0 sample application used their split directory deployment.
    Good Luck.
    John Aronson

    Hi John,
    I am working on development an enterprise application using EJB 3.0 on Weblogic 10.
    While developing, I am keeping all my classes (from ejb's as well as web) into APP-INF/classes directory. It is working fine for Web and ejb 2.0 packages, but ejb 3.0 packages, I get the following error when I keep my ejb 3.0 beans classes in APP-INF/classes directory.
    No EJBs found in the ejb-jar file 'customer'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.
    One solution is to keep the classes under customer ejb directory, but I wan tto keep all the classes in APP-INF/classes directory so that when using Eclipse IDE I can output all compiled sources into APP-INF/classes directory.
    Has anyone faced this situation? Any suggestions to fix this issue?

  • 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.

  • Using wsdlc Ant task and Eclipse

    Hi all,
    I'm using the WebLogic Ant Task wsdlc to generate a default implementation of a java web service based on an existing WSDL.
    Everythign generates just fine. I have one little problem though: the classes that represent some of the complex types defined in the WSDL are generated in the compiled WSDL file (the JAR file that wsdlc creates). If I open the java source file for the web service (also created by the wsdlc task, but NOT in the compiled wsdl jar) with Eclipse, Eclipse cannot find the source code for those complex types, and therefore underlines the data types in red to indicate an error.
    My question is this: is there a way to tell Eclipse to look for additional source files inside of the compiled wsdl.jar file?
    Many thanks in advance!
    Jeff

    I got around this by unjaring the generated source jar into a "generated/src" directory and put that directory on the build path.
    Andy O

  • Are the WLS 9.1 Web Service Ant Tasks ready for prime time?

    I am trying to create a Proof of Concept (POC) for Enterprise and B2B Services at Wendy's Int'l, Inc.
    As part of this POC, I created a WSDL for an in-house service and then used the wsdlc and jwsc Ant Tasks to translate this WSDL to Java classes and ultimately (I hoped) a deployable services.
    In this document, I describe the issues I encountered setting up what I consider to be a simple POC.
    I'll try to attach my WSDL file and build.xml so you can follow along.
    I'll also try to attach my CSS file so you can compare how the generated WSDL appears in the Browser to the way I want it to appear.
    If attachments are not allowed on these forums, then I will wait and see if there is interest in those documents before I paste them under this topic.
    Some preliminary information about my environment.
    Environment:
         Windows XP Pro SP2
         WebLogic 9.1
         Java 1.5.0_04
    Service Name:
         AppRelease
    Note: If I modify my WSDL (perhaps to add a new Operation or to change the definition of an element) and run wsdlc again, the AppReleaseSOAPPortImpl.java file is overwritten For this reason, I implemented my service logic in a class called AppReleaseServiceImple.java.
    Now, for the issues.
    1.     Bug:
    In the WSDL generated by wsdlc, the wsdl:part child of the wsdl:message tag is erroneously prefixed with a colon.
    This occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    2.     Bug:
    In the WSDL generated by wsdlc, the wsdl:input and wsdl:output children of the wsdl:operation child of wsdl:portType tag are erroneously prefixed with a colon. Like 1 above, this occurs whether or not I specify a prefix for the http://schemas.xmlsoap.org/wsdl/ namespace.
    Work around: Extract the wsdl from the jar file, fix it and add it back into the jar.
    The error message generated by Bugs 1 and 2 is not helpful in diagnosing the problem:
    [jwsc] Error at line:46 col:7 ':' expected [?! -- [CDATA[ ]
    3.     Bug:
    In the WSDL generated by wsdlc, the documentation elements have all of my html elements stripped out, as well as my xhtml and wsdl namespace references. This completely negates one of the best features of the documentation tag, being able to present the WSDL in a browser as a nicely formatted, human friendly document which is also the underlying WSDL that can be viewed when the person views the source document.
    I label this as a bug because it greatly reduces the functionality of the resulting WSDL.
    4.     Annoyance:
    The WSDL generated by wsdlc has all of my comments stripped out, except the comments in the xsd:schema section of the wsdl:types element. I would prefer that all my comments be left in the WSDL, but if comments must be stripped out then I think all of the comments should be stripped out.
    5.     Annoyance:
    The WSDL generated by wsdlc has my CSS specification stripped.
    Work around: I don’t know if adding the CSS back will do any good because I have not yet created a deployable service (see the last issue below).
    6.     Annoyance:
    The WSDL generated by wsdlc has different namespace prefixes than the ones I specified for my application's namespace and for the http://schemas.xmlsoap.org/wsdl/soap/ namespace.
    Work around: Perform a find/replace on namespace prefixes "s0" and "s1" to return them to my prefered values.
    Another thing I can do at this point is simply replace the generated WSDL in the jar file with my original WSDL. This would address issues 1 thru 6 above.
    7.     Annoyance:
    The java source files created by wsdlc are put into a jar file. This makes it annoying when working within a traditional IDE like Eclipse because there is no way to reference the source files within the jar as working source.
    Work around: Extract the source files from the jar and identify the resulting directory structure as part of the source structure of the project.
    8.     Bug:
    The jwsc task complains if the same parameter name is used in multiple operations. I received the following Errors from jwsc:
    [jwsc] C:\IDE\workspace\Acre-WL9.1\AppReleaseSOAPPort.java 0:0
    [jwsc] [ERROR] - Parameter element "{http://acre.services.wendys.com/AppRelease/}garRequest" is not unique across document/literal bare WebService.
    Since the operation names are unique, I see no reason to also require uniqueness in the parameter names used by those operations.
    Work around: Use unique element names for the input parameters of the services operations.
    9.     Bug:
    Once items 1, 2 and 8 above are taken care of, jwsc fails with the following error:
    java.lang.AssertionError: java.lang.ClassNotFoundException: weblogic.j2ee.descriptor.ApplicationBeanImpl
    This seems to be due to the weblogic.jar file not being in the System Classpath.
    However, I should note that when I set verbose="on" and debug="on" in the jwsc ant task, there was a message from the task which stated "[jwsc] [search path for class files: [big freakin’ jar list]". In the big freakin’ jar list, I did find weblogic.jar and weblogic.jar has the required ApplicationBeanImpl. This indicates to me that the jwsc task does not fully honor either its classpathref attribute, nor an embedded classpath element.
    Work around: Make sure the weblogic.jar is in the System Classpath.
    10.     Bug:
    I fixed bug #9 by running a setDomainEnv script and then ran my ant task. This time I received the following output:
    ant build-serviceBuildfile: build.xml
    build-service:
    [jwsc] 1 JWS files will be processed.
    [jwsc] Processing JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java
    [jwsc] JWS: C:\IDE\workspace\Acre-WL9.1\src\com\wendys\services\acre\AppReleaseServiceImpl.java Validated.
    [AntUtil.deleteDir] Deleting directory <some temporary directory>
    BUILD FAILED
    java.lang.ExceptionInInitializerError
    At this point, I am completely stymied about how to proceed.
    I wonder what new issues await once this 10th issue is addressed.
    Really, is this tool set ready for prime time?

    <i>Sorry to hear you are having so many issues with using the WLS 9.1 web service Ant tasks, inside of Eclipse.
    I generally create a User Library for the couple weblogic jars needed, and use it (the User Library) in my Eclipse projects that I create JWSes in.</i><br>
    I also have a separate WebLogic Library in Eclipse (actually 2 libraries since I work with WL 8.1 and now WL 9.1). As you may know, one of the long-standing issues with the Ant integration within Eclipse is the fact that Ant, being an External Tool, does not receive the Project-specific Paths/Libraries. However, since most Java-relevant Ant tasks can take classpath and classpathref attributes, this is usually not an issue. In the case of the BEA-supplied wsdlc Ant task, it is apparent from the verbose/debug console output that wsdlc can see the jars in its classpathref, but it ignores those references when resolving class references and instead only uses the system classpath.
    <p>
    <i>I've only needed the weblogic.jar and xbean.jar, not all the ones you mentioned in an earlier thread of this post.</i><br>
    I have not tried to winnow down exactly which jars are required. I simply included all the jars that exist and were added to the system classpath by the setDomainEnv.bat file created by WebLogic 9.1.
    <p>
    <i>Afterwards, I create an Ant Builder to build the JWS Web Service EAR, as opposed to fiddlin' with Eclipse.</i><br>
    I too use Ant to build my deployable archives. Eclipse is simply my IDE of choice. I validated that all the issues I listed occurred when running Ant from the command line.
    <p>
    <i>If you are interested in how I do it, send me an e-mail (to [email protected]), and I'll send you a zip of one of these JWS projects. The build.xml script for the project, takes care of a lot of the "annoyances" you mentioned, one of which I think is not accurate. I have never had a situation where the wsdlc Ant task "overwrote" my XXXImpl.java file..</i><br>
    Since I'm doing a POC to determine how we want to proceed with developing Web Services and an SOA in general, I tried to perform the same tasks using Axis 2 1.0, the WebLogic 9.1 tools, and XFire 1.1. Overwriting the Impl class is a common failing in the tools which take a WSDL and create Java source files for all three frameworks.
    <p>
    Try my scenario. Add another operation to an existing WSDL, and run the wsdlc Ant Task. The old IMPL class will be over-written.
    <p>
    Because of this, I have a separate Impl class and I make sure that all its methods and annotations match the methods and annotations in the Skeleton Impl class created by wsdlc.
    <p>
    <i>Maybe that's because I use the <exec> Ant task with jar.exe (the xvf options) in my build.xml, to only get what I need out of the .jar/.zip the wsdlc generates. I'm typically only interest in the interface class that my XXXImpl.java file needs to implements, because I use XMLBeans for the input args (and return values) of my web service operations.</i><br>
    Perhaps. I am not using XMLBeans in any of the three frameworks because the resulting service seems to be lighter-weight in all three frameworks if XMLBeans is not used. I'm sure there will be scenarios where XMLBeans is preferred, but I have not encountered that case in this POC.
    <p>
    <i>Regards,
    Mike Wooten</i>
    Thanks for the follow-up.
    Mike McAngus

  • Java.lang.NullPointerException running flexunit ant task in 4.1 Beta 2

    Hello,
    After trying to debug this all day, I thought I would ask the community.
    I am trying out the new FU4.1 Beta 2 (3.5) from the downloads page.  We have a working CI system set up with 4.0, and I thought trying out 4.1 beta 2 would simply be a matter of replacing the binaries in my lib folder and re-running the ant script.  Evidently not, or else I am missing something.
    After updating to the 4.1 Beta 2 binaries, if I re-run a sample project in Eclipse, the build fails with a java NullPointerException when the <flexunit> ant task is invoked. We have an involved setup that uses the groovy AntBuilder and other esoteric constructs, so I thought I would create a very simple test script similar to the sample CI project to see if that would work.  Unfortunately, I am still seeing the NPE.  The worst part is that there is absolutely no debug information provided - no message, no traceback.  I even attached the Ant source and debugged it. I could see the NPE being caught, but it contained a null message and null traceback.
    Here is the simplified ant script:
    <project name="tests" basedir=".">
        <target name="test-init" depends="">
            <mkdir dir="${build.dir}"/>
            <mkdir dir="${reports.dir}"/>
            <mkdir dir="${reports.xml}"/>
            <mkdir dir="${reports.html}"/>
            <!-- Setup Flex and FlexUnit ant tasks -->
            <!-- You can set this directly so mxmlc will work correctly, or set
            <taskdef resource="flexUnitTasks.tasks" classpath="${lib}/flexUnitTasks-4.1.0-beta2.18.jar" />
        </target>
        <target name="run-flex-tests" depends="test-init">
          <sequential>
            <!-- Execute TestRunner.swf as FlexUnit tests and publish reports -->
            <flexunit
                swf="${build.dir}/TestRunner.swf"
                toDir="${reports.xml}"
                haltonfailure="false"
                verbose="true"
                localTrusted="true"
                timeout="60000"/>
            <!-- Generate readable JUnit-style reports -->
            <junitreport todir="${reports.xml}">
                <fileset dir="${reports.xml}">
                    <include name="TEST-*.xml" />
                </fileset>
                <report format="frames" todir="${reports.html}" />
            </junitreport>
          </sequential>   
        </target>
    </project>
    The output is:
    Buildfile: C:\EclipseWorkspace\tests\Source\Flex\build_test.xml
    test-init:
    run-flex-tests:
    [flexunit] Validating task attributes ...
    BUILD FAILED
    C:\EclipseWorkspace\tests\Source\Flex\build_test.xml:23: java.lang.NullPointerException
    Total time: 297 milliseconds
    Is there something obvious I am missing?
    Thanks for any help!
    Trevor

    Brian,
    OK, a colleague worked with me (thanks, John!) to debug the problem a little further, and I think we found the fundamental problem.  I wanted to post that info to save you some time...
    Aside: One thing we did have to do was to rebuild the flexUnitTasks.jar to include debug information, since the binary in the 4.1 beta 2 package did not have debug=true.  I'd suggest that we might want to change the build script to build the binaries with debug moving forward.
    Back to the problem.
    The NullPointerException is thrown in TaskConfiguration::validateSharedProperties(), when equals() is invoked. Here is the code snippet:
       //if we can't find the FLEX_HOME and we're using ADL or compilation
       if((flexHome == null || !flexHome.exists()) && (testRunConfiguration.getPlayer().equals("air") || shouldCompile()))
          throw new BuildException("Please specify, or verify the location for, the FLEX_HOME property.  "
                + "It is required when testing with 'air' as the player or when using the 'testSource' element.  "
                + "It should point to the installation directory for a Flex SDK.");
    In my case, I do not have a FLEX_HOME property set in Ant currently.  I'll bet most folks have this set, so the logic would run differently for them. For my case, the (flexHome == null) check is true.  That means that the testRunConfiguration.getPlayer().equals("air")check will occur next, and here is the problem. The "player" member is not set in the testRunConfiguration yet at this point, so testRunConfiguration.getPlayer() returns null. testRunConfiguration.setPlayer() is called in generateDefaults().  But generateDefaults() is not called until after validateSharedProperties() is called.  So, if properties initialization could be improved here and I think this code will run more robustly.
    I can work-around my issue temporarily by just setting a FLEX_HOME property in Ant.  But I hope you will agree that the initialization issue with "player" still should be addressed. Would you like me to open a bug report, or is this thread enough?
    Thanks,
    Trevor

Maybe you are looking for