Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

URGENT : How to deploy additional files(other than the component's jar file) in a Jaguar Server Component?

3 posts in General Discussion (old) Last posting was on 2000-02-22 01:51:49.0Z
Gopesh Sanghvi Posted on 2000-02-18 07:23:19.0Z
Newsgroups: sybase.public.easerver
Reply-To: "Gopesh Sanghvi" <gsanghvi@samyak.com>
From: "Gopesh Sanghvi" <gsanghvi@samyak.com>
Subject: URGENT : How to deploy additional files(other than the component's jar file) in a Jaguar Server Component?
Date: Fri, 18 Feb 2000 12:53:19 +0530
Lines: 139
Organization: Samyak Infotech Pvt.Ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 202.164.100.88
Message-ID: <347_fp7giHee$GA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28413
Article PK: 160433

Hi! Everyone

I have developed and tested Email sending functionality using Java Mail API
(JavaMail API requires JDK/JRE1.1.x or higher). Java Mail requires two jar
files (mail.jar and activation.jar) to be placed in CLASSPATH.

Now I was required to develop Email functionality as CORBA Component. So I
developed Jaguar Server Component ( EJB 0.4 ) using Power J 3.0 and Jaguar
CTS - Version 3.0. I kept mail.jar and activation.jar required files in
C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes (this directory is in
CLASSPATH) at machine where I installed Jaguar server component. Now when I
call a method of server component to send mail, I get the following
Exception in server log file of Jaguar :


Feb 11 11:27:17 2000: Error: Java class javax.mail.Service not loaded.
Feb 11 11:27:17 2000: java.lang.ClassNotFoundException: javax.mail.Service
Feb 11 11:27:17 2000: at
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
223)
Feb 11 11:27:17 2000: at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:304)
Feb 11 11:27:17 2000: at
dylt2000.utils.mail.MailManager.<init>(MailManager.java)
Feb 11 11:27:17 2000: at
dylt2000.utils.mail.MailManager.getCurrent(MailManager.java)
Feb 11 11:27:17 2000: at
dylt2000.utils.mail.MailManager.startUp(MailManager.java)
Feb 11 11:27:17 2000: at
dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
Feb 11 11:27:17 2000: at
dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
80)
Feb 11 11:27:17 2000: System exception 'java.lang.ClassNotFoundException'
thrown by component 'mail/EmailUtility' method 'sendMail'
Feb 11 11:27:17 2000: JNI_Component::setSystemException: unknown exception
'java.lang.ClassNotFoundException'
Feb 11 11:27:17 2000: Propagating to client as system exception
CORBA::UNKNOWN
Feb 11 11:27:17 2000: In deactivate method of EMail Component

So presumable Jaguar Server component is not able to access mail.jar and
activation.jar files. So to workaround the problem, I decided to incorporate
mail.jar and activation.jar along with my Jaguar component's jar file.
In this case in Target window of Server component I specified in other
classes tab, path to mail.jar and activation.jar (other classes tab is
displayed when I select the jar containg the component in left hand pane).
This made my Server component's jar file (enlarged to 282 KB from 24 KB) to
incorporate most of (but not all ! ) the files of mail.jar and
activation.jar. Now when I call a method of server component to send mail, I
get the following Exception in server log file of Jaguar :


Feb 11 11:53:16 2000: getSession().getProviders().length :0
Feb 11 11:53:16 2000: NoSuchProviderException caught in sendMessage:No
provider for smtp
Feb 11 11:53:16 2000: javax.mail.NoSuchProviderException: No provider for
smtp
Feb 11 11:53:16 2000: at javax.mail.Session.getProvider(Session.java:232)
Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:425)
Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:406)
Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:393)
Feb 11 11:53:16 2000: at
dylt2000.utils.mail.Mailbox.sendMessage(Mailbox.java)
Feb 11 11:53:16 2000: at dylt2000.utils.mail.Mailbox.sendMail(Mailbox.java)
Feb 11 11:53:16 2000: at
dylt2000.utils.mail.MailManager.send(MailManager.java)
Feb 11 11:53:16 2000: at
dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
Feb 11 11:53:16 2000: at
dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
80)

When I checked Server component's jar file, I found that it was not having
following files (in addition to other files) which were present in mail.jar
:

javamail.default.providers
javamail.default.address.map

Java Mail documentation states that javamail.default.providers contain the
details of implementation classes for Java mail API.
javamail.default.providers in mail.jar has the following contents :

# JavaMail IMAP provider Sun Microsystems, Inc
protocol=imap; type=store; class=com.sun.mail.imap.IMAPStore; vendor=Sun
Microsystems, Inc;
# JavaMail SMTP provider Sun Microsystems, Inc
protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport;
vendor=Sun Microsystems, Inc;

Also javax.mail.NoSuchProviderException is thrown when no provider
(implementation class for Java Mail API) is found.
(
In Email sending functionality developed as a single project in PowerJ, I
used to get the following console output indicating the implementation
providers for Java Mail API
getSession().getProviders().length :2
i :0
getSession().getProvider().getClassName():com.sun.mail.imap.IMAPStore
getSession().getProvider().getVendor():Sun Microsystems, Inc
getSession().getProvider().getProtocol():imap
i :1
getSession().getProvider().getClassName()::com.sun.mail.smtp.SMTPTransport
getSession().getProvider().getVendor() :Sun Microsystems, Inc
getSession().getProvider().getProtocol():smtp
These details match with the details of javamail.default.providers file)

So I assume, the problem is because server component is not having
javamail.default.providers file. This problem comes even though mail.jar and
activation.jar are in C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes at
machine where I installed Jaguar server component and component 's jar file
contains IMAPStore.class and SMTPTransport.class. I tried to include (using
Jaguar manager ) mail.jar and activation.jar files in All Properties tab of
component properties in property com.sybase.jaguar.component.files and
com.sybase.jaguar.component.java.classes. But the result is same.

The platform is Microsoft Windows NT 4.00.1381


Any Suggestion ?

Please forward your suggestions at ajay@samyak.com


Thanks in advance
Ajay


Dave Wolf [Sybase] Posted on 2000-02-22 01:51:49.0Z
Newsgroups: sybase.public.easerver
From: "Dave Wolf [Sybase]" <dwolf@sybase.com>
Subject: Re: URGENT : How to deploy additional files(other than the component's jar file) in a Jaguar Server Component?
Date: Mon, 21 Feb 2000 20:51:49 -0500
Lines: 173
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 158.159.8.19
Message-ID: <347_pE1fmfNf$GA.65@forums.sybase.com>
References: <347_fp7giHee$GA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28260
Article PK: 160302

You can add the JAR's using Jaguar Manager. For the component go to All
Properties and add the JAR's to the list in

com.sybase.jaguar.component.java.classes=YourJarFile.jar,...

The ",..." part for an EJB should include all the x.y.z.* options that would
appear if you deployed from PowerJ.

Dave Wolf
Internet Applications Division

Gopesh Sanghvi <gsanghvi@samyak.com> wrote in message
news:fp7giHee$GA.324@forums.sybase.com...
> Hi! Everyone
>
> I have developed and tested Email sending functionality using Java Mail
API
> (JavaMail API requires JDK/JRE1.1.x or higher). Java Mail requires two jar
> files (mail.jar and activation.jar) to be placed in CLASSPATH.
>
> Now I was required to develop Email functionality as CORBA Component. So I
> developed Jaguar Server Component ( EJB 0.4 ) using Power J 3.0 and Jaguar
> CTS - Version 3.0. I kept mail.jar and activation.jar required files in
> C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes (this directory is in
> CLASSPATH) at machine where I installed Jaguar server component. Now when
I
> call a method of server component to send mail, I get the following
> Exception in server log file of Jaguar :
>
>
> Feb 11 11:27:17 2000: Error: Java class javax.mail.Service not loaded.
> Feb 11 11:27:17 2000: java.lang.ClassNotFoundException: javax.mail.Service
> Feb 11 11:27:17 2000: at
>
com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
> 223)
> Feb 11 11:27:17 2000: at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:304)
> Feb 11 11:27:17 2000: at
> dylt2000.utils.mail.MailManager.<init>(MailManager.java)
> Feb 11 11:27:17 2000: at
> dylt2000.utils.mail.MailManager.getCurrent(MailManager.java)
> Feb 11 11:27:17 2000: at
> dylt2000.utils.mail.MailManager.startUp(MailManager.java)
> Feb 11 11:27:17 2000: at
> dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
> Feb 11 11:27:17 2000: at
>
dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
> 80)
> Feb 11 11:27:17 2000: System exception 'java.lang.ClassNotFoundException'
> thrown by component 'mail/EmailUtility' method 'sendMail'
> Feb 11 11:27:17 2000: JNI_Component::setSystemException: unknown exception
> 'java.lang.ClassNotFoundException'
> Feb 11 11:27:17 2000: Propagating to client as system exception
> CORBA::UNKNOWN
> Feb 11 11:27:17 2000: In deactivate method of EMail Component
>
> So presumable Jaguar Server component is not able to access mail.jar and
> activation.jar files. So to workaround the problem, I decided to
incorporate
> mail.jar and activation.jar along with my Jaguar component's jar file.
> In this case in Target window of Server component I specified in other
> classes tab, path to mail.jar and activation.jar (other classes tab is
> displayed when I select the jar containg the component in left hand pane).
> This made my Server component's jar file (enlarged to 282 KB from 24 KB)
to
> incorporate most of (but not all ! ) the files of mail.jar and
> activation.jar. Now when I call a method of server component to send mail,
I
> get the following Exception in server log file of Jaguar :
>
>
> Feb 11 11:53:16 2000: getSession().getProviders().length :0
> Feb 11 11:53:16 2000: NoSuchProviderException caught in sendMessage:No
> provider for smtp
> Feb 11 11:53:16 2000: javax.mail.NoSuchProviderException: No provider for
> smtp
> Feb 11 11:53:16 2000: at javax.mail.Session.getProvider(Session.java:232)
> Feb 11 11:53:16 2000: at
javax.mail.Session.getTransport(Session.java:425)
> Feb 11 11:53:16 2000: at
javax.mail.Session.getTransport(Session.java:406)
> Feb 11 11:53:16 2000: at
javax.mail.Session.getTransport(Session.java:393)
> Feb 11 11:53:16 2000: at
> dylt2000.utils.mail.Mailbox.sendMessage(Mailbox.java)
> Feb 11 11:53:16 2000: at
dylt2000.utils.mail.Mailbox.sendMail(Mailbox.java)
> Feb 11 11:53:16 2000: at
> dylt2000.utils.mail.MailManager.send(MailManager.java)
> Feb 11 11:53:16 2000: at
> dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
> Feb 11 11:53:16 2000: at
>
dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
> 80)
>
> When I checked Server component's jar file, I found that it was not having
> following files (in addition to other files) which were present in
mail.jar
> :
>
> javamail.default.providers
> javamail.default.address.map
>
> Java Mail documentation states that javamail.default.providers contain
the
> details of implementation classes for Java mail API.
> javamail.default.providers in mail.jar has the following contents :
>
> # JavaMail IMAP provider Sun Microsystems, Inc
> protocol=imap; type=store; class=com.sun.mail.imap.IMAPStore; vendor=Sun
> Microsystems, Inc;
> # JavaMail SMTP provider Sun Microsystems, Inc
> protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport;
> vendor=Sun Microsystems, Inc;
>
> Also javax.mail.NoSuchProviderException is thrown when no provider
> (implementation class for Java Mail API) is found.
> (
> In Email sending functionality developed as a single project in PowerJ, I
> used to get the following console output indicating the implementation
> providers for Java Mail API
> getSession().getProviders().length :2
> i :0
> getSession().getProvider().getClassName():com.sun.mail.imap.IMAPStore
> getSession().getProvider().getVendor():Sun Microsystems, Inc
> getSession().getProvider().getProtocol():imap
> i :1
> getSession().getProvider().getClassName()::com.sun.mail.smtp.SMTPTransport
> getSession().getProvider().getVendor() :Sun Microsystems, Inc
> getSession().getProvider().getProtocol():smtp
> These details match with the details of javamail.default.providers file)
>
> So I assume, the problem is because server component is not having
> javamail.default.providers file. This problem comes even though mail.jar
and
> activation.jar are in C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes
at
> machine where I installed Jaguar server component and component 's jar
file
> contains IMAPStore.class and SMTPTransport.class. I tried to include
(using
> Jaguar manager ) mail.jar and activation.jar files in All Properties tab
of
> component properties in property com.sybase.jaguar.component.files and
> com.sybase.jaguar.component.java.classes. But the result is same.
>
> The platform is Microsoft Windows NT 4.00.1381
>
>
> Any Suggestion ?
>
> Please forward your suggestions at ajay@samyak.com
>
>
> Thanks in advance
> Ajay
>
>
>
>
>
>
>
>
>
>
>
>


Carson Hager[Team Sybase] Posted on 2000-02-19 16:26:16.0Z
Newsgroups: sybase.public.easerver
From: chager@dyn-data.com (Carson Hager[Team Sybase])
Subject: Re: URGENT : How to deploy additional files(other than the component's jar file) in a Jaguar Server Component?
Date: Sat, 19 Feb 2000 16:26:16 GMT
Organization: Dynamic Data Solutions, Inc.
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 178
NNTP-Posting-Host: 63.86.26.206
Message-ID: <347_38aec404.2056196@forums.sybase.com>
References: <347_fp7giHee$GA.324@forums.sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:28321
Article PK: 160354

That's not how JAR files work. You have to list them individually in
your classpath.

classpath=%jaguar%\java\classes;c:\myjar.jar;


Carson

___________________________________________________________

Carson Hager
Team Sybase
Dynamic Data Solutions, Inc.
Enterprise Application Studio 3.0 Consulting and Training
http://www.dyn-data.com

DDS is now hiring EAServer consultants
to support its exploding EAServer business!
Please submit your resume to
hr@dyn-data.com!


On Fri, 18 Feb 2000 12:53:19 +0530, "Gopesh Sanghvi"

<gsanghvi@samyak.com> wrote:

>Hi! Everyone
>
>I have developed and tested Email sending functionality using Java Mail API
>(JavaMail API requires JDK/JRE1.1.x or higher). Java Mail requires two jar
>files (mail.jar and activation.jar) to be placed in CLASSPATH.
>
>Now I was required to develop Email functionality as CORBA Component. So I
>developed Jaguar Server Component ( EJB 0.4 ) using Power J 3.0 and Jaguar
>CTS - Version 3.0. I kept mail.jar and activation.jar required files in
>C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes (this directory is in
>CLASSPATH) at machine where I installed Jaguar server component. Now when I
>call a method of server component to send mail, I get the following
>Exception in server log file of Jaguar :
>
>
>Feb 11 11:27:17 2000: Error: Java class javax.mail.Service not loaded.
>Feb 11 11:27:17 2000: java.lang.ClassNotFoundException: javax.mail.Service
>Feb 11 11:27:17 2000: at
>com.sybase.jaguar.server.JaguarClassLoader.loadClass(JaguarClassLoader.java:
>223)
>Feb 11 11:27:17 2000: at
>java.lang.ClassLoader.loadClassInternal(ClassLoader.java:304)
>Feb 11 11:27:17 2000: at
>dylt2000.utils.mail.MailManager.<init>(MailManager.java)
>Feb 11 11:27:17 2000: at
>dylt2000.utils.mail.MailManager.getCurrent(MailManager.java)
>Feb 11 11:27:17 2000: at
>dylt2000.utils.mail.MailManager.startUp(MailManager.java)
>Feb 11 11:27:17 2000: at
>dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
>Feb 11 11:27:17 2000: at
>dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
>80)
>Feb 11 11:27:17 2000: System exception 'java.lang.ClassNotFoundException'
>thrown by component 'mail/EmailUtility' method 'sendMail'
>Feb 11 11:27:17 2000: JNI_Component::setSystemException: unknown exception
>'java.lang.ClassNotFoundException'
>Feb 11 11:27:17 2000: Propagating to client as system exception
>CORBA::UNKNOWN
>Feb 11 11:27:17 2000: In deactivate method of EMail Component
>
>So presumable Jaguar Server component is not able to access mail.jar and
>activation.jar files. So to workaround the problem, I decided to incorporate
>mail.jar and activation.jar along with my Jaguar component's jar file.
>In this case in Target window of Server component I specified in other
>classes tab, path to mail.jar and activation.jar (other classes tab is
>displayed when I select the jar containg the component in left hand pane).
>This made my Server component's jar file (enlarged to 282 KB from 24 KB) to
>incorporate most of (but not all ! ) the files of mail.jar and
>activation.jar. Now when I call a method of server component to send mail, I
>get the following Exception in server log file of Jaguar :
>
>
>Feb 11 11:53:16 2000: getSession().getProviders().length :0
>Feb 11 11:53:16 2000: NoSuchProviderException caught in sendMessage:No
>provider for smtp
>Feb 11 11:53:16 2000: javax.mail.NoSuchProviderException: No provider for
>smtp
>Feb 11 11:53:16 2000: at javax.mail.Session.getProvider(Session.java:232)
>Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:425)
>Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:406)
>Feb 11 11:53:16 2000: at javax.mail.Session.getTransport(Session.java:393)
>Feb 11 11:53:16 2000: at
>dylt2000.utils.mail.Mailbox.sendMessage(Mailbox.java)
>Feb 11 11:53:16 2000: at dylt2000.utils.mail.Mailbox.sendMail(Mailbox.java)
>Feb 11 11:53:16 2000: at
>dylt2000.utils.mail.MailManager.send(MailManager.java)
>Feb 11 11:53:16 2000: at
>dylt2000.utils.mail.EmailClientImpl.sendMail(EmailClientImpl.java)
>Feb 11 11:53:16 2000: at
>dylt2000.utils.mail._sk_mail_EmailUtility.invoke(_sk_mail_EmailUtility.java:
>80)
>
>When I checked Server component's jar file, I found that it was not having
>following files (in addition to other files) which were present in mail.jar
>:
>
>javamail.default.providers
>javamail.default.address.map
>
>Java Mail documentation states that javamail.default.providers contain the
>details of implementation classes for Java mail API.
>javamail.default.providers in mail.jar has the following contents :
>
># JavaMail IMAP provider Sun Microsystems, Inc
>protocol=imap; type=store; class=com.sun.mail.imap.IMAPStore; vendor=Sun
>Microsystems, Inc;
># JavaMail SMTP provider Sun Microsystems, Inc
>protocol=smtp; type=transport; class=com.sun.mail.smtp.SMTPTransport;
>vendor=Sun Microsystems, Inc;
>
>Also javax.mail.NoSuchProviderException is thrown when no provider
>(implementation class for Java Mail API) is found.
>(
>In Email sending functionality developed as a single project in PowerJ, I
>used to get the following console output indicating the implementation
>providers for Java Mail API
>getSession().getProviders().length :2
>i :0
>getSession().getProvider().getClassName():com.sun.mail.imap.IMAPStore
>getSession().getProvider().getVendor():Sun Microsystems, Inc
>getSession().getProvider().getProtocol():imap
>i :1
>getSession().getProvider().getClassName()::com.sun.mail.smtp.SMTPTransport
>getSession().getProvider().getVendor() :Sun Microsystems, Inc
>getSession().getProvider().getProtocol():smtp
>These details match with the details of javamail.default.providers file)
>
>So I assume, the problem is because server component is not having
>javamail.default.providers file. This problem comes even though mail.jar and
>activation.jar are in C:\Program Files\Sybase\jaguar CTS 3.0\Java\Classes at
>machine where I installed Jaguar server component and component 's jar file
>contains IMAPStore.class and SMTPTransport.class. I tried to include (using
>Jaguar manager ) mail.jar and activation.jar files in All Properties tab of
>component properties in property com.sybase.jaguar.component.files and
>com.sybase.jaguar.component.java.classes. But the result is same.
>
>The platform is Microsoft Windows NT 4.00.1381
>
>
>Any Suggestion ?
>
>Please forward your suggestions at ajay@samyak.com
>
>
>Thanks in advance
>Ajay
>
>
>
>
>
>
>
>
>
>
>
>

___________________________________________________________

Carson Hager
Team Sybase
Dynamic Data Solutions, Inc.
Enterprise Application Studio 3.0 Consulting and Training

DDS Enterprise Application Framework
Available Now as Open Source!
http://www.dyn-data.com