ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scot P. Floess" <flo...@mindspring.com>
Subject Re: Compiling error
Date Fri, 28 Apr 2006 18:08:16 GMT
Hmm - that seems correct. What about:

echo $JAVA_HOME



Sanae Benchaaboun wrote:
> # which java
> /opt/SUNWappserver/jdk/bin/java
> # java -version
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
>
>
> Sanae Benchaaboun
> Webmaster Supervisor
> Maryland Insurance Administration
> Tel: (410)468-2077
> sbenchaaboun@mdinsurance.state.md.us
>
>   
>>>> floess@mindspring.com 4/28/2006 1:41 PM >>>
>>>>         
> When you did the exports...did you:
> a) Use the same shell (for instance bash)
> b) From that same shell execute using ant?
>
> Do this for me:
>
> type:
>
> which java
>
> -and-
>
> java -version
>
> I will be curious to see...  I don't think your environment is set up 
> correctly...
>
> Sanae Benchaaboun wrote:
>   
>> I did what you saidt, I got the same error
>>
>> Sanae Benchaaboun
>> Webmaster Supervisor
>> Maryland Insurance Administration
>> Tel: (410)468-2077
>> sbenchaaboun@mdinsurance.state.md.us 
>>
>>   
>>     
>>>>> floess@mindspring.com 4/28/2006 1:30 PM >>>
>>>>>         
>>>>>           
>> See where that version of java is installed...  And add that as the 
>> first entry in your PATH and JAVA_HOME...  Sounds to me like its not
>>     
>
>   
>> stored in /usr/bin (for instance its not symbolically linked).  I'm 
>> guessing you installed using the executable installer versus
>>     
> RPM's...
>   
>> Let's say you installed in /foo/bar/jdk1.5
>>
>> Then do this:
>>
>> export JAVA_HOME=/foo/bar/jdk1.5
>> export PATH=${JAVA_HOME}/bin:${PATH}
>>
>> Then try again to run your ant script...  This should resolve your 
>> problem...
>>
>>
>> Sanae Benchaaboun wrote:
>>   
>>     
>>> Actually the version of Java I have is from Sun. I am using redhat
>>>     
>>>       
>> for
>>   
>>     
>>> Linux.
>>>
>>> Sanae Benchaaboun
>>> Webmaster Supervisor
>>> Maryland Insurance Administration
>>> Tel: (410)468-2077
>>> sbenchaaboun@mdinsurance.state.md.us 
>>>
>>>   
>>>     
>>>       
>>>>>> floess@mindspring.com 4/28/2006 1:17 PM >>>
>>>>>>         
>>>>>>           
>>>>>>             
>>> I am guessing you are probably running something like Fedora Core? 
>>>     
>>>       
>> It
>>   
>>     
>>> looks like gcc java problem - Fedora certainly comes with gcc java.
>>>       
>
>   
>>>     
>>>       
>> If
>>   
>>     
>>> you have Sun's (or better yet IBM's) JVM installed, make sure they
>>>     
>>>       
>> can
>>   
>>     
>>> be found in your path and JAVA_HOME...
>>> Sanae Benchaaboun wrote:
>>>   
>>>     
>>>       
>>>> Hi,
>>>> I using Ant to build a project under Linux (using Redhat software)
>>>>     
>>>>       
>>>>         
>>> and
>>>   
>>>     
>>>       
>>>> I am getting a ClassNotFoundException. If I try to build the same
>>>> project under Windows, it compiles successfuly.
>>>> Can you please help me!!
>>>> Attached you'll find the message given by Linux when compiling.
>>>> Thanks a lot.
>>>>
>>>> P.S. I am new to Ant!!
>>>>
>>>> Sanae Benchaaboun
>>>> Webmaster Supervisor
>>>> Maryland Insurance Administration
>>>> Tel: (410)468-2077
>>>> sbenchaaboun@mdinsurance.state.md.us 
>>>>   
>>>>
>>>>     
>>>>       
>>>>         
> ------------------------------------------------------------------------
>   
>>   
>>     
>>>   
>>>     
>>>       
>>>> [root@denton StateApi_Ref]# ant
>>>> Buildfile: build.xml
>>>>
>>>> clean:
>>>>    [delete] Deleting directory /Data/Dev/StateApi_Ref/build
>>>>    [delete] Deleting directory /Data/Dev/StateApi_Ref/src-gen
>>>>    [delete] Deleting directory /Data/Dev/StateApi_Ref/dist
>>>>
>>>> init:
>>>>     [mkdir] Created dir: /Data/Dev/StateApi_Ref/build
>>>>     [mkdir] Created dir: /Data/Dev/StateApi_Ref/build/jar
>>>>     [mkdir] Created dir: /Data/Dev/StateApi_Ref/src-gen
>>>>     [mkdir] Created dir: /Data/Dev/StateApi_Ref/dist
>>>>     [mkdir] Created dir: /Data/Dev/StateApi_Ref/dist/lib
>>>>
>>>> generate_classes:
>>>> [wscompile] Exception in thread "main"
>>>>     
>>>>       
>>>>         
>>> java.lang.NoClassDefFoundError: while res                           
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>               olving class:
>>> com.sun.xml.rpc.tools.plugin.ToolPluginFactory
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> java.lang.ClassLoader.resolveClass0(java.lang.Class) (/lib/ssa      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                    /libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at java.lang.Class.initializeClass()
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at _Jv_ResolvePoolEntry(java.lang.Class, int)
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/libgcj.so                                             
>>> .4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> com.sun.xml.rpc.tools.wscompile.CompileTool.parseArguments(jav      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                    a.lang.String[]) (Unknown
>>>       
> Source)
>   
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> com.sun.xml.rpc.util.ToolBase.run(java.lang.String[]) (Unknown      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                     Source)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> com.sun.xml.rpc.tools.wscompile.Main.main(java.lang.String[])       
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                    (Unknown Source)
>>>   
>>>     
>>>       
>>>> [wscompile] Caused by: java.lang.ClassNotFoundException:
>>>>     
>>>>       
>>>>         
>>> java.util.logging.Level                                            
>>>       
>
>   
>>>     
>>>       
>>   
>>     
>>> not found in [file:/Data/Dev/StateApi_Ref/lib/activation.jar,
>>> file:/Data/Dev/St                                             
>>> ateApi_Ref/lib/commons-beanutils.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/commons-co                          
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                llections.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/commons-digester.jar, file:/Data/   
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                      
>>> Dev/StateApi_Ref/lib/commons-logging.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/dom.ja                              
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>            r, file:/Data/Dev/StateApi_Ref/lib/jaas.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/jax                                 
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>         -qname.jar, file:/Data/Dev/StateApi_Ref/lib/jaxb-api.jar,
>>> file:/Data/Dev/StateAp                                             
>>> i_Ref/lib/jaxb-impl.jar,
>>>     
>>>       
>> file:/Data/Dev/StateApi_Ref/lib/jaxb-libs.jar,
>>   
>>     
>>> file:/Da                            
>>>   
>>>     
>>>       
>>>>                    ta/Dev/StateApi_Ref/lib/jaxb-xjc.jar,
>>>>     
>>>>       
>>>>         
>>> file:/Data/Dev/StateApi_Ref/lib/jaxrpc-api                          
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                .jar,
>>>     
>>>       
>> file:/Data/Dev/StateApi_Ref/lib/jaxrpc-impl.jar,
>>   
>>     
>>> file:/Data/Dev/StateApi_R                                           
>>>       
>
>   
>>>     
>>>       
>>   
>>     
>>> ef/lib/jaxrpc-spi.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/jta-spec1_0_1.jar, file:/           
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                               Data/Dev/StateApi_Ref/lib/junit.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/keyexport.j                         
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                 ar, file:/Data/Dev/StateApi_Ref/lib/mail.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/na                                  
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>        mespace.jar,
>>>     
>>>       
>> file:/Data/Dev/StateApi_Ref/lib/pkcs12import.jar,
>>   
>>     
>>> file:/Data/Dev/St                                             
>>> ateApi_Ref/lib/relaxngDatatype.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/saaj-api.jar                        
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                  , file:/Data/Dev/StateApi_Ref/lib/saaj-impl.jar,
>>> file:/Data/Dev/StateApi_Ref/lib         
>>>   
>>>     
>>>       
>>>>                                       /sax.jar,
>>>>     
>>>>       
>>>>         
>>> file:/Data/Dev/StateApi_Ref/lib/soap.jar,
>>>     
>>>       
>> file:/Data/Dev/StateApi_Ref/  
>>   
>>     
>>>                                            lib/soapprocessor.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/tools.jar, file:/Data/Dev           
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                               /StateApi_Ref/lib/xalan.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/xercesImpl.jar, fil                 
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                         e:/Data/Dev/StateApi_Ref/lib/xmlsec.jar,
>>> file:/Data/Dev/StateApi_Ref/lib/xsdlib.                             
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>             jar, core:/]
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>       
>>>>         
>> java.net.URLClassLoader.findClass(java.lang.String)
>>   
>>     
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/                                             
>>> libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/li      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                    b/ssa/libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>         
> java.lang.ClassLoader.loadClass(java.lang.String,
>   
>>>>     
>>>>       
>>>>         
>>> boolean) (/l                                             
>>> ib/ssa/libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at _Jv_FindClass(_Jv_Utf8Const,
>>>>       
>>>>         
>> java.lang.ClassLoader)
>>   
>>     
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/                                             
>>> libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at _Jv_PrepareCompiledClass(java.lang.Class)
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/libgcj.so.                                             
>>> 4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at _Jv_WaitForState(java.lang.Class, int)
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/libgcj.so.4.0                                            
>>>       
>
>   
>>> .0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>         
> java.lang.ClassLoader.linkClass0(java.lang.Class)
>   
>>>>     
>>>>       
>>>>         
>>> (/lib/ssa/li                                             
>>> bgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    at
>>>>     
>>>>       
>>>>         
>>> java.lang.ClassLoader.resolveClass0(java.lang.Class) (/lib/ssa      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                    /libgcj.so.4.0.0)
>>>   
>>>     
>>>       
>>>> [wscompile]    ...5 more
>>>> [wscompile] Command invoked: wscompile /usr/bin/gij-ssa -classpath
>>>>     
>>>>       
>>>>         
>>> /Data/Dev/Sta                                             
>>>
>>>     
>>>       
> teApi_Ref/lib/activation.jar:/Data/Dev/StateApi_Ref/lib/commons-beanutils.jar:/D
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> ata/Dev/StateApi_Ref/lib/commons-collections.jar:/Data/Dev/StateApi_Ref/lib/comm
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> ons-digester.jar:/Data/Dev/StateApi_Ref/lib/commons-logging.jar:/Data/Dev/StateA
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> pi_Ref/lib/dom.jar:/Data/Dev/StateApi_Ref/lib/jaas.jar:/Data/Dev/StateApi_Ref/li
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> b/jax-qname.jar:/Data/Dev/StateApi_Ref/lib/jaxb-api.jar:/Data/Dev/StateApi_Ref/l
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> ib/jaxb-impl.jar:/Data/Dev/StateApi_Ref/lib/jaxb-libs.jar:/Data/Dev/StateApi_Ref
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> /lib/jaxb-xjc.jar:/Data/Dev/StateApi_Ref/lib/jaxrpc-api.jar:/Data/Dev/StateApi_R
>   
>>   
>>     
>>>                            
>>>   
>>>     
>>>       
>>>>                   
>>>>     
>>>>       
>>>>         
> ef/lib/jaxrpc-impl.jar:/Data/Dev/StateApi_Ref/lib/jaxrpc-spi.jar:/Data/Dev/State
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> Api_Ref/lib/jta-spec1_0_1.jar:/Data/Dev/StateApi_Ref/lib/junit.jar:/Data/Dev/Sta
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> teApi_Ref/lib/keyexport.jar:/Data/Dev/StateApi_Ref/lib/mail.jar:/Data/Dev/StateA
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> pi_Ref/lib/namespace.jar:/Data/Dev/StateApi_Ref/lib/pkcs12import.jar:/Data/Dev/S
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> tateApi_Ref/lib/relaxngDatatype.jar:/Data/Dev/StateApi_Ref/lib/saaj-api.jar:/Dat
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> a/Dev/StateApi_Ref/lib/saaj-impl.jar:/Data/Dev/StateApi_Ref/lib/sax.jar:/Data/De
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> v/StateApi_Ref/lib/soap.jar:/Data/Dev/StateApi_Ref/lib/soapprocessor.jar:/Data/D
>   
>>   
>>     
>>>                                             
>>>
>>>     
>>>       
> ev/StateApi_Ref/lib/tools.jar:/Data/Dev/StateApi_Ref/lib/xalan.jar:/Data/Dev/Sta
>   
>>   
>>     
>>>         
>>>   
>>>     
>>>       
>>>>                                      
>>>>     
>>>>       
>>>>         
> teApi_Ref/lib/xercesImpl.jar:/Data/Dev/StateApi_Ref/lib/xmlsec.jar:/Data/Dev/Sta
>   
>>   
>>     
>>>                                             
>>>     
>>>       
>> teApi_Ref/lib/xsdlib.jar
>>   
>>     
>>> com.sun.xml.rpc.tools.wscompile.Main -d /Data/Dev/State             
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                             Api_Ref/build/jar
>>> -features:documentliteral,wsi -g -gen:client -keep -model /Dat      
>>>       
>
>   
>>>     
>>>       
>>   
>>   
>>     
>>>                                   
>>> a/Dev/StateApi_Ref/build/jar/StateApiService_model.xml.gz -s
>>> /Data/Dev/StateApi_                                             
>>> Ref/src-gen -Xprintstacktrace
>>> /Data/Dev/StateApi_Ref/src-gen/wsconfig.xml
>>>   
>>>     
>>>       
>>>> BUILD FAILED
>>>> file:/Data/Dev/StateApi_Ref/build.xml:73: wscompile failed
>>>>
>>>>   
>>>>
>>>>     
>>>>       
>>>>         
> ------------------------------------------------------------------------
>   
>>   
>>     
>>>   
>>>     
>>>       
>>>>     
>>>>       
>>>>         
> ---------------------------------------------------------------------
>   
>>   
>>     
>>>   
>>>     
>>>       
>>>> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message