Developing Portals using JSR Compiant API and struts

Hi,
I am using Oracle AP Portal server 10.1.4 for development and all the existing portals are developed using Oracle PL/SQL. We have to convert all of them into JSR 168 Compliant (JPS API ) portlets using struts framework.
Could you provide us ideas or code snippets or sample applications?
It will be appreciated your responses as soon.
Thanks
Suren

I may end up having to do that, but I'm trying to keep my solution set as it is as I apply a print layout using tiles to each of the reports and I would like to keep things that way if I can.
I just noticed something interesting that I had not seen before, and that is in the PDF there is text rendered for the tiles tag <tiles:getAsString name="title" /> which tells me that the HttpURLConnection is getting the tiles attributes, but where it is failing is on the <tiles:insert attribute="body" /> tag. That at least narrows the problem down to the tiles:insert line specifically and not tiles overall.

Similar Messages

  • Developing portal using Weblogic portal 10.3 or weblogic workshop 10.3

    Hello
    I am new to portal development. I see that one can develop portal using Oracle weblogic workshop 10.3 which has many features including Java Page Flow and Java controls. I am wondering what extra features one can get using Weblogic portal 10.3. The Weblogic platform 10.3 which I use does not have weblogic portal, it has weblogic AS and workshop. Do I need weblogic portal install now or in future while developing portal. I am trying to develop a portal from scratch. Any input will be highly appreciated. Thanks.

    Some suggesssions,
    While installing the weblogic you need select weblogic portal option also. Only for weblogic different installation exe file with portal different exe file.
    To get the weblogic portal server and portal work shop with weblogc you need to down load weblogic portal 10.3 exe file.
    Thanks,
    Venkata Sarvabatla

  • Pull large amounts of data using odata, client API and so takes a long time in project server 2013

    We are trying to pull large amounts of data in project server 2013 using both client API and odata calls, but it seem to take a long time. How is this done
    In project server 2010 we did this creating SQL views in both the reporting database and for list creating a view in the content database. Our IT dept is saying we can't do this anymore. How does a view in Project database or content database create issues?
    As long as we don't add a field in the table. So how's one to do this with creating a view?

    Hello,
    If you are using Project Server 2013 on premise I would recommend using T-SQL against the dbo. schema in the Project Web Database for your reports, this will be far quicker that the APIs. You can create custom objects in the dbo. schema, see the link below:
    https://msdn.microsoft.com/en-us/library/office/ee767687.aspx#pj15_Architecture_DAL
    It is not supported to query the SharePoint content database directly with T-SQL or add any custom objects to the content database.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Any one uses javax.print API and works?

    I have just downloaded 1.4 beta2 SDK and imported all the javax.print classes. I use the most simple test code as the following:
    FileInputStream fis = new FileInputStream("test.txt");
    try {
    DocFlavor psInFormat = DocFlavor.INPUT_STREAM.TEXT_PLAIN_US_ASCII;
    Doc myDoc = new SimpleDoc(fis, psInFormat, null);
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(new Copies(1));
    aset.add(MediaSizeName.ISO_A4);
    aset.add(Sides.ONE_SIDED);
    PrintService[] services = PrintServiceLookup.lookupPrintServices(psInFormat, aset);
    if (services.length > 0) {
    DocPrintJob job = services[0].createPrintJob();
    job.print(myDoc, aset);
    } catch (Exception e) {System.out.println(e.getMessage());}
    However, PrintServiceLookup.lookupPrintServices can't find my printer. I have 9 network printers connected to my system which range from HP LaserJet 4500 to 8100 and Acrobat PDFWriter. The API can't find any of my printer? What did I do wrong

    Hi Guys,
    First,
    If your trying to print any document sent by the server from the client machine u have to write a applet which recieves the output in form of stream and then print it. I could do these with JPEG, GIF and ASCII but could not do it with PDF (The sun doesn't have a implementation for PDF document printing, they just have a declaration may future released will help us print PDF).
    If u want the Print dialog box to appear use the following code that worked fine for me.
    public class SomeClass
    public static void main(String args[]) throws Exception
    PrintRequestAttributeSet pras =     new HashPrintRequestAttributeSet();
    DocFlavor flavor = DocFlavor.INPUTSTREAM.GIF;
    PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
    PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
    PrintService service = ServiceUI.printDialog(null, 200, 200,printService, defaultService, flavor, pras);
    if (defaultService != null)
    DocPrintJob job = defaultService.createPrintJob();
    FileInputStream fis = new FileInputStream("somefile.GIF");
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(byteArrayOutputStream, flavor, das);
    job.print(doc, pras);
    Thread.sleep(10000);
    If u do not want the dialog box to appear and just print to the default printer of the local machine use the following code
    public class SomeClass
    public static void main(String args[]) throws Exception
    PrintRequestAttributeSet pras =     new HashPrintRequestAttributeSet();
    DocFlavor flavor = DocFlavor.INPUTSTREAM.GIF;
    PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
    if (defaultService != null)
    DocPrintJob job = defaultService.createPrintJob();
    FileInputStream fis = new FileInputStream("somefile.GIF");
    DocAttributeSet das = new HashDocAttributeSet();
    Doc doc = new SimpleDoc(byteArrayOutputStream, flavor, das);
    job.print(doc, pras);
    Thread.sleep(10000);
    Mean while if some body comes across any tweaks to print PDF documents using j2se1.4 please write to me at
    [email protected]
    Regards,
    Madhu

  • Use of DBlookup API and find particular receiver

    Hi all,
    The scenario is :
    soap req -> XI -> req to external database -> resoponse from db to XI -> BAPI request -> response from BAPI to XI -> send response to SOAP Response
    I found that DBlookup API (User defined function to get data from External Database) is very useful to achieve this scenario without BPM
    now question is :
    There are multiple SAP HR Systems, how can i determine particular HR system based on URL data received from external database?  Each SAP HR system uses same BAPI structure.
    Also it will be great if anybody share any document or information regarding fetching data from external database.
    Regards
    Ritesh
    Edited by: chintan patel on Apr 4, 2008 6:33 PM

    I've to use BPM in this scenarion because eventhough I am getting data from external database I am not able to put condition on that fields. For example In this case I've to find out the particular SAP (receiver) system based on URL field, which is coming from the database. But in XPATH I am not able to fetch this URL. I can fetch only source structure fields. So BPM is the best soulution for this interface.
    Thanks all for contributions. Appreciated
    Chintan

  • Developer portal documentation out of date and frustrating

    FYI: this is just a rant to apple and a big thank you to this forum!
    I have solved all my issues and finally have apps running on my testing device.. but no thanks to the out of date and confusing documentation. If it wasn't for this forum, I still will be figuring out how to select provisional profile in XCode.
    Problems with the documentation:
    1. "Installing iPhone OS":
    I spent hours looking for "OS X iPhone 2.0 .ipsw" on the dev center. I thought to myself, do I really need this? I convinced myself, it must be a special version of iphoneOS for developing. I mean why else would it still be in "how to guide". Thanks to the forum for telling me otherwise. I still do not know if you have to "restore ipod". I ended up restore ipod just in case.
    2. Generating an App ID:
    What's with the asterick.. At least the document got that right and specifically tells you to enter an "*". But if you should always enter an asterick then why even make that a step to perform. Is there any reason to not enter an "*"??
    3.Running your Development App on a provisioned device
    Here's where I had the biggest trouble:
    "In the Project Info window, select the ‘Build’ tab and enter “iPhone Developer: <YourFirstName> <YourLastName> in the ‘Code Signing Identity’ > ’Any iPhone OS’ field setting. This is the also the Common Name of your iPhone Development Certificate."
    Ugh FIX THAT LINE in documentation. It drove me nuts.. you see I placed "IPhone Developer: Rick Mullinix" in for Code Signing Identity. Which seems correct, that is my identity. But no, that leads to not seeing provisioning profile as a choose.
    Thanks to the forum, I changed the identity to "IPhone Developer".. and it works!
    But that leads to another question... how does "IPhone Developer" identitfy anybody? We are all "IPhone Developer(s)".. I guess we are all thought to be the same by Apple.. might as well make everyone place "Cash Cow" as their identity.
    4. Over all:
    I am still confused by all the certificates, profiles, key chains.. seems all magical to me, it works and all, but I wish documentation had better wording and definitions to help my understanding.
    -Thanks again to this forum, and I hope that "Distributing my App" wont be as difficult.

    1. No, you don't have to restore your ipod. As long as you're running the fw 2.0 (and above) your ipod is ready for development.
    2. don't know. i'm just glad that it works
    3. Just look into your keychain under Certificates. There should be one named "iPhone Developer: <your> <name>". Enter that line in xcode. "iPhone Developer: Jon Doe" for example. You just have to enter the exact name of the certificate in xcode.
    4. Yeah, that stuff is pretty confusing. My Dev-Account got activated yesterday and I spent the whole day just setting up my certs and tax-info. It was really frustrating and time consuming. I'm (negatively) surprised by the ammount of real paperwork you have to do. It just doesn't get in my head that you have to print and snailmail that many letters for something like an internet application store. But that's another story
    just my 2 rest-of-the-world cents
    Message was edited by: mad hair

  • Can we develop EP(enterprise portals) using sap work bench?

    hi,
    i know that we can develop portals using NWDS. But i want to know  can we develop EP using sap work bench or any other transaction.

    Hi Arafat,
    I was trying to post few links from SAP Technical website. But, it is not allowing me post that links on here. You can have a look on their website as well. They have got some really good  tutorials on EP and Webdynpro ABAP/JAVA.
    Meanwhile, if you have access to SE80 only, then you can only develop Webdynpro ABAP Applications. The step by step procedure to create a WD ABAP Application go through the below links for detailed explanations and step by step procedures.
    Check this blog for Basics :
    Practical tips for developing with ABAP WebDynpro
    Web Dynpro ABAP Demonstration Videos
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/28113de9-0601-0010-71a3-c87806865f26?rid=/webcontent/uuid/fed073e5-0901-0010-4eb4-c9882aac7b11
    Developing ABAP Applications Using Web Dynpro
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/d41b25d2216babe10000000a1553f6/frameset.htm
    Web Dynpro ABAP: Development in Detail
    http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/frameset.htm
    WDA Sample programs
    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d
    I hope this links will help you and clear all your issues.
    Regards,
    Gopal.

  • JAVA API AND ABAP API SIMPLE SCENARIO

    Hello MDM gurus
    I have never used any Java API or ABAP API to leverage and present MDM functionalities on front end systems like portal,etc...
    Could you please give me all the required to play around with JAVA api and ABAP api's.
    Points will be given to every valuable answer.
    Thanks

    Hi Nazeer,
    In order to use Portal you need Java APIs and to start with refer the MDM Java docs to get the basic idea of various classes and methods to be used in developing the simple java application and access it using portal.
    http://help.sap.com/saphelp_mdm550/helpdata/en/47/9f23e5cf9e3c5ce10000000a421937/frameset.htm
    Sample code for Duplicating Repository
    public class TestDuplicateRepository
               public static ConnectionPool simpleConnection;
               public static RepositoryIdentifier repIdentifier,repIdentifier1;
         public static String session;
         public static String connection = "MDMServer_Test";
         public static String repository1 = "Test_Repository";
         public static String repository2 = "Test_Duplicate";
              public static DBMSType dbmsType = DBMSType.MS_SQL;
         public static void main(String[] args)throws CommandException, ConnectionException
                   //Creating Connection.
                   simpleConnection = ConnectionPoolFactory.getInstance(connection);     
                   //Establishing connection with Repository.
                   repIdentifier = new RepositoryIdentifier(repository1, connection, dbmsType);
                   repIdentifier1 = new RepositoryIdentifier(repository2, connection, dbmsType);
                   //Creation Sever Session.
                   CreateServerSessionCommand createServerSessionCmd = new CreateServerSessionCommand(simpleConnection);
                   createServerSessionCmd.execute();
                   session = createServerSessionCmd.getSession();
                   //Authenticating Server Session.                    
                   AuthenticateServerSessionCommand auth= new AuthenticateServerSessionCommand(simpleConnection);
                   auth.setSession(session);
                   auth.setUserName("Admin");
                   auth.setUserPassword("Admin");
                   auth.execute();
                   session = auth.getSession();     
                   //Duplicate Repository Command
                   DuplicateRepositoryCommand duplRepCmd = new DuplicateRepositoryCommand(simpleConnection);
                   duplRepCmd.setDBMSUserName("sa");
                   duplRepCmd.setDBMSUserPassword("abc");
                   duplRepCmd.setSession(session);
                   duplRepCmd.setSourceRepositoryIdentifier(repIdentifier);
                   duplRepCmd.setTargetRepositoryIdentifier(repIdentifier1);
                   duplRepCmd.execute();
    Similarly you can try with Getting server version, Archive repository and then move on to adding,modifying records etc.
    For ABAP APIs refer the below link
    http://help.sap.com/saphelp_mdm550/helpdata/en/44/93aa6e31381053e10000000a422035/frameset.htm
    Regards,
    Jitesh Talreja

  • How to access the SAP MDM destinations using mdm java api in 7.1

    hi,
    I have SAP MDM 7.1 SP11 and SAP Portal 7.3 and developing the custom webdynpro application using the  JAVA MDM API. I want configure the SAP MDM destinations in SAP Portal .
    How to access the MDM destinations in java code using API? and how to create the connection with MDM using the MDM destinations.
    Please provide the code for access the SAP MDM destinations in java code using MDM java api and creating the connection to MDM.
    Thanks

    Jun,
    Thanks for the reply and api information.
    I have got this api information from the following sap documentation. But i am looking for the code by implementing this class and creating the mdm connection.
    Creating an MDM Connection Using Java Code - SAP NetWeaver Master Data Management (MDM) - SAP Library
    if any thing can you share it.
    Thanks

  • Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

    Hi all,
    When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
    I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
    Environment:
    The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
    Version: 3.4.1".
    i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
    The Jars i added in the classpath:
    adobe-forms-client.jar
    adobe-livecycle-client.jar
    adobe-usermanager-client.jar
    adobe-utilities.jar
    ejb.jar
    j2ee.jar
    ecutlis.jar
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    server.jar
    utlis.jar
    wsexception.jar
    My code is :
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
    ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
    //Create a FormsServiceClient object
    FormsServiceClient formsClient = new FormsServiceClient(myFactory);
    //Get Form data to pass to the processFormSubmission method
    Document formData = new Document(req.getInputStream());
    //Set run-time options
    RenderOptionsSpec processSpec = new RenderOptionsSpec();
    processSpec.setLocale("en_US");
    //Invoke the processFormSubmission method
    FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
    List fileAttachments = formOut.getAttachments();
    Iterator iter = fileAttachments.iterator();
    int i = 0 ;
    while (iter.hasNext()) {
    Document file = (Document)iter.next();
    file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
    short processState = formOut.getAction();
    ...... (To the end of the sample)
    My Error was:
    com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
    at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
    at HandleData.doPost(HandleData.java:62)
    at HandleData.doGet(HandleData.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    a

    I assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
    Do the following test:
    - Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
    - Ping machine1 from machine1 and note the ip address.
    The two pings should match.
    - Ping machine2 from machine1 and note the ip address.
    - Ping machine2 from machine2 and note the ip address.
    The two pings should match.
    Usually this kind of error would happen if your servers have internal and external ip addresses.

  • Start to develop portal

    Hi all
    I am new to 9iAS portal. I would like to know how to start to learn and develop portals using 9iAS, any books hints..
    And also I would like to know what is PDK??...Using PDK can we develop portals without installing Oracle 9iAS..Where can I find details regarding these??.
    Please any help is appreciated..
    Thanks a lot

    Hello,
    The best start will be to take a look to PortalCenter Web site for overview of the features and benefits of OracleAS Portal.
    For development perspective you can use PortalStudio, this is the place where you will find all the information -sample,technical note, how tos, ...- about the PDK.
    Regards
    Tugdual Grall

  • Problem using Java Mail API with WLS 7.0

    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
         public static void main(String args[])
              try
                   //Context ic = getInitialContext();
                   InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
                   Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
                   Properties props = new Properties();
                   props.put("mail.transport.protocol", "smtp");
                   props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
                   props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
                   Session session2 = session.getInstance(props);
                   Message msg = new MimeMessage(session2);
                   msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
                   msg.setSubject("Test Message");
                   msg.setSentDate(new Date());
                   MimeBodyPart mbp = new MimeBodyPart();
                   mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
                   Multipart mp = new MimeMultipart();
                   mp.addBodyPart(mbp);
                   msg.setContent(mp);
                   Transport.send(msg);
              catch(Exception e)
                   e.printStackTrace();
         }//end of main
    public static Context getInitialContext()
         throws NamingException
              Properties p = new Properties();
              p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
                   p.put(Context.SECURITY_PRINCIPAL, "weblogic");
                   p.put(Context.SECURITY_CREDENTIALS, "weblogic");
              return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah

    You can use InitialContext ic = new InitialContext() only if you are using a startup class, servlet or a JSP i.e
    server side code.
    If you are using a java client you need to use Context ic = getInitialContext();
    Try this code
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try {
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
    Context ic = new InitialContext(h);
    Session session = (Session) ic.lookup("testSession");
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    props.put("mail.from", "[email protected]");
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse("[email protected]",false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    }//end of class
    We have shipped a javamail example in the samples\server\src\examples\javamail folder.
    Jimmy Shah wrote:
    Hi All,
    I am trying to use the Java Mail API provided by WLS 7.0. I have made the
    settings metioned in the WLS 7.0 docs. However when I try to run the program I
    am getting the following error:
    javax.naming.NoInitialContextException: Need to specify class name in environment
    or system property, or as an applet parameter, or in an application resource file:
    java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    46)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
    a:283)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    The code that I have written is as follows
    import java.util.*;
    import javax.activation.*;
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.naming.*;
    import java.io.*;
    import java.net.InetAddress;
    import java.util.Properties;
    import java.util.Date;
    public class MailTo {
    public static void main(String args[])
    try
    //Context ic = getInitialContext();
    InitialContext ic = new InitialContext();
    /* My jndi name is "testSession" */
    Session session = (Session) ic.lookup("testSession"); /* THE PROBLEM IS SHOWN
    IN THIS LINE */
    Properties props = new Properties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", "XX.XX.XX.XX");
    /* For security reasons I have written the ip add in this format */
    props.put("mail.from", "[email protected]"); /* for security reasons i have
    changed the mail address */
    Session session2 = session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]",
    false));
    msg.setSubject("Test Message");
    msg.setSentDate(new Date());
    MimeBodyPart mbp = new MimeBodyPart();
    mbp.setText("This is a mail sent to you using JAVA Mail API and Weblogic Server");
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp);
    msg.setContent(mp);
    Transport.send(msg);
    catch(Exception e)
    e.printStackTrace();
    }//end of main
    public static Context getInitialContext()
    throws NamingException
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    p.put(Context.PROVIDER_URL, "t3://localhost:7501/testWebApp");
    p.put(Context.SECURITY_PRINCIPAL, "weblogic");
    p.put(Context.SECURITY_CREDENTIALS, "weblogic");
    return new InitialContext(p);
    }//end of class
    Can anyone please tell me what is the problem. I thought that we cannot directly
    do
    InitialContext ic = new InitialContext();
    So I had written a method getInitialContext() as shown in the above piece of code,
    but that too did not work.
    Eagerly awaiting a response.
    Jimmy Shah--
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Use both CAN APIs

    Hi,
    I am developing an application that talks to a microcontroller.  I would like to use the Frame API for setup where I can send commands and get responses, and would like to use the Channel API for a mode where I am simply monitoring messages that I receive from the micro.
    I have a state machine where I begin by opening the Frame API, have some different states that i go into which utilize the query/response aspect of the frame API and then a state which closes the Frame API and opens the Channel API.  The problem that I am having occurs when I have already closed the Frame API and started a read task with the channel API.  When I click the stop monitoring button, I exit the While loop which was reading a message defined in the Can DB (havn't actually had it read data yet) and execute the Channel APIs CAN Clear.VI i get the following error.
    Error - 1074388720 occured at CAN Initialize.vi
    Possible reasons:
    NI-CAN (Hex 0xBFF62110) You cannot use the Frame API and Channel API simultaneously on the same interface (such as CAN0).   tools in MAX use the Channel API.  Soultuon: Use a different interface with each API.
    I need a way to work around this and am not sure why the Frame API isn't seeming to be closed, especially since I have a state in my state machine to close the Frame API before I begin using the Channel API.
    If anyone has any suggestions please let me know.
    Thanks,
    Gary
    Solved!
    Go to Solution.

    sorry i will attach it all again so it can be run.  Use this VI.  it has a tab control.  when the program starts, the frame api is running and then you click stop and switch the tab to see the channel api running.  when you click the stop button on the channel api you should see the error.
    the error has been occurring every time, but when i just ran it, it didnt give that error.  I still think the problem exists and I see the problem in my real app that basically does the same thing.
    Attachments:
    Test for both APIs.zip ‏44 KB

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

  • Encrypt/Decrypt data, multiple public keys using Bouncy castle api?

    Hi all.
    I need to implement encrypt/decrypt functionality of some data with many public keys using bouncy castle api and EnvelopedData class in java 1.4 SE.
    Could someone give me examples how to do it. I searched whole the internet and i could not find simple example.

    Hi thanks very much.
    I had a quick look at the examples. I will see if they could help me.
    Here is more specific what i want:
    Encrypt data with multiple public keys that are kept in .pkcs12 file.
    And decrypt the data using coresponding private key after that.
    I must use bouncy castle api for java 1.4 se.
    Best regards
    Edited by: menchev on Nov 13, 2008 8:26 AM

Maybe you are looking for

  • After latest updates Studio Software no longer works...

    After the most recent pro Apps update all my Studio 2 apps except DVD Studio Pro have quit working. I am working with a Dual 1.8 GHz PPC G5 with 3 GB of ram and OS X 10.4.11. I have installed all the most recent updates for all the programs including

  • How do I know if my back up to a external hard drive has worked?

    Hi, I have completed a back up of my Elements12 catalog to a external hard drive but when I try to view them they have been saved in all sorts of different ways.Some of them are GOM media files which will not open at all. Some say SYNCDB or CACHE or

  • HT1212 ipod touch 4

    my ipod touch 4th gen is disabled for 22,296,290 minutes. how do you restore it.

  • Can this product convert a sideways PDF to Excel?

    I have a PDF that is obviously an excel spreadsheet scanned in sideways and when I try to run it through the export program, I get a file of junk. Any ideas>?

  • ECM integration with Performance Management

    I am trying to integrate the Appraisals with ECM. The required configuration is done in SPRO. The problem which I face is that the number assigned to the appraisal template is different in the development box and in the quality box. I tried to config