ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanae Benchaaboun" <SBenchaab...@mdinsurance.state.md.us>
Subject Re: Compiling error
Date Fri, 28 Apr 2006 19:25:39 GMT
I got this now!!
I added the export JAVA_HOME and Path, also sat the fork to false..
Still not working


Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
sbenchaaboun@mdinsurance.state.md.us

>>> floess@mindspring.com 4/28/2006 3:20 PM >>>
I looked over the documentation a little more (for wscompile) - and 
looked at your build.xml.  I do see where you have set forking = "true"
 
Maybe see what results you get when forking is set to false.  In
looking 
at the stack trace - I see this:

at java.lang.ClassLoader.resolveClass0(java.lang.Class) 
*(/lib/ssa/libgcj.so.4.0.0)*

As the VM is being forked...it would -appear- the forked VM is gcc-java

for some reason...

Try to adjust your .bashrc and/or try setting forking="false"

Scot P. Floess wrote:
> Check this link out:  
> https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#2.1 
>
> And I quote:  "The |wscompile| tool generates various client-side and

> server-side artifacts required by the JAX-RPC runtime to develop, 
> deploy, and invoke a Web Service. It is available as a shell script 
> and a batch file in |JWSDP_HOME/jaxrpc/bin|, where |JWSDP_HOME|
refers 
> to the directory in which the Java WSDP is installed. Although the 
> shell script is used below for illustration purposes, the two scripts

> provide identical functionality."
>
> There ya go, its a shell script.  I can't be for sure without further

> investigation...but if it is a shell script then when the task 
> executes, it will spawn a shell to execute the script.  When it
spawns 
> the shell, you get a -new- environment.  The new environment probably

> does not have the JAVA_HOME or your Sun JDK in the path - and thus is

> using the stock gcc java...
>
> Scot P. Floess wrote:
>> What I am trying to say is this...  My ~/.bashrc resembles the 
>> following:
>>
>> # .bashrc
>>
>> # User specific aliases and functions
>>
>> # Source global definitions
>> if [ -f /etc/bashrc ]; then
>>        . /etc/bashrc
>> fi
>>
>> ----
>>
>> This is of course a stock ~/.bashrc file...
>>
>> I am saying, make the ~/.bashrc look something like this (I am 
>> guessing here on the java installation dir - so take witha grain of

>> salt):
>>
>> # .bashrc
>>
>> # User specific aliases and functions
>>
>> # Source global definitions
>> if [ -f /etc/bashrc ]; then
>>        . /etc/bashrc
>> fi
>>
>> export JAVA_HOME=/opt/SUNWappserver/jdk
>> export PATH=${JAVA_HOME}/bin:${PATH}
>>
>>
>> I am guessing that wscompile task is actually shelling out to the OS

>> to execute.  If that happens, the new shell will execute your 
>> ~/.bashrc.  If the above are not set, based upon your install JDK, 
>> its not being found in the PATH and you are getting the gcc java 
>> version...  I will have to examine your build.xml either tonight or

>> tomorrow morning...gotta go home soon and mow the lawn...
>>
>> Sanae Benchaaboun wrote:
>>> What did you mean by putting all the export in a bashrc? Here is
the 
>>> build.xml
>>>
>>> Sanae Benchaaboun
>>> Webmaster Supervisor
>>> Maryland Insurance Administration
>>> Tel: (410)468-2077
>>> sbenchaaboun@mdinsurance.state.md.us 
>>>   
>>>
------------------------------------------------------------------------

>>>
>>>
>>> <?xml version="1.0" encoding="iso-8859-1"?>
>>>
>>> <project name="StateApi_Client" default="dist" basedir=".">
>>>     <property name="src" location="src" />
>>>     <property name="src-gen" location="src-gen" />
>>>     <property name="build" location="build" />
>>>     <property name="dist" location="dist" />
>>>     <property name="lib" location="lib" />
>>>     <property name="javadoc.output" location="doc/html" />
>>>
>>>     <path id="project.classpath">
>>>         <fileset dir="${java.home}/../lib">
>>>             <include name="tools.jar"/>
>>>         </fileset>
>>>         <fileset dir="${java.home}/lib">
>>>             <include name="tools.jar"/>
>>>         </fileset>
>>>         <fileset dir="lib">
>>>             <filename name="security-plugin.jar"/>
>>>             <filename name="xws-security_jaxrpc.jar"/>
>>>             <filename name="xws-security.jar"/>
>>>         </fileset>
>>>         <fileset dir="lib" includes="*.jar"/>
>>>     </path>
>>>         <path id="xjc-classpath">
>>>         <fileset dir="lib" includes="*.jar"/>
>>>     </path>
>>>
>>>     <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
>>>       <classpath refid="xjc-classpath" />
>>>     </taskdef>
>>>
>>>     <!-- Add wscompile and wsdeploy tasks -->
>>>     <path id="wscompile.classpath">
>>>         <fileset dir="${java.home}/../lib">
>>>             <include name="tools.jar"/>
>>>         </fileset>
>>>         <fileset dir="${java.home}/lib">
>>>             <include name="tools.jar"/>
>>>         </fileset>
>>>         <fileset dir="lib" includes="*.jar"/>
>>>     </path>
>>>     <taskdef name="wscompile" 
>>> classname="com.sun.xml.rpc.tools.ant.Wscompile">
>>>         <classpath refid="wscompile.classpath" />
>>>     </taskdef>
>>>       <!-- define the targets -->      <target name="init" 
>>> description="create the build directory structure"
depends="clean">
>>>         <mkdir dir="${build}" />
>>>         <mkdir dir="${build}/jar" />
>>>         <mkdir dir="${src-gen}" />
>>>         <mkdir dir="${dist}" />
>>>         <mkdir dir="${dist}/lib" />
>>>    </target>
>>>       <target name="generate_classes" description="generate the
wsdl 
>>> stubs" depends="init">
>>>         <echo file="${src-gen}/wsconfig.xml"><![CDATA[<?xml 
>>> version="1.0" encoding="UTF-8"?>
>>> <configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
>>> <wsdl location="${src}/StateApiService.wsdl" 
>>> packageName="org.naic.serff.stateapi.service" />
>>> </configuration>]]></echo>
>>>         <wscompile             fork="true"
>>>             keep="true"             client="true"             
>>> debug="true"             features="documentliteral,wsi"            

>>> base="${build}/jar"             sourceBase="${src-gen}"            

>>> xPrintStackTrace="true"             
>>> model="${build}/jar/StateApiService_model.xml.gz"             
>>> verbose="false"             config="${src-gen}/wsconfig.xml">
>>>             <classpath>
>>>                 <path refid="project.classpath" />
>>>             </classpath>
>>>         </wscompile>
>>>         <!--<xjc schema="${src}/ClientTypes.xsd" 
>>> package="org.naic.serff.stateapi.jaxb" target="${src-gen}"/>-->
>>>    </target>
>>>       <target name="compile" description="compile the project" 
>>> depends="generate_classes">
>>>       <javac debug="true" srcdir="${src-gen}"
destdir="${build}/jar" 
>>> excludes="org/naic/serff/stateapi/service/**/*"
>>>             classpathref="project.classpath">
>>>          <classpath location="${build}/jar"/>
>>>       </javac>
>>>       <javac debug="true" srcdir="${src}" destdir="${build}/jar" 
>>>             classpathref="project.classpath">
>>>          <classpath location="${build}/jar"/>
>>>       </javac>
>>>    </target>
>>>        <target name="dist" description="build the project" 
>>> depends="compile">
>>>         <copy file="user.properties" todir="${dist}"/>
>>>         <copy todir="${build}/jar">
>>>             <fileset dir="${lib}">
>>>                 <include name="*.jar"/>
>>>                 <exclude name="junit.jar"/>
>>>                 <exclude name="mail.jar"/>
>>>                </fileset>
>>>         </copy>
>>>         <copy todir="${dist}/lib">
>>>           <fileset dir="${lib}">
>>>                <include name="*.jar"/>
>>>           </fileset>
>>>         </copy>
>>>         <jar compress="true" basedir="${build}/jar" 
>>> jarfile="${dist}/TestClient.jar"/>
>>>     </target>
>>>       <target name="doc" description="create the documentation for

>>> the project" >
>>>       <mkdir dir="${javadoc.output}"/>
>>>       <javadoc destdir="${javadoc.output}" 
>>> classpathref="project.classpath" packagenames="org.naic.model">
>>>          <fileset dir="${src}">
>>>             <include name="**/*.java"/>
>>>          </fileset>
>>>       </javadoc>
>>>    </target>
>>>        <target name="clean" description="clean up" >
>>>              <delete dir="${build}"/>
>>>         <delete dir="${javadoc.output}"/>
>>>           <delete dir="${src-gen}"/>
>>>            <delete dir="${dist}"/>          </target>
>>> </project>
>>>
>>>
>>>   
>>>
------------------------------------------------------------------------

>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
>>> For additional commands, e-mail: user-help@ant.apache.org 
>>
>

-- 
Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-754-4592 (Work)

Chief Architect JPlate  http://sourceforge.net/projects/jplate 
Chief Architect JavaPIM http://sourceforge.net/projects/javapim 


Mime
View raw message