DZone Forums
Go Back   DZone Forums > Community > Enterprise Development > Web Services, SOA & ESB
Reload this Page Class not found in Axis2 web service
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Question Class not found in Axis2 web service - 06-29-2010, 04:00 AM

Hi everyone,
I'm trying to get web services to work with Axis2 and Jonas 4.10.3.

I have a AAR web service with authentication classes and a JAR with the base classes for this web service. The main authentication class is located in the AAR file and derives from an abstract class located in the JAR.
I've voluntarily duplicated the JAR library in many directories (WEB-INF/lib, jonas/lib, jonas/lib/common, etc) to get sure it will be found.

The probem is kinda weird : when I send the first request to the web service (deployed in Axis) after restarting the server, I get a NoClassDefFoundError saying that the base class is not found (although it is actually present in the JAR file).

On the other hand, all the subsequent requests trigger another error : the NoClassDefFoundError no longer mentions the base class but says that the authentication class is missing, although it is present in the AAR file.

Does anyone know where this problem comes from? Maybe I need to set some kind of class path either for JOnAS or for Axis?

Thanks in advance, cheers.

Kurt
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2010
Default 07-02-2010, 07:49 AM

hi,

duplicating jars does not won't resolve your pb. May be if you could post some log so we can help
Reply With Quote
  (#3 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Default 07-02-2010, 08:53 AM

Hi ShadowLaw,
It was actually a crappy error : the JAR's tree had been changed into something invalid.
Thanks anyway!!

I now ran into another problem that is easier to explain : I need to configure 3 MySQL datasources but I don't really know all I nned to do.
- they are already declared in context.xml with their credentials
- in jonas.properties (dbm.datasources property), I requested that MySQL driver be loaded
- in MySQL.properties, I declared my three datasources with their JNDI names as below
Code:
#declaration of datasources in jonas.properties
datasource.name                 jdbc/auth
datasource.url                  jdbc:mysql://127.0.0.1:3306/auth?autoReconnect=true
datasource.classname            org.gjt.mm.mysql.Driver
datasource.username             authuser
datasource.password             authpwd
datasource.mapper               rdb.mysql

datasource.name                 jdbc/maindb
datasource.url                  jdbc:mysql://10.193.14.3:3306/maindb?autoReconnect=true
datasource.classname            org.gjt.mm.mysql.Driver
datasource.username             mainuser
datasource.password             mainpwd
datasource.mapper               rdb.mysql 

datasource.name                 jdbc/bkpdb
datasource.url                  jdbc:mysql://10.193.14.5:3306/bkpdb?autoReconnect=true
datasource.classname            org.gjt.mm.mysql.Driver
datasource.username             auxuser
datasource.password             auxpwd
datasource.mapper               rdb.mysql
First of all, I'm not even sure that this syntax is right. Don't each datasource declaration override the previous one?
Do I need to do something else in order to get the DB connections to work?

The application I need to deploy has bugs and doesn't display the "official" exception messages but I could still determine that the java:comp/env/jdbc/auth resource couldn't be found.

Can you please tell me whether I've configured all I needed to, and help me with this new problem?

Thanks a lot! Cheers!

Kurt
Reply With Quote
Reply

Tags
axis, class not found, jonas, web service

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source not found gsanipelli Eclipse 3 07-06-2010 10:37 AM
need help with simple web service client code using Axis2 coolnads@gmail.com Web Services, SOA & ESB 2 01-02-2010 06:22 AM
Not found localfile_1_0_0 on AIX stonefox Eclipse 0 07-23-2009 05:28 AM
Can't install Axis2 Code Gen plugin on Mac Tom Bates Eclipse 1 01-27-2009 03:58 PM
Axis2 implementation error (status 404) yanhua Eclipse 0 02-20-2008 09:26 AM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com