I think this goes here, Oracle, Java, JSP and Flex

Ok so I apologize if this does not belong here....
I want to connect Flex to a Oracle 10g data base, and I managed to connect Java to the oracle data base, now the middle ware is the jsp file. I need to parse the connection through a jsp file in such that what gets produced when a SQL statement of say SELECT * FROM BLA; is a html page that displays all XML so i can through that through flex and display it in a data grid. everything is ready to go but the jsp part...
How do i get java to spit out the select statment, or any statement that is through the jsp file?

Adrienk wrote:
I want to connect Flex to a Oracle 10g data base, and I managed to connect Java to the oracle data base, now the middle ware is the jsp file. I need to parse the connection through a jsp file You're using the word "parse" in a way that makes no sense. You seem to mean "use".
in such that what gets produced when a SQL statement of say SELECT * FROM BLA; is a html page that displays all XMLWell, then it's not really an HTML page. But you can still use JSP for XML, I believe. But keep in mind that JSP is awful, and you may not even need it.
so i can through that through flex and display it in a data grid. So basically, you want to create a web service, accessible from your Flex client, that exposes data from that table in XML.
How do i get java to spit out the select statment, or any statement that is through the jsp file?I suppose you could have a servlet that uses JDBC to query the database, and then forwards to the JSP page to render it.
But you may not even need JSP for something like this. If it's just a SQL query result set, i.e., basically a grid, the XML may be so simple that the servlet could render it all by itself just fine, maybe by just printing XML code directly, or maybe by making a DOM and serializing it to the servlet's HttpServletResponse output stream.
There are apparently also taglibs for JSP that can do db queries, but the less you touch JSP the better IMHO.
The details here would depend on your environment. If you're using an object/relational mapping tool, you wouldn't use JDBC directly. Etc.
Also I'd advise you to consider caching the rendered XML if the table isn't going to change a lot.

Similar Messages

  • Sound (I think this goes here)

    I'm having an issue with my sound, especially with iTunes.
    I press the speaker button to turn on my sound and the speaker graphic transparency shows up on the screen, but the speaker icon on the bar up top does do anything. I shut off the speaker and try it again and the icon on the bar reacts. Is this just slow loading time?
    I even tried closing out iTunes and opening it back up, same thing happens. It even seems to do this when iTunes isn't up.
    MacBook   Mac OS X (10.4.7)   iTunes 7.0.1

    That's very odd. Does the computer make the 'click' sound to indicate the speaker has been powered on? I have an older model than yours (PowerBook G4) and there is no latency between hitting the sound on/off toggle and both seeing the speaker transparency and the change in the icon up top.

  • Any CASE tools for Java, JSP, and JavaBeans?

    For Java, JSP, and JavaBeans can we find something that can help us automate certain tasks?
    For example, CASE tools is an acronym for Computer Aided Software Engineering tools. I have a colleague use software to generate robust code for the database layer and with a few clicks of a button after the database is designed he can generate code that would otherwise take an hour or even hours to write and debug and test.
    Thanks for your time and help in advance!
    Cecilia

    The ones I know are MVCase (from Brazil) and Jude (from Japan). Both are free and I haven't fully tested them yet. It may help you.

  • Was asked to install Oracle Java 8 and now after LibreOffice asked for Apple Java 6

    Hello,
    a few weeks ago I was told by a webpage I need java, it was a movie site, so I was doubting it and so I went to the oracle page via google search and found Java 8 (jre 8u40-macosx-x64).
    Today I installed LibreOffice and after first opening ittold me, that I need Java 6 and asked, if I want to search for it. I let it search. There was not the usual browser window -like thing (which I guess is the App-store, where I am offered to upgrade to 10.10 for free and told that there are 4 incompatible updates for iLife products available). Instead it was just a small progress-bar window that had the title "apple software update" (or similar).
    I then quit it, because it was not making progress.
    Now I close LibreOffice and then thought "well lets install Java 6", but this time I was not asked to install it. Also "apple software update" doesn't offer it, when I launch the blue "A"-icon (i.e. Appstore?).
    What do I need? Should I delete Java 8? How do I get Java 6?
    I found this, but it doesn't help me: http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-preferences.html and Apple Java Vs Oracle Java? Do I need both?
    THANKS!!!
    Machine: Mac Mini 2012, 10.9.5

    Thank you! In the meantime I found that item labeled as "2014-001" on the apple.support page.
    It mentions that it will remove all Java web applet and that there was a certain button one has to push to install it. I don't find the button "missing plugin" (well maybe that will come once it is needed?)
    Can Apple J6 and Oracle J8 coexist?
    From the fact that apple's J misses the web applet, I guess they will complement each other right?
    Also, am I right, that, if I go to Safari/Firefox -> Security I can disable Java for web stuff (but it will be still intact for Java applications like LibreOffice) and once I will encounter a webpage that wants Java, I will be told and can activate it in Safari/Firefox -> Security ? (Since I guess it is better to disable Java on the web???)
    Will the web sites always tell me, if they need Java or will pages not work and I will wonder why?

  • Java app and flex charting

    I am in the process of making a flex charting application
    that receives data from a java applet. I've made the
    flex-javascript connection using the FABridge but when Flex adds
    the data to the chart it jumps around. In the following link is the
    app running to show you it, I have allowed the source to be viewed
    as well.
    Has anyone had this problem before? Or can see a solution?
    This jumping around doesn't just affect the chart, if I add
    another element not even within the chart area, but somewhere else
    in the application it moves around too.
    Thanks

    Hi,
    I apologize for delayed response. Yes, in general you can move Java EE applications to Oracle Java Cloud Service and move the corresponding data to Oracle Database Cloud Service. But you need to make sure that your application fits the surface area exposed by Java Cloud Service. You can check that in couple of ways: (1) when you try to deploy your application in our cloud, it will run a whitelist process that will indicate if you are using features/APIs that are currently unavailable in the cloud. Your can run the whitelist offline using the Java Cloud Service SDK. The SDK zip has a help file that explains how to run the whitelist. (2) You can read the chapter in our documentation that explains what is available in Java Cloud Service today. Here is the link http://docs.oracle.com/cloud/CSJSU/feat_implement.htm#CSJSU7149
    Once you determine that your application can fit within the surface area of the Java Cloud Service, you can deploy it. You can move you data as explained here -- http://docs.oracle.com/cloud/CSDBU/develop.htm#CSDBU204
    Hope that helps.
    Thanks,
    -AnandK.

  • Are Oracle Java Serlet and JSP samples working in Oracle9i?

    Oracle web site provides many good Servlet and JSP samples. All
    the instructions talk about Oracle8i. Does anybody know for sure
    they are working under Oracle9i or not?
    Thanks!
    H.

    OTN has sample applications that demonstrate a range of JSP techniques, from basic to advanced. OTN provides two versions of the samples: one version is built to the Servlet 2.0 specification and runs under Oracle9iAS-JServ or JDeveloper, the other verion is built to the Servlet 2.2 specification and runs under the Oracle Servlet Engine (OSE) built into the Oracle8i database or the mod_ose module of Oracle9iAS.
    Regards,
    -rh

  • I have a new ipod classic and i can't get any of my music to download to my ipod this is the second ipod classic they sent me and i have the same problem i think this product is a piece of **** and i want back my $300.00.

    I can't download any music from my cd's or my computer manually this is the second ipod  classic apple sent to me and i have the same problem i am thinking about asking apple for my $319.00 back i am fedup.

    Winston,
    If you provide a little more detail about whats happening when you try add music to your iPod instead of ranting about how much your iPod *****, somebody here may be able to offer you some much need assistance. 
    Totally up to you though.
    B-rock

  • Possible to have Oracle Java 6 and 7 installed?

    I installed jre/jdk from the AUR when installing Arch last week and am now wanting to install Java 6 as well.  Can this be done and, if so, how?
    Thanks,
    Lee

    Check out jre6-compat package in AUR.
    And just FYI, you can install any package to any specific location in arch. This requires a little manual work, of course.
    One have to edit PKGBUILD and install scripts replacing paths with desired locations and to remove conflicts/provides declaration from PKGBUILD if necessary.

  • A user on our network has lost the ability to sync with microsoft Exchange. She updated to OS 4.3.5 on Monday, and this morning her sync stopped working, and I am no longer able to connect her to our Exchange server. Any available solutions?

    I am running Windows Server 2003, and Exchange 2003. The user has had no previous problems with connections, until her OS update.

    Same exact thing with me.  And no help from apple.  Just dropped nearly $600 and cannot get a decent working setup.
    Apple's only suggestion was to uninstall iTunes and Quicktime, and re-install... of course (the I.T. Crowd tactic).
    The crash happens only on iTunes store access.

  • Getting remote messaging to work with Java/Spring and Flex

    I am trying to get remote messaging working on a Flex client with a Java/Spring backend.
    I have the channel is setup on the server as such:

    channel-definition id="long-polling-channel"
    class="mx.messaging.channels.AMFChannel">
    <endpoint
    url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling"
    class="flex.messaging.endpoints.AMFEndpoint" />
    <properties>
    <!-- Values for near-real time messaging -->
    <polling-enabled>true</polling-enabled>
    <polling-interval-millis>0</polling-interval-millis>
    <wait-interval-millis>-1</wait-interval-millis>
    <max-waiting-poll-requests>
    10
    </max-waiting-poll-requests>
    </properties>
    </channel-definition>
    In the Spring context, I am setting up the MessageBroker, MessageTemplate, and some custom wrapper code:
    <? 
    xml version="1.0" encoding="UTF-8"?>< 
    beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:flex="http://www.springframework.org/schema/flex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/flex
    http://www.springframework.org/schema/flex/spring-flex-1.0.xsd" >
    <flex:message-broker id="messageServiceBroker" />
    <flex:message-destination id="event-bus"
    message-broker="messageServiceBroker" channels="long-polling-channel"
    message-time-to-live="1000"
    subscription-timeout-minutes="5"
    throttle-inbound-max-frequency="500" throttle-inbound-policy="ERROR"
    throttle-outbound-max-frequency="500" throttle-outbound-policy="IGNORE" />
    <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate">
    <property name="defaultDestination" value="event-bus" />
    <property name="messageBroker" ref="messageServiceBroker" />
    </bean>
    <bean id="MessagingServices" class="com.bofa.esm.utility.messaging.MessagingServices">
    <property name="messageTemplate" ref="defaultMessageTemplate" />
    <property name="destinationName" value="event-bus" />
    <property name="scheduler" ref="PersistentQuartzScheduler" />
    </bean></ 
    beans>
    The custom wrapper code is insignificant, but it basically creates a thread and posts a custom context over and over every minute.  The actual message is posted with this bit of code:
         messageTemplate.send(msgCtx);
    On the Flex side, I create a Channel and ChannelSet like thus:
    public  
    static function getMessageChannelSet():ChannelSet{ 
    if(messageChannelSet == null){messageChannelSet =
    new ChannelSet();
    //e.g. 'http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling';
    var messageURL:String = getBaseUrl() + MESSAGE_URL; 
    var channel:AMFChannel = new AMFChannel(MESSAGE_CHANNEL_NAME,messageURL);messageChannelSet.addChannel(channel);
    return channelSet;}
    And then, latter I create a Consumer and add the channelset to it:
    var  
    _messageConsumer:Consumer = new Consumer(); 
    var msgChannel:ChannelSet = RemotingUtility.getMessageChannelSet();
    var encrypted:Object = this.encrypt(_sessionModel.username, _sessionModel.password); 
    var token:AsyncToken = msgChannel.login(encrypted.userId, encrypted.password); 
    _messageConsumer.channelSet = msgChannel;
    _messageConsumer.destination =
    "event-bus";_messageConsumer.addEventListener(MessageEvent.RESULT,
    this.onMessage);
    The problem is, I dont get the messages from the server.  In fact, from what I can tell by the logs when I post a message from the server, it doesn't appear that anything is listening to the channel:
    09:32:03,106 INFO [MessagingServices] Posting message...
    09:32:08,184 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    09:32:08,200 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    09:32:08,200 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    to subscribed clientIds: []
    09:32:08,200 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3211B4-F80E-15FE-076C-00C963ED5D01
    timestamp = 1278595928184
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@159a771
    to subscribed clientIds: []
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:08,200 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:12,075 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    09:32:12,075 INFO [STDOUT] [BlazeDS]Before invoke service: message-service
    incomingMessage: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 0
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    09:32:12,075 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    to subscribed clientIds: []
    09:32:12,075 INFO [STDOUT] [BlazeDS]Sending message: Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = CC2B0D5D-B00A-CD8B-CE43-0430C8CC10DF
    correlationId = null
    destination = event-bus
    messageId = CC3236D0-7B0D-182C-5632-C84FB4D1E215
    timestamp = 1278595932075
    timeToLive = 1000
    body = com.bofa.esm.utility.messaging.SimpleMessageContext@1a6595b
    to subscribed clientIds: []
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service; execution time = 0ms
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    09:32:12,075 INFO [STDOUT] [BlazeDS]After invoke service: message-service
    reply: null
    Shouldn't the "subscribed clientIds: []" have something listed as subscribed?  What am I missing?

    I made some modifications to the code section that registers the Consumer:
      Alert.show(
    "onRegister running","AppShellMediator",Alert.OK); 
      var _messageConsumer:Consumer = new Consumer(); 
      var msgChannel:ChannelSet = RemotingUtility.getMessageChannelSet();  _messageConsumer.channelSet = msgChannel;
      _messageConsumer.destination =
    "event-bus";  _messageConsumer.addEventListener(MessageEvent.RESULT,
    this.onMessage);  _messageConsumer.subscribe(
    "MessagingClient"+Math.random()); 
    if(_messageConsumer.connected)      Alert.show(
    "Message Channel is connected","AppShellMediator",Alert.OK); 
      if(_messageConsumer.authenticated)      Alert.show(
    "Message Channel is authenticated","AppShellMediator",Alert.OK); 
      if(_messageConsumer.subscribed)      Alert.show(
    "Message Channel is subscribed, clientId: "+_messageConsumer.clientId,"AppShellMediator",Alert.OK);
    I am now calling the subscribe method, then testing to see if the consumer is connected, authorized, and subscribed.  The first two return True, the last one does not.  So, despite the call to subscribe(), the Consumer is not subscribed.  Is there a way to figure out why?  Possibly there was an error somewhere?

  • Java Webservice and Flex

    Hello All,
    I am stuck at getting webservice result from flex. I have
    created a webservice which has following method:
    @WebMethod
    public String Login(@WebParam(name = "userID") String
    userID, @WebParam(name = "password") String password) {
    // TODO Store privilege and user ID in session
    String privilege =
    UserManager.getInstance().validateUserLoginInfo(userID,password);
    return privilege;
    I was getting correct response from this service(as object
    format) untill I defined
    @WebResult(name="userPrivilege") in the method. after that I
    am getting null if I defined Web service defination in flex MXML as
    follows:
    <mx:WebService id="wsLogin"
    service="NMSMainServiceService" port="NMSMainServicePort"
    wsdl="
    http://localhost:8080/NMS/NMSMainService?wsdl"
    >
    <mx:operation name="Login"
    result="loginResultHandler(event)"
    fault="loginFaultHandler(event)">
    <mx:request>
    <userID>{userID.text}</userID>
    <password>{password.text}</password>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    I don't know any reason, then if I define resultFormat="xml"
    or "e4x" I do get response by event.result however I can not access
    a node in the response array or xml.
    private function loginResultHandler(event:ResultEvent):void{
    //var myXML:Array = event.result as Array;
    var can:String = event.result.LoginResponse.userPrivilege;
    Alert.show(can);
    is giving me error saying : A term is undefined. When I
    checked response in log file it is :
    <ns2:LoginResponse xmlns:ns2="
    http://service.nms.satpath.com/"
    xmlns:S="
    http://schemas.xmlsoap.org/soap/envelope/">
    <userPrivilege>manager</userPrivilege>
    </ns2:LoginResponse>
    I have created namespace too
    private var ns2:Namespace = new Namespace("
    http://service.nms.satpath.com/");
    private var S:Namespace = new Namespace("
    http://schemas.xmlsoap.org/soap/envelope/");
    but no luck.
    I would really appreciate if somone could help me this,
    please do let me know if you need any more information. Please
    help, its urgent.
    Thanks.

    Thanks for your response Sujit, however in this case I can
    not store complex results like this:
    <S:Envelope xmlns:S="
    http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns2:GetUsersResponse xmlns:ns2="urn:satpath/service">
    <users>
    <active>No</active>
    <address>----</address>
    <createdBy>----</createdBy>
    <department>----</department>
    <email>----</email>
    <loginID>admin</loginID>
    <phone>----</phone>
    <privilege>Manager</privilege>
    <superVisor>----</superVisor>
    <userName>----</userName>
    </users>
    <users>
    <active>No</active>
    <address>----</address>
    <createdBy>----</createdBy>
    <department>----</department>
    <email>----</email>
    <loginID>meena</loginID>
    <phone>----</phone>
    <privilege>Network Operator</privilege>
    <superVisor>----</superVisor>
    <userName>----</userName>
    </users>
    </ns2:GetUsersResponse>
    </S:Body>
    </S:Envelope>
    Actually I have a data grid in which I am displaying results
    obtained by web service, result is a bean which has all the details
    related to a user in the system like userName, loginID, Address,
    phone etc. I am getting all the result and displaying them by
    <mx:Datagrid dataprovider="myService.myOperation.lastResult"
    > and its working fine.
    Now I want to display 3 columns (user name, log in id and
    user privilege) when I click on one row I want to use states and
    transictions so that I can display user deatils (all other
    information obtained from the web service) for that I have to store
    the result somewhere possibly in a bean so that I can fetch it in
    the changed state( which is user detail) based on user has selected
    which row.
    I don't know how can I store the result in the bean at flex
    side, if I declare resultFormat as object I am unable to typecast
    it in some collection, if I take xml as result format soap headers
    are creating problem. Or should I follow some other approach?
    Please help its really urgent.
    Thanks for all the help & support.

  • Oracle Java 7 in 32bit chroot

    Is anyone able to launch java applets using Oracle Java 7 and Firefox in a 32bit chroot environment?
    Whenever I browse to any site which opens a Java applet I instantly get the following exception:
    java.lang.NullPointerException
        at java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:119)
        at java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
        at java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:202)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:241)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:220)
        at sun.plugin2.jvm.JVMLauncher.start(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.start(Unknown Source)
        at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)
    Exception in thread "main" java.lang.NullPointerException
        at java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:119)
        at java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
        at java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:202)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:241)
        at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:220)
        at sun.plugin2.jvm.JVMLauncher.start(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.startImpl(Unknown Source)
        at sun.plugin2.main.server.JVMInstance.start(Unknown Source)
        at sun.plugin2.main.server.JVMManager.getOrCreateBestJVMInstance(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startAppletImpl(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.JVMManager.startApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.maybeStartApplet(Unknown Source)
        at sun.plugin2.main.server.MozillaPlugin.setWindow(Unknown Source)
    I have installed jdk from AUR. I have my 32bit chroot environment set up exactly at described on the wiki.
    This error only happens when I set LD_LIBRARY_PATH=/opt/java/jre/lib/i386 before launching Firefox. But without this, the libraries aren't found. For example, in the Java console I see errors like:
    libjawt.so. No such file or directory
    I've spent ages searching but I can't find a solution.

    Download the tar.gz installer and untar it to a location like /opt.
    Once you untar the archive, add the bin directory to your PATH variable and your should be all set to use it from the terminal.
    OR use sudo update-alternatives to set the java command to pick up your installed version.

  • Problem with JSP and Java Servlet Web Application....

    Hi every body....
    I av developed a web based application with java (jsp and Java Servlets)....
    that was working fine on Lane and Local Host....
    But when i upload on internet with unix package my servlets and Java Beans are not working .....
    also not access database which i developed on My Sql....
    M using cpanel support on web server
    Plz gave me solution...
    Thanx looking forward Adnan

    You need to elaborate "not working" in developer's perspective instead of in user's perspective.

  • I think I've got a memory leak and could use some advice

    We've got ourselves a sick server/application and I'd like to gather a little community advice if I may. I believe the evidence supports a memory leak in my application somewhere and would love to hear a second opinion and/or suggestions.
    The issue has been that used memory (as seen by FusionReactor) will climb up to about 90%+ and then the service will start to queue requests and eventually stop processing them all together. A service restart will bring everything back up again and it could run for 2 days or 2 hours before the issue repeats itself. Due to the inconsistant up time, I can't be sure that it's not some trouble bit of code that runs only occasionally or if it's something that's a core part of the application. My current plan is to review the heap graph on the "sick" server and look for sudden jumps in memory usage then review the IIS logs for requests at those times to try and establish a pattern. If anyone has some better suggestions though, I'm all ears! The following are some facts about this situation that may be usefull.
    The "sick" server:
    - CF 9.0.1.274733 Standard
    - FusionReactor 4.0.9
    - Win2k8 Web R2 (IIS7.5)
    - Dual Xeon 2.8GHz CPUs
    - 4GB RAM
    JVM Config (same on "sick" and "good" servers):
    - Initial and Max heap: 1536
    -server -Xss10m -Dsun.io.useCanonCaches=false -XX:PermSize=192m  -XX:MaxPermSize=256m -XX:+UseParNewGC -Xincgc -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.dotnet.disableautoconversion=true
    What I believe a "healthy" server graph should look like (from "good" server):
    And the "sick" server graph looks like this:

    @AmericanWebDesign, I would concur with BKBK (in his subsequent reply) that a more reasonable explanation for what you’re seeing (in the growth of heap) is something using and holding memory, which is not unusual for the shared variables scopes: session, application, and/or server. And the most common is sessions.
    If that’s enough to get you going, great. But I suspect most people need a little more info. If this matter were easy and straightforward, it could be solved in a tweet, but it’s not, so it can’t.
    Following are some more thoughts, addressing some of your concerns and hopefully pointing you in some new directions to find resolution. (I help people do it all the time, so the good news is that it can be done, and answers are out there for you.)
    Tracking Session Counts
    First, as for the observation we’re making about the potential impact of sessions, you may be inclined to say “but I don’t put that much in the session scope”. The real question to start with, though, is “how many sessions do you have”, especially when memory use is high like that (which may be different than how many you have right now). I’ve helped many people solve such problems when we found they had tens or hundreds of thousands of sessions.  How can you tell?
    a) Well, if you were on CF Enterprise, you could look at the Server Monitor. But since you’re not, you have a couple of choices.
    b) First, any CF shop could use a free tool called ServerStats, from Mark Lynch, which uses the undocumented servicefactory objects in CF to report a count of sessions, overall and per application, within an instance. Get it here: http://www.learnosity.com/techblog/index.cfm/2006/11/9/Hacking-CFMX--pulling-it-all-togeth er-serverStats . You just drop the files (within the zip) into a web-accessible directory and run the one CFM page to get the answer instantly.
    c) Since you mention using FusionReactor 4.0.9, here’s another option: those using FR 4 (or 4.5, a free update for you since you’re on FR 4) can use its available (but separately installed) FusionReactor Extensions for CF, a free plugin (for FR, at http://www.fusion-reactor.com/fr/plugins/frec.cfm). It causes FR to grab that session count (among many other really useful things about CF) to log it every 5 seconds, which can be amazingly helpful. And yes, FREC can grab that info whether one is on CF Standard or Enterprise.
    And let’s say you find you do have tens of thousands of sessions (or more). You may wonder, “how does that happen?“ The most common explanation is spiders and bots hitting your site (from legit or unexpected search engines and others). Some of these visit your site perhaps daily to gather up the content of all the pages of your site, crawling through every page. Each such page hit will create a new session. For more on why and how (and some mitigation), see:
    http://www.carehart.org/blog/client/index.cfm/2006/10/4/bots_and_spiders_and_poor_CF_perfo rmance
    About “high memory”
    All that said, I’d not necessarily conclude so readily that your “bad” memory graph is “bad”. It could just be “different”.
    Indeed, you say you plan to “look for sudden jumps in memory usage“, but if you look at your “bad” graph, it simply builds very slowly. I’d think this supports the notion that BKBK and I are asserting: that this is not some one request that “goes crazy” and uses lots of memory, but instead is the “death by a thousand cuts” as memory use builds slowly.  Even then, I’d not jump at a concern that “memory was high”.
    What really matters, when memory is “high” is whether you (or the JVM) can do a GC (garbage collection) to recover some (or perhaps much) of that “high, used memory”. Because it’s possible that while it “was” in use in the past (as the graph shows), it might no longer be “in use” at the moment . 
    Since you have FR, you can use its “System Metrics page” to do a GC, using the trash can in the top left corner of the top right-most memory graph. (Those with the CFSM can do a GC on its “Memory Usage Summary” page, and SeeFusion users can do it on its front page.)
    If you do a GC, and memory drops q lot, then you had memory that “had been” but no longer ”still was” in use, and so the high memory shown was not a problem. And the JVM can sometimes be lazy (because it’s busy) about getting to doing a GC, so this is not that unusual. (That said, I see you have added the Xincgc arg to your JVM. Do you realize that tells the JVM not to do incremental GCs? Do you really want that? I understand that people trade jvm args like baseball cards, trying to solve problems for each other, but I’d argue that’s not the place to start. In fact, rarely do I find myself that any new JVM args are needed to solve most problems.)
    (Speaking of which, why did you set the – xss value? And do you know if you were raising or lowering it form the default?)
    Are you really getting “outofmemory” errors?
    But certainly, if you do hit a problem where (as you say) you find requests hanging, etc., then you will want to get to the bottom of that. And if indeed you are getting “outofmemory” problems, you need to solve those. To confirm if that’s the case, you’ll really want to look at the CF logs (specifically the console or “out” logs). For more on finding those logs, as well as a general discussion of memory issues  (understanding/resolving them), see:
    http://www.carehart.org/blog/client/index.cfm/2010/11/3/when_memory_problems_arent_what_th ey_seem_part_1
    This is the first of a planned series of blog entries (which I’ve not yet finished) on memory issues which you may find additionally helpful.
    But I’ll note that you could have other explanations for “hanging requests” which may not necessarily be related to memory.
    Are you really getting “queued” requests?
    You also say that “the service will start to queue requests and eventually stop processing them all together”. I’m curious: do you really mean “queuing”, in the sense of watching something in CF that tells you that? You can find a count of queued requests, with tools like CFSTAT, jrun metrics, the CF Server Monitor, or again FREC. Are you seeing one of those? Or do you just mean that you find that requests no longer run?
    I address matters related to requests hanging and some ways to address them in another entries:
    http://www.carehart.org/blog/client/index.cfm/2010/10/15/Lies_damned_lies_and_CF_timeouts
    http://www.carehart.org/blog/client/index.cfm/2009/6/24/easier_thread_dumps
    Other server differences
    You presented us a discussion of two servers, but you’ve left us in the dark on potential differences between them. First, you showed the specs for the “sick” server, but not the “good” one. Should we assume perhaps you mean that they are identical, like you said the JVM.config is?
    Also, is there any difference in the pattern of traffic (and/or the sites themselves) on the two servers? If they differ, then that could be where the explanation lies. Perhaps the sites on one are more inclined to be visited often by search engine spiders and bots (if they sites are more popular or just have become well known to search engines). There are still other potential differences that could explain things, but these are all enough to hopefully get you started.
    I do hope that this is helpful. I know it’s a lot to take in. Again, if it was easier to understand and explain, there wouldn’t be so much confusion. I do realize that many don’t like to read long emails (let alone write them), which only exacerbates the problem. Since all I do each day is help people resolve such problems (as an independent consultant, more at carehart.org/consulting), I like to share this info when I can (and when I have time to elaborate like this), especially when I think it may help someone facing these (very common) challenges.
    Let us know if it helps or raises more questions. :-)
    /charlie

  • How to send object arraylist from servlet to jsp and display using jstl

    Hi All....
    I have a simple application and problem with it.
    Once user logged in to system the user will redirect to LoginServlet.java controller.
    Then in LoginServlet I want to redirect user to another page called book_details.jsp.
    this is my login servlet.
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              PrintWriter out = response.getWriter();
              ArrayList<BankAccountDTO> account_list = new ArrayList();
              ResultSet resultSet = null;
              LowFairAirDB airDB = null;
              try{
                   airDB = new LowFairAirDB();
                   String query = "SELECT account_id, type, description, balance, credit_line, begin_balance, begin_balance_time_stamp FROM bank_account";
                   airDB.sqlSelect(query);
                   resultSet = airDB.getResultSet();
                   while(resultSet.next()){
                        account_list.add(new BankAccountDTO(resultSet.getInt(1),
                                                                     resultSet.getInt(4),
                                                                     resultSet.getInt(5),
                                                                     resultSet.getInt(6),
                                                                     resultSet.getString(2),
                                                                     resultSet.getString(3),
                                                                     resultSet.getString(7)));
              }catch(Exception ex){
              }finally{
                   try{resultSet.close();}catch(Exception ex){}
                   airDB.sqlClose();
         }I set bank account values to BankAccountDTO.java objects and add them to the arrayList.
    Next I want to send this objects arrayList to books_details.jsp and wanna display each objects values using JSTL.
    I still finding a way to go through this.
    1. Can anyone say how can I do it?
    2. Is there any other method to do the same thing without using JSTL?
    thanks in advance,
    Dil.

    Naishe wrote:
    In your servlet,
    request.setAttribute("account_list", account_list);
    requestDispatcher.findForward("/your/display/jsp");
    Good. I would only follow the Java naming conventions. E.g. accountList or accounts instead of the ugly PHP/C conventions.
    In the JSP,
    lst = (List< BankAccountDTO >)request.setAttribute("account_list");
    for(BankAccountDTO b: lst){
    populate your HTML tags or whatever
    Wrong. 1) You need getAttribute() and 2) you should not use scriptlets. Use JSTL c:forEach, e.g.<table>
        <c:forEach items="${accounts}" var="account">
            <tr>
                <td>${account.id}</td>
                <td>${account.type}</td>
                <td>${account.description}</td>
            </tr>
        </c:forEach>
    </table>To the topicstarter: for future JSP/JSTL related questions please use JSP/JSTL forum.
    Here it is: [http://forums.sun.com/forum.jspa?forumID=45].

Maybe you are looking for