Question

I have build a working Java application which I can succesfully build and deploy to my WebLogic11g server.

I'm automating this process now with Ant.

I can build my application, the builded application works fine when deployed manually. But the deployment trough Ant isn't working.

My Ant file:

<!-- GENERAL -->
<property name="project.dir" value="CustomReportingProvider"/> 

<!-- JAR -->
<property name="deploy.dir" value="${project.dir}/deploy"/>
<property name="jar.deploy.dir" value="${deploy.dir}/jar"/>
<property name="jar.classes.dir" value="${project.dir}/classes"/> 
<property name="jar.meta-inf.dir" value="${jar.classes.dir}/META-INF"/> 

<!-- EAR -->
<property name="ear.meta-inf.dir" value="src/META-INF"/>


<target name="clean">  
    <delete dir="${deploy.dir}"/>  
</target> 

<target name="package" depends="clean">  
    <mkdir dir="${deploy.dir}"/>
    <mkdir dir="${jar.deploy.dir}"/>

    <jar destfile="${deploy.dir}/jar/VSBReportingProvider.jar" basedir="${jar.classes.dir}" includes="**/*/*.class">  
        <metainf dir="${jar.meta-inf.dir}" includes="*.xml"/>  
    </jar>  
    <ear destfile="${deploy.dir}/VSBReportingProvider.ear" basedir="${jar.deploy.dir}" appxml="${ear.meta-inf.dir}/application.xml">  
        <metainf dir="${ear.meta-inf.dir}" includes="*.xml" excludes="application.xml"/>  
    </ear>  
</target> 


<path id="wlappc.classpath">
    <fileset dir="C:\Oracle\Middleware10.3.4\wlserver_10.3\server\lib">
        <include name="*.jar"/>
    </fileset>
</path>
<taskdef name="wldeploy" classpathref="wlappc.classpath" classname="weblogic.ant.taskdefs.management.WLDeploy"/>



<target name="deploy" depends="package">  
    <wldeploy action="deploy" 
        name="VSB Reporting Provider"
        source="${deploy.dir}/VSBReportingProvider.ear"
        user="weblogic"
        nostage="true"
        password="weblogic1"
        verbose="true"
        adminurl="t3://localhost:7001"
        targets="AdminServer"
        debug="true"/>
</target>  

The response: http://pastebin.com/x0En9WtA

It keeps saying it can not connect to the server, so I checked the following:

  • weblogic / weblogic1 account works.
  • AdminServer is running, can log-on to it.
  • The 'Enable tunneling' option is enabled.
  • The same application can be installed trough the web console.

Any help or idea on where to look, would be appreciated.

Was it helpful?

Solution 2

I figured it out.

I'm working on a Windows 7 machine and was using a linux command-line tool. I don't know the reason, but the linux console wasn't showing all my environment variables, as it couldn't find or read them, I don't know.

All works fine when I deploy from Windows CMD.

OTHER TIPS

I find an answer on the Middleware Magic site:

Then please make sure to add "wlfullclient.jar" at the beginning of the CLASSPATH in your >ANT Script...Also please refer to http://forums.oracle.com/forums/thread.jspa?threadID=2188580&tstart=0 - See more at: http://middlewaremagic.com/weblogic/?tag=deploy#sthash.rTLTxQK3.dpuf

see http://middlewaremagic.com/weblogic/?tag=deploy

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top