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.

How do I access a .properties file inside an EJB jar?

6 posts in Java J2EE specific Last posting was on 2006-09-11 15:04:00.0Z
Patrick J. Maloney Posted on 2006-09-01 21:34:01.0Z
Newsgroups: sybase.public.easerver.j2ee
Subject: How do I access a .properties file inside an EJB jar?
From: "Patrick J. Maloney" <patrick.maloney@wcb.stREMOVEate.ny.us>
Organization: New York State Workers' Compensation Board
Message-ID: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106>
User-Agent: Xnews/5.03.24
X-Original-NNTP-Posting-Host: wcb138pc1.wcb.state.ny.us
X-Original-Trace: 1 Sep 2006 14:22:37 -0700, wcb138pc1.wcb.state.ny.us
Lines: 16
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2006 14:22:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2006 14:34:01 -0700
X-Trace: forums-1-dub 1157146441 10.22.108.75 (1 Sep 2006 14:34:01 -0700)
X-Original-Trace: 1 Sep 2006 14:34:01 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7720
Article PK: 208168

Hi,
I've tried a bunch of different getResourceAsStream() calls on every
ClassLoader I could find without any luck...can anyone help? I can do this
no problem with applets and web applications...it just doesn't want to work
with EJB jars.

I don't want to have to manually put the props file in the
java/classes directory (which is my current work-around).

tia, Patrick

--
Patrick Maloney
New York State Workers' Compensation Board

(Remove REMOVE from e-mail address to reply)


"Alexander Pire" <Alexander_no_spam_ Posted on 2006-09-01 23:26:03.0Z
From: "Alexander Pire" <Alexander_no_spam_@powerobjects_dot_com>
Newsgroups: sybase.public.easerver.j2ee
References: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106>
Subject: Re: How do I access a .properties file inside an EJB jar?
Lines: 33
Organization: PowerObjects
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-Original-NNTP-Posting-Host: 71-215-237-21.mpls.qwest.net
Message-ID: <44f8bee1$1@forums-2-dub>
X-Original-Trace: 1 Sep 2006 16:14:41 -0700, 71-215-237-21.mpls.qwest.net
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2006 16:14:42 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2006 16:26:03 -0700
X-Trace: forums-1-dub 1157153163 10.22.108.75 (1 Sep 2006 16:26:03 -0700)
X-Original-Trace: 1 Sep 2006 16:26:03 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7721
Article PK: 208169

You can use Jaguar::Repository, use the method lookup to retrieve the info.

--

Alexander Pire
PowerObjects
www.powerobjects.com
612.339.3355
**IT Solutions - Outside the Box**

"Patrick J. Maloney" <patrick.maloney@wcb.stREMOVEate.ny.us> wrote in
message news:Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106...
> Hi,
> I've tried a bunch of different getResourceAsStream() calls on every
> ClassLoader I could find without any luck...can anyone help? I can do
> this
> no problem with applets and web applications...it just doesn't want to
> work
> with EJB jars.
>
> I don't want to have to manually put the props file in the
> java/classes directory (which is my current work-around).
>
> tia, Patrick
>
> --
> Patrick Maloney
> New York State Workers' Compensation Board
>
> (Remove REMOVE from e-mail address to reply)


Patrick J. Maloney Posted on 2006-09-05 19:40:09.0Z
Newsgroups: sybase.public.easerver.j2ee
Subject: Re: How do I access a .properties file inside an EJB jar?
From: "Patrick J. Maloney" <patrick.maloney@wcb.stREMOVEate.ny.us>
References: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106> <44f8bee1$1@forums-2-dub>
Organization: New York State Workers' Compensation Board
Message-ID: <Xns98359D6997E44patrickmaloneywcbsta@192.138.151.106>
User-Agent: Xnews/5.03.24
NNTP-Posting-Host: wcb138pc1.wcb.state.ny.us
X-Original-NNTP-Posting-Host: wcb138pc1.wcb.state.ny.us
Date: 5 Sep 2006 12:40:09 -0700
X-Trace: forums-1-dub 1157485209 12.107.138.1 (5 Sep 2006 12:40:09 -0700)
X-Original-Trace: 5 Sep 2006 12:40:09 -0700, wcb138pc1.wcb.state.ny.us
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7723
Article PK: 208171

"Alexander Pire" <Alexander_no_spam_@powerobjects_dot_com> wrote in
news:44f8bee1$1@forums-2-dub:

> You can use Jaguar::Repository, use the method lookup to retrieve the
> info.
>

Thanks, but I don't want to use proprietary means to do it.

--
Patrick Maloney
New York State Workers' Compensation Board

(Remove REMOVE from e-mail address to reply)


Jonathan Baker [Sybase] Posted on 2006-09-05 12:00:40.0Z
From: "Jonathan Baker [Sybase]" <lastnamefirstinitial@sybase.com>
User-Agent: Thunderbird 1.5.0.5 (Windows/20060719)
MIME-Version: 1.0
Newsgroups: sybase.public.easerver.j2ee
Subject: Re: How do I access a .properties file inside an EJB jar?
References: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106>
In-Reply-To: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 47.85.171.66.subscriber.vzavenue.net
X-Original-NNTP-Posting-Host: 47.85.171.66.subscriber.vzavenue.net
Message-ID: <44fd66e8@forums-1-dub>
Date: 5 Sep 2006 05:00:40 -0700
X-Trace: forums-1-dub 1157457640 66.171.85.47 (5 Sep 2006 05:00:40 -0700)
X-Original-Trace: 5 Sep 2006 05:00:40 -0700, 47.85.171.66.subscriber.vzavenue.net
Lines: 21
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7722
Article PK: 208170

Unfortunately, the props file must be in the java/classes directory.
It's a problem with the classloaders, and it's a known bug. I believe
(but I haven't checked, so it's just a theory) that this is fixed in EAS
6.0 with the complete rework of the classloaders.


Jonathan

Patrick J. Maloney wrote:
> Hi,
> I've tried a bunch of different getResourceAsStream() calls on every
> ClassLoader I could find without any luck...can anyone help? I can do this
> no problem with applets and web applications...it just doesn't want to work
> with EJB jars.
>
> I don't want to have to manually put the props file in the
> java/classes directory (which is my current work-around).
>
> tia, Patrick
>


Patrick J. Maloney Posted on 2006-09-05 19:40:31.0Z
Newsgroups: sybase.public.easerver.j2ee
Subject: Re: How do I access a .properties file inside an EJB jar?
From: "Patrick J. Maloney" <patrick.maloney@wcb.stREMOVEate.ny.us>
References: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106> <44fd66e8@forums-1-dub>
Organization: New York State Workers' Compensation Board
Message-ID: <Xns98359D797B0B2patrickmaloneywcbsta@192.138.151.106>
User-Agent: Xnews/5.03.24
NNTP-Posting-Host: wcb138pc1.wcb.state.ny.us
X-Original-NNTP-Posting-Host: wcb138pc1.wcb.state.ny.us
Date: 5 Sep 2006 12:40:31 -0700
X-Trace: forums-1-dub 1157485231 12.107.138.1 (5 Sep 2006 12:40:31 -0700)
X-Original-Trace: 5 Sep 2006 12:40:31 -0700, wcb138pc1.wcb.state.ny.us
Lines: 33
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7724
Article PK: 208174

"Jonathan Baker [Sybase]" <lastnamefirstinitial@sybase.com> wrote in
news:44fd66e8@forums-1-dub:

> Unfortunately, the props file must be in the java/classes directory.
> It's a problem with the classloaders, and it's a known bug. I believe
> (but I haven't checked, so it's just a theory) that this is fixed in
> EAS 6.0 with the complete rework of the classloaders.
>
>
> Jonathan
>
>
> Patrick J. Maloney wrote:
>> Hi,
>> I've tried a bunch of different getResourceAsStream() calls
>> on every
>> ClassLoader I could find without any luck...can anyone help? I can
>> do this no problem with applets and web applications...it just
>> doesn't want to work with EJB jars.
>>
>> I don't want to have to manually put the props file in the
>> java/classes directory (which is my current work-around).
>>
>> tia, Patrick
>>

Thanks!

--
Patrick Maloney
New York State Workers' Compensation Board

(Remove REMOVE from e-mail address to reply)


Sandip Ghayal Posted on 2006-09-11 15:04:00.0Z
From: Sandip Ghayal <sghayal@sybase.com>
Reply-To: sghayal@sybase.com
Organization: Sybase Inc.
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.easerver.j2ee
Subject: Re: How do I access a .properties file inside an EJB jar?
References: <Xns9831B0C49EFCpatrickmaloneywcbsta@192.138.151.106> <44fd66e8@forums-1-dub> <Xns98359D797B0B2patrickmaloneywcbsta@192.138.151.106>
In-Reply-To: <Xns98359D797B0B2patrickmaloneywcbsta@192.138.151.106>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: wireless-wat-1.sybase.com
Message-ID: <45057acb$1@forums-2-dub>
X-Original-Trace: 11 Sep 2006 08:03:39 -0700, wireless-wat-1.sybase.com
Lines: 41
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 11 Sep 2006 08:03:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 11 Sep 2006 08:04:00 -0700
X-Trace: forums-1-dub 1157987040 10.22.108.75 (11 Sep 2006 08:04:00 -0700)
X-Original-Trace: 11 Sep 2006 08:04:00 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.easerver.j2ee:7729
Article PK: 208172

This has been fixed in EAServer 6.0

If you are using EAServer 5.3 you can use NamedClassLoader which should
also have this fix in it.

Thanks,

Sandip Ghayal

Patrick J. Maloney wrote:
> "Jonathan Baker [Sybase]" <lastnamefirstinitial@sybase.com> wrote in
> news:44fd66e8@forums-1-dub:
>
>
>>Unfortunately, the props file must be in the java/classes directory.
>>It's a problem with the classloaders, and it's a known bug. I believe
>>(but I haven't checked, so it's just a theory) that this is fixed in
>>EAS 6.0 with the complete rework of the classloaders.
>>
>>
>>Jonathan
>>
>>
>>Patrick J. Maloney wrote:
>>
>>>Hi,
>>> I've tried a bunch of different getResourceAsStream() calls
>>> on every
>>>ClassLoader I could find without any luck...can anyone help? I can
>>>do this no problem with applets and web applications...it just
>>>doesn't want to work with EJB jars.
>>>
>>> I don't want to have to manually put the props file in the
>>>java/classes directory (which is my current work-around).
>>>
>>>tia, Patrick
>>>
>
>
> Thanks!
>