No class found error java.lang.NoClassDefFoundError: com.posisoft.jdavmail.JDAVMailMessage
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Abhay_Ganu
Posted On:   Saturday, July 3, 2004 03:47 PM

I am trying to access my hotmail a/c using JDAV but getting an error. //Code Block (Starts) props = System.getProperties() ; session = Session.getInstance(props) ; session.setDebug(true) ; store = new JDAVMailStore(session,null) ; try { store.connect(null, "MyHotmailUserName", "MyHotmailPassword") ; } catch (MessagingException exc) { displayStatus( "Exception : " + exc.getMessage() ) ; } ; if (store.isConnected()) System.out.println( "Connected") ; else System.out.println( "not Connected") ; try { folder = store.getFolder("INBOX") ; } catch (MessagingException    More>>

I am trying to access my hotmail a/c using JDAV but getting an error.

			
//Code Block (Starts)

props = System.getProperties() ;
session = Session.getInstance(props) ;
session.setDebug(true) ;
store = new JDAVMailStore(session,null) ;
try {
store.connect(null, "MyHotmailUserName", "MyHotmailPassword") ;
} catch (MessagingException exc) { displayStatus( "Exception : " + exc.getMessage() ) ; } ;
if (store.isConnected())
System.out.println( "Connected") ;
else
System.out.println( "not Connected") ;

try {
folder = store.getFolder("INBOX") ;
} catch (MessagingException exc) { displayStatus(exc.getMessage() ) ; } ;
if (folder == null )
{
System.out.println("Invalid folder") ;
System.exit(0) ;
}
try {
if ( folder.exists() )
displayStatus( "Folder exists." ) ;
else
displayStatus( "Folder does not exists." ) ;
} catch (MessagingException exc) { displayStatus( "Exception : Folder Exists : " +
exc.getMessage() ) ; } ;

displayStatus("Opening folder...");
try {
folder.open( Folder.READ_ONLY ) ;
} catch (MessagingException exc) { System.out.println( "Exception : Opening folder : " +
exc.getMessage() ) ; } ;
displayStatus("Open folder success.");

try {
lnCount = folder.getMessageCount() ;
} catch (MessagingException exc) { displayStatus( "Exception : Get message count : " +
exc.getMessage() ) ; } ;
displayStatus( "Inbox contains " + lnCount + " messages." ) ;
}

//Code Block (Ends)


In this code snippet, following error occurs at the statement folder.open :


java.lang.NoClassDefFoundError: com.posisoft.jdavmail.JDAVMailMessage



void com.posisoft.jdavmail.FolderProxy.open(com.posisoft.jdavmail.JDAVMailFolder, int)



void com.posisoft.jdavmail.JDAVMailFolder.open(int)



The value of folder.exists() is true so it is able to connect to the server and check the existence of folders.
It seems that the JDAVMailMessage class can not be found. The JDAV jar file is in classpath because it is able to access the other classes from JDAV jar file. So I am not getting why this error is appearing. I would be grateful if somebody could guide me what is wrong.

Thanking you in advance

Abhay    <<Less
About | Sitemap | Contact