• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cannot access stub

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I created a webservice which i could successfully deploy. but when i tried to compile my client it is showing an error as follows.
--------------------
HoroscopeClient.java:14: cannot access staticstub.HoroscopeInterface
bad class file: .\build\staticstub\HoroscopeInterface.class
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
HoroscopeInterface hface=(HoroscopeInterface)stub;
1 error
-------------------
*******************
following are the pakages involved in my webservice

I have a directory named HoroscopeWS which contatins the following

1. config.xml
2. HoroscopeImplementation.java
3. HoroscopeInterface.java
4. HoroscopeWebServiceWar.war
5. build (A directory)

build directory contains the following

1. HoroscopeWebService.wsdl
2. mapping.xml
3. horoscope(A package)

horoscope contains the following

1. HoroscopeImplementation.class
2. HoroscopeInterface.class
****************************

Following are the packages involved in the client application

I have a directory named static-stub which contatins the following

1. build(A directory)
2. config-wsdl.xml
3. HoroscopeClient.java

Build contains

1. staticstub (A package)

staticstub contains
1. HoroscopeInterface.class
2. HoroscopeInterface_getSunSignTrait_RequestStruct.class
3. HoroscopeInterface_getSunSignTrait_RequestStruct_SOAPSerializer.class
4. HoroscopeInterface_getSunSignTrait_ResponseStruct.class
5. HoroscopeInterface_getSunSignTrait_ResponseStruct_SOAPBuilder.class
6. HoroscopeInterface_getSunSignTrait_ResponseStruct_SOAPSerializer.class
7. HoroscopeInterface_Stub.class
8. HoroscopeWebService.class
9. HoroscopeWebService_Impl.class
10. HoroscopeWebService_SerializerRegistry.class

What might be the reason for the error

Thanks in advance
Rgds
Sree
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you use Java 5 to compile that class, and are now using Java 1.4 to run it? I think class file version 49 is the one used by Java 5, while 48 is the one Java 1.4 uses.
 
Sree kanth
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. i am using java 1.4 only for everything
Rgds
Sree
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then maybe you used compiler options for different language versions (i.e. same javac, but emitted code for 1.3 and 1.4, or 1.4 and 1.5). That message always means the class files aren't for a language version the JVM was expecting to see.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic