Trying to do the simple HelloWorld java application for portal

Hi:
i've been trying to do the simple java application HelloWorld so that i can get a view of how will it be to integrate a pure java application that we have in a later step. The fact is that i've been following "how to build a java portlet" and "packaging and deploying your provider" documents.
i've taken the code from that document:
public class HelloWorldApp {
public static void main (string[] args){
//Display "Hello World!"
System.out.println("Hello World!");
That's my java code. (in fact i want to do this as a trial, 'cause later i will
do the same with a java application of our own).
So i compiled it, taken the .class, jar it and packaged it as told in the
second document.
I've deployed it in OC4J_portal and when i try to access the URL i get an
error:
500 Internal Server Error
java.lang.NoSuchMethodException
     at java.lang.Class.getMethod0(Native Method)
     at java.lang.Class.getMethod(Class.java:888)
     at oracle.portal.provider.v2.render.http.JavaRenderer.postInitialize(Unknown Source)
     at oracle.portal.utils.xml.v2.DefaultNodeHandler.invokePostInitialize(Unknown Source)
     at oracle.portal.utils.xml.v2.DefaultNodeHandler.processNode(Unknown Source)
     at oracle.portal.utils.xml.v2.DefaultNodeHandler.processNode(Unknown Source)
     at oracle.portal.utils.xml.v2.DefaultNodeHandler.processNode(Unknown Source)
     at oracle.portal.provider.v2.http.DefaultProviderLoader.getProviderDefinition(Unknown Source)
     at oracle.portal.provider.v2.http.DefaultProviderLoader.init(Unknown Source)
     at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.init(Unknown Source)
     at oracle.webdb.provider.v2.utils.soap.SOAPProcessor.locateService(Unknown Source)
     at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source)
     at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].server.http.AJPRequestHandler.run(AJPRequestHandler.java:151)
     at com.evermind[Oracle9iAS (9.0.2.0.0) Containers for J2EE].util.ThreadPoolThread.run(ThreadPoolThread.java:64)
does anybody know how to solve this problem?
Thx.
Regards. Urko.

Hi Urko,
Such an application as you have quoted will not have much luck as a Portlet - the code you supplied simply writes "Hello World" to standard out!
Think of a portlet more like a servlet - you have an output stream to write to which, under the covers, is wired back up to the Portal Server which assembles the content into the page seen in the browser.
Take a look at the extensive range of sample Java Portlets available with the PDK download.
Anyway, from the stack trace it looks like you're using JavaRenderer. JavaRenderer invokes an arbitrarily named method on an arbitrary class **provided** that method takes a single argument of type PortletRenderRequest. So you would need something like:-
public class MyApp
// A bunch of app-specific code.
public void renderPortlet(PortletRenderRequest pr)
PrintWriter out = pr.getWriter();
out.println("<b>Hello World</b>");
Then, the relevant provider.xml section would look something like this....
<showPage class="oracle.portal.provider.v2.render.http.JavaRenderer>
<className>MyApp</className>
<renderMethod>renderPortlet</renderMethod>
</showPage>
Hope this helps.....
Regards,
Gareth
PDK-Java Development Team

Similar Messages

  • Developing Java application for windows CE based Handheld device

    Hi everybody,
    I am planning to develop the java application for windows CE
    based handheld device.I came to know that Oracle 9iLite supports
    the Developement of Java Application for windows CE devices.Can
    i use the JDeveloper IDE to develop the application on windows
    NT.If so how to deploy the application on windows CE device(Is
    there any options in Jdeveloper to deploy the application).Any
    body please give the solution.
    Regards,
    Siva mani kumar.D

    I agree. In my opinion Sun has done a horrible job documenting all this madness for the average developer just starting out with this stuff. There is the CLDC, J2ME, Personal Java, J2ME-WTK, MIDP, MIDP-FCS ... maddness. Anyway after sorting through it all for a few days, I think the answer to your question you will need to use Personal Java for WinCE and the Sharp Zaurus, and MIDP for PalmOS for the palm. Jeode seems to be the most common and best Personal Java implementation and it is basically the JDK1.2.2 (or is it 1.1.8) that is designed to run on WinCE and Embeddix (such as Lineo on the Zaurus). You program it just like you would a 1.1.8 application and then you can test it by running pjava.exe which is included in the personal java 3.1 download from Sun. There is also a program called JavaCheck that will ensure that your app will run properly in PersonalJava. As for the Palm, MIDP for PalmOS is a 574K program that installs on your palm device. You then use the J2ME-WTK (wireless toolkit) to build a JAR/JAD file and you use the MIDP API to write the code.

  • HT1338 My mac is becoming too slow. It takes long to open word documents, pdf files or excel documents or even safari. Can anybody suggest something? I have tried to reduce the number of open applications, but does not seem to work.

    My mac is becoming too slow. It takes long to open word documents, pdf files or excel documents or even safari. Can anybody suggest something? I have tried to reduce the number of open applications, but does not seem to work.

    Hi ...
    Checked to see how much free space there is on the startup disk lately?
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure there's a minimum of 15% free disk space.
    Freeing Up Hard Disk Space - Mac GuidesFreeing Up Hard Disk Space - Mac Guides
    If disk space is not the issue, booting in Safe Mode deletes system caches that may help.
    A Safe Mode boot takes longer then a normal boot so be patient.
    Once you see the Desktop, click the Apple menu icon top left corner of the screen.
    From the drop down menu click Restart.
    See if that makes a difference ...

  • Support problem. The adviser tried to diagnose the failure of an application called JOTNOT PRO to update. He said he'd phone back at 8pm. I pick up his call at 8pm. Electronic voice: thank you for calling apple. We are now closed" So now I have 2 problems

    Support problem. The adviser tried to diagnose the failure of an application called JOTNOT PRO to update. He said he'd phone back at 8pm. I pick up his call at 8pm. Electronic voice: thank you for calling apple. We are now closed" So now I have 2 problems: the adviser had got me to reset so bye bye wifi passwords and settings. And then when he phones back as we agreed he's not actually on the phone, it's just a voice saying Apple Support is now closed! What on earth is going on at apple support I wonder.
    Anyway, the original problem: an application called JotNot Pro fails to update. The error message says something like "you cannot update this cos either you bought it with a different Apple ID or somebody else bought it."
    Neither applies. Can anybody help?
    PS. This is my first approach to the support community so please bear with me!
    William

    You might have better luck contacting the app's support or developers.

  • How to deploy the custom java application for self regaistration in portal?

    hi,
    I have created a custom java application in NWDS for Self Registration of new users.I am working on EP 7.02 and the standard self registration application is a Web dynpro java application.
    How can i deploy my custom java application built as a par file in place of the Web dynpro java application?
    Thanks,

    Hi Amarys,
    If you have developed the PAR file in NWDS then you can deploy the PAR in the server with NWDS ( [Check Required Settings |NWDS 7.0 does not deploy PAR;) or in server directly (system administrator > support >> portal runtime >> administration console)
    Best Regards
    Arun Jaiswal

  • I'm trying download Firefox Sync. When I open it & tried to drag the icon into my application file, I get a message saying a newer version of Firefox exists & did I want to replace it. Should I replace my Firefox 5 or is there something else I can do?

    I am trying to activate Firefox on my Ipad. I saved the download file. When I opened it and tried to drag the icon into my application file, I got a pop-up message saying that a newer version of Firefox existed and did I want to replace it. Should I replace my Firefox 5 or is there something else I can do?
    I'm afraid I'll lose my browser.

    * Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install.
    * Install the new version that you have downloaded.
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • Can anybody tell me how to send/receive  the sms from java application

    Hi All,
    Can any body tell me, how to send/receive the sms from java application to mobile phones.
    I have installed the jsms engine and when i try to connect to the mobile device ,the jsms server is giving
    the following error.
    Cannot connect to GSM Device, error : -11

    Which jsms? Google finds several.
    Try the website where you downloaded it.

  • Can any body tell me, how to send/receive the sms from java application

    Hi All,
    Can any body tell me, how to send/receive the sms from java application to mobile phones.
    I have installed the jsms engine and when i try to connect to the mobile device ,the jsms server is giving
    the following error.
    Cannot connect to GSM Device, error : -11

    The best place to ask your question is at the JSMS website, forum or mailing list since this is no error that directly comes from a class belonging to the core Java classes.

  • Developing Java Applications for Windows CE

    Hello,
    I hope this sub forum is right. So I must develop a Java Application for Windows CE. I read something about J2ME, but I think this is only for Mobilephone and Windows CE supports AWT. So I tried just some simple forms with J2ME.
    Can anybody tell me how I develop java Applications for Windows CE? Can I use Eclipse or must I use another IDE?
    Realy I developed Swing 5-6 Month but I have no idea how I develop Java Applications for Windows CE.
    Thanks a lot for helping...

    The MIDP for Palm OS 1.0 requires Palm OS v3.5 or higher to run. According to your error message, the emulator is not running v3.5 or higher. Try to get hold of a ROM image with a later version. I've run it with v4.0 of the OS and it works.

  • Is there any possibility to develope java application for IPhones

    Is there any possibility to develope java application for IPhones

    921326 wrote:
    Just look to the next thread!I did that after I replied to the last person to ask this question. I spotted this thread:
    Developing iPhone apps with JavaFX 2 (Demo)
    Not much there, but apparently people are trying to hack it together using JavaFX 2 already. I believe I read an article where Oracle itself had given a presentation about a JavaFX2 app on an iPhone; I believe the gist of it is that they want to make it so you can bundle the Java runtime with your application, which makes it legal to sell a Java application through the appstore.

  • "Unable to connect to server" when trying to accept the new terms and conditions for iCloud.

    I keep getting "Unable to connect to server" when trying to accept the new terms and conditions for iCloud.  What can I do?  I can access the internet, but my clash of the clans applications is failing.  The problem started January 1, 2014

    I just figured out the problem with my grandma's iphone.
    Settings>iCloud>Delete Account
    IT WILL NOT DELETE YOUR ACCOUNT. it just takes it off the phone. then you can log back in, and BAM, You're good   I hope!
    Hope this helps.

  • My iphone 4 wont turn on. it justr randomnly turned off and i have tried to hold the home and sleep buttons for a minute and also tried to put it into recovery mode but nothing is working?

    my iphone 4 wont turn on. it justr randomnly turned off and i have tried to hold the home and sleep buttons for a minute and also tried to put it into recovery mode but nothing is working?

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...
    But... if the Device has been Modified... this will Not necessarily work.

  • I am trying to download the update IOS 5 version for mi ipad 2 and at the end when it finishes downloading it shows an error "connection has been interrupted and that the task could not be completed", my internet service is fine, what can it be?

    I am trying to download the update IOS 5 version for mi ipad 2 and at the end when it finishes downloading it shows an error "connection has been interrupted and that the task could not be completed", my internet service is fine, what can it be?

    The 2nd generation can not be upgraded beyond 4.2.1.

  • What's the best duplicates finder application for Mac OS X?

    What's the best duplicates finder application for Mac OS X?

    Thank you both!  I ended up going for DupeGuru because it was free and it worked well.   Easy Duplicate Finder baited me with the promise of free download then when the search was over I got the "buy the software" if I wanted to delete more than 10 files.
    DupeGuru worked well and so far I have not been asked for money.
    This solves my question.

  • I am trying to find the iCloud log-in history for my account.  Thank you, I am trying to find the iCloud log-in history for my account.  Thank you

    I am trying to locate  the iCloud log-in history for my account.  Thank you,

    There isn't one.

Maybe you are looking for

  • More localization woes - upside down question marks.

    With some effort, I am able to load variable values from the database based on the language the user has selected, and display those variable values in my column headings and the like (see thread How are session variables used for localization? for t

  • Develop Module: Inaccurate Preview in Detail

    So the develop module is producing a different rendering than the library module is in regard to sharpening and noise reduction.  In develop the image is extremely blurry where in loupe view it seems to be previewed correctly. So I tested by bringing

  • Product Category Deletion in SRM (not with Hierarchy)

    Hello All, Certain Product categories are to be deleted in SRM which belong to different R3 Back end systems I tried the COMM_HIERARCHY Tx in SRM and did the following:    Select the Product assigned to the relebvant Back end system and delete manual

  • Problems caused by Editable areas when scrolling in ie6

    Hi, Not sure whether this is a problem in ie6 but think its more likely me being thick with using templates and editable regions! I have a site here which uses 2 templates that are very similar. Everything works fine in FF, however in ie6 I have noti

  • IPhone glitchy and worsening?

    I bought the iPhone 4s around the 17th October. I had no issues until a month after where I noticed there was some glitching here and there, but nothing too noticeable. So I ignored. It's now becoming impossible at times to even use it.. Often I can'