× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi
there i finally got it working on tomcat,
here is what i did
 InputStream is =
this.getClass().getClassLoader().getResourceAsStream(path.trim()+".PCML");
   if(is == null)
   {
  is =
ClassLoader.getSystemResourceAsStream(path.trim()+".PCML");
    }
pcml = new ProgramCallDocument(as400, path,is, null,
null,ProgramCallDocument.SOURCE_PCML);

And one more important thing i found out that, it
cannot be "pcml" but has to be "PCML", capital for the
class loaded to find it

Thanx for all the help

Ashish
        

--- Ashish Kulkarni <kulkarni_ash1312@xxxxxxxxx>
wrote:

> Hi
> i have tried that also, it does not work
> 
> Ashish
> 
> --- Marshall Dunbar/DPS <marshall@xxxxxxxxxxx>
> wrote:
> 
> > There is a constructor that takes a classloader,
> > 
> > public ProgramCallDocument(AS400 sys,
> >                            java.lang.String
> docName,
> >                            java.lang.ClassLoader
> > loader)
> >                     throws PcmlException
> > 
> > I believe the problem Ashish is having is because
> > the default classloader 
> > for resources is different than the classloader
> used
> > for loading classes 
> > for web app.  So maybe something like this would
> > work:
> > 
> > 
> > pcml = new ProgramCallDocument(as400, "PU049B", 
> > this.getClass().getClassLoader());
> > 
> > 
> > ===
> > Marshall Dunbar
> > DPS, Inc.
> > marshall@xxxxxxxxxxx
> > ====
> > 
> > 
> > 
> > "albartell" <albartell@xxxxxxxxx> 
> > Sent by: java400-l-bounces@xxxxxxxxxxxx
> > 08/18/2005 03:22 PM
> > Please respond to
> > Java Programming on and around the iSeries / AS400
> 
> > <java400-l@xxxxxxxxxxxx>
> > 
> > 
> > To
> > "'Java Programming on and around the iSeries /
> > AS400'" 
> > <java400-l@xxxxxxxxxxxx>
> > cc
> > 
> > Subject
> > RE: where do i keep PCML files in J2ee application
> > running on tomcat
> > 
> > 
> > 
> > 
> > 
> > 
> > I don't have the JavaDoc in front of me, but does
> > the ProgramCallDocument
> > constructor have an overloaded constructor to
> accept
> > an InputStream 
> > object?
> > That would make this a lot easier. Below is how I
> > acquire resources while 
> > in
> > an application server (i.e. Tomcat). Then you
> could
> > dictate exactly where
> > the PCML resided without having to worry.
> > 
> > InputStream inStream =
> >
>
ResourceControl.getAsInputStream("/com/mowyourlawn/uitext/fieldlabel.propert
> > ies");
> > 
> > ...
> > 
> > public class ResourceControl {
> >                  public static InputStream
> > getAsInputStream(String 
> > packageResource) {
> >                                  return
> >
>
ResourceControl.class.getResourceAsStream(packageResource);
> >                  } 
> > }
> > 
> > HTH,
> > Aaron Bartell
> > 
> > -----Original Message-----
> > From: java400-l-bounces@xxxxxxxxxxxx 
> > [mailto:java400-l-bounces@xxxxxxxxxxxx]
> > On Behalf Of Ashish Kulkarni
> > Sent: Thursday, August 18, 2005 1:33 PM
> > To: Java Programming on and around the iSeries /
> > AS400
> > Subject: Re: where do i keep PCML files in J2ee
> > application running on
> > tomcat
> > 
> > Hi
> > i tried
> > pcml = new ProgramCallDocument(as400,
> > "PU049B.pcml"); and have PCML under
> > WEB-INF/classes/ but still does not work
> > 
> > --- Narayanan R Pillai <strqst400@xxxxxxxxx>
> wrote:
> > 
> > > We are running under Tomcat 5.0 and we use the
> > default constructor and 
> > > then the fully qualified name of the pcml file.
> > > 
> > > ie
> > > pcml = new ProgramCallDocument();
> > > pcml.setDocument(
> > > "com.example.document.DocumentName.pcml" );//
> > place the pcml document 
> > > in WEB-INF/classes/com/example/document/
> > > 
> > > in that fashion. And it seems to work.
> > > 
> > > Pillai
> > > 
> > > Ashish Kulkarni wrote:
> > > 
> > > >Hi
> > > >just PU049B works in websphere application
> > server,
> > > but
> > > >not in tomcat, i have never tried Pu049B.pcml
> in
> > the constructor
> > > >
> > > >Ashish
> > > >
> > > >--- Narayanan R Pillai <strqst400@xxxxxxxxx>
> > wrote:
> > > >
> > > > 
> > > >
> > > >>Don't you have to say PU049B.pcml in the new
> > ProgramCallDocument 
> > > >>constructor ?
> > > >>
> > > >>Pillai
> > > >>
> > > >>Ashish Kulkarni wrote:
> > > >>
> > > >> 
> > > >>
> > > >>>Hi
> > > >>>The PCML file in MY IDE where under
> > > >>> 
> > > >>>
> > > >>WEB-INF/classes/
> > > >> 
> > > >>
> > > >>>folder
> > > >>>here the structure of how it looks in tomcat
> > > >>> 
> > > >>>
> > >
> >
>
>>C:\Tomcat5.0.28\webapps\approvals630001\WEB-INF\classes\PU049B.PCML
> > > >> 
> > > >>
> > > >>>and the jar file is also under classes folder
> > > >>>
> > > >>>here is what i do in my code
> > > >>>ProgramCallDocument pcml = new
> > > >>>ProgramCallDocument(as400, "PU049B"); boolean
> b
> > = 
> > > >>>pcml.callProgram("PU049B");
> > > >>>
> > > >>>and here is what i defined in my PCML file
> > <program name="PU049B"
> > > >>>path="/QSYS.LIB/%LIBL%.lib/PU049B.PGM">
> > > >>>
> > > >>>Regards
> > > >>>
> > > >>>Ashish
> > > >>>
> > > >>>
> > > >>>--- albartell <albartell@xxxxxxxxx> wrote:
> > > >>>
> > > >>> 
> > > >>>
> > > >>> 
> > > >>>
> > > >>>>Can you post some code?  Where was the PCML
> > > >>>> 
> > > >>>>
> > > >>located
> > > >> 
> > > >>
> > > >>>>within your IDE before,
> > > >>>>in a package or the WebRoot folder? 
> > > >>>>
> > > >>>>-----Original Message-----
> > > >>>>From: java400-l-bounces@xxxxxxxxxxxx 
> > > >>>>[mailto:java400-l-bounces@xxxxxxxxxxxx]
> > > >>>>On Behalf Of Ashish Kulkarni
> > > >>>>Sent: Thursday, August 18, 2005 7:58 AM
> > > >>>>To: java400-l@xxxxxxxxxxxx
> > > >>>>Subject: where do i keep PCML files in J2ee
> > application running on 
> > > >>>>tomcat
> > > >>>>
> > > >>>>Hi
> > > >>>>we have a web application where we call
> RPGLE
> > programs from java 
> > > >>>>using PCML.
> > > >>>>I have all the PCML files under
> > WEB-INF\classes folder in my web 
> > > >>>>application, IT works fine under websphere
> > application server, but 
> > > >>>>in tomcat i get PCML not found error, so i
> > moved the PCML
> > > >>>> 
> > > >>>>
> > > >>file
> > > >> 
> > > >>
> > > >>>>to
> > > >>>>/<tomcatroot>/common/classes/ folder, is
> there
> > a
> > > >>>> 
> > > >>>>
> > > >>way
> > > >> 
> > > >>
> > > >>>>to access PCML files
> > > >>>> 
> > > >>>>
> > > >>>>from WEB-INF/classes folder in tomcat
> instead.
> > > >>> 
> > > >>>
> > > >>>>Ashish
> > > >>>>
> > > >>>>
> > > >>>> 
> > > >>>> 
> > > >>>>
> > >
> >
>
>>>____________________________________________________
> > > >>> 
> > > >>>
> > > >>>>Start your day with Yahoo! - make it your
> home
> > > >>>> 
> > > >>>>
> > > >>page
> > > >> 
> > > >>
> > > >>>>http://www.yahoo.com/r/hs
> > > >>>>
> > > >>>>--
> > > >>>>This is the Java Programming on and around
> the
> > iSeries / AS400 
> > > >>>>(JAVA400-L) mailing list To post a message
> > email:
> > > >>>>JAVA400-L@xxxxxxxxxxxx To subscribe,
> > unsubscribe, or change list 
> > > >>>>options,
> > > >>>>visit:
> > > >>>> 
> > > >>>>
> > >
> >
>
>>>http://lists.midrange.com/mailman/listinfo/java400-l
> > > >>> 
> > > >>>
> > > >>>>or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please 
> > > >>>>take a moment to review the archives at 
> > > >>>>http://archive.midrange.com/java400-l.
> > > >>>>
> > > >>>>--
> > > >>>>This is the Java Programming on and around
> the
> > iSeries / AS400 
> > > >>>>(JAVA400-L) mailing list To post a message
> > email: 
> > > >>>>JAVA400-L@xxxxxxxxxxxx To subscribe,
> > unsubscribe, or change list
> > > options,
> > > >>>>visit:
> > > >>>> 
> > > >>>>
> > >
> >
>
>>>http://lists.midrange.com/mailman/listinfo/java400-l
> > > >>> 
> > > >>>
> > > >>>>or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please 
> > > >>>>take a moment to review
> > > the
> > > >>>>archives
> > > >>>>at http://archive.midrange.com/java400-l.
> > > >>>>
> > > >>>>
> > > >>>> 
> > > >>>>
> > > >>>> 
> > > >>>>
> > > >>>
> > > >>> 
> > > >>> 
> > > >>>
> > >
> >
>
>>____________________________________________________
> > > >> 
> > > >>
> > > >>>Start your day with Yahoo! - make it your
> home
> > > page
> > > >>> 
> > > >>>
> > > >>>http://www.yahoo.com/r/hs
> > > >>>
> > > >>> 
> > > >>>
> > > >>> 
> > > >>>
> > > >>--
> > > >>This is the Java Programming on and around the
> > iSeries / AS400 
> > > >>(JAVA400-L) mailing list To post a message
> > email: 
> > > >>JAVA400-L@xxxxxxxxxxxx To subscribe,
> > unsubscribe, or change list 
> > > >>options,
> > > >>visit:
> > >
> >
>
>>http://lists.midrange.com/mailman/listinfo/java400-l
> > > >>or email: JAVA400-L-request@xxxxxxxxxxxx
> Before
> > posting, please take 
> > > >>a moment to review the archives at 
> > > >>http://archive.midrange.com/java400-l.
> > > >>
> > > >>
> > > >> 
> > > >>
> > > >
> > > >
> > >
> >
> >__________________________________________________
> > > >Do You Yahoo!?
> > > >Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > >http://mail.yahoo.com
> > > > 
> > > >
> > > 
> > > --
> > > This is the Java Programming on and around the
> > iSeries / AS400 
> > > (JAVA400-L) mailing list To post a message
> email: 
> > > JAVA400-L@xxxxxxxxxxxx To subscribe,
> unsubscribe,
> > or change list 
> > > options,
> > > visit:
> > >
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > > or email: JAVA400-L-request@xxxxxxxxxxxx Before
> > posting, please take a 
> > > moment to review the archives at 
> > > http://archive.midrange.com/java400-l.
> > > 
> > > 
> > 
> > 
> > A$HI$H
> > 
> > 
> >  
> >
> ____________________________________________________
> > Start your day with Yahoo! - make it your home
> page
> > http://www.yahoo.com/r/hs 
> >  
> > --
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L)
> > mailing list To post a message email:
> > JAVA400-L@xxxxxxxxxxxx To subscribe,
> > unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx Before
> > posting, please take a
> > moment to review the archives at
> > http://archive.midrange.com/java400-l.
> > 
> > -- 
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L) 
> > mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
> > 
> > 
> > 
> > -- 
> > This is the Java Programming on and around the
> > iSeries / AS400 (JAVA400-L) mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit:
> >
> http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the
> > archives
> > at http://archive.midrange.com/java400-l.
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> -- 
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
> 
> 



                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.