JS Tree Browser

I am using a JS Tree Browser in my JSP page. It renders perfectly, but when I click a - to collapse a node with children, nothing happens. It seems to be wanting to invoke some javascript, but beyond that I cannot make out what is happening. Any ideas?

You need to prepare the query using the setWhereClauseParams(x) call, before you initialize your data web bean. Otherwise, if you call the methods after you initialize your web bean, the context has already been set and the error occurs.
You should insert another data web bean into your page somewhere at the top and use it to setup your query and create a view object. You should remove this bean's Render() method since you are only interested in the Initialize() method here. Add your code to prepare the query and create the view object.
Then when your JS Tree Browser executes, it will be able to call getRowSet() on the View Object you created already.

Similar Messages

  • Announcement of JNDI Tree Browser

    Announcing the Java Naming and Directory Interface[tm] (JNDI) Tree Browser, which can be used to view the objects that are bound to the JNDI tree of a Sun[tm] ONE Application Server instance.
    That way, you can verify the resource names before adding them to the lookup code and thus minimize programming errors.
    The JNDI Tree browser can be found at
    http://sunonedev.sun.com/building/tech_articles/jnditree_ug.html

    I did not find some click-able things in your instruction. But I figured out.
    There should not be "index.html" in the url. It should be:
    http://localhost:81/jnditree/jndiTree
    Your should mention the default port number.
    It seems that when you call:
    NamingEnumeration namingenumeration = initialcontext.listBindings(s);
    you get different result if you call from servlet or from remote
    java application client. For example, remote java application
    client can not see the following:
    jdbc and sub-names.
    ducksbankpool
    MDB_CONTAINER_..... things
    Is it designed in that way or it is a bug, or somthing wrong
    is wrong on my side?
    Your jndi brower is a servlet (jsp). How can I get above
    jndi names from remote client?

  • JS Tree Browser - JSP

    I have inserted a JS Tree Browser Data Web Bean in a JSP page but it doesnot works!! This is the result:
    "Rowset must be self-referential and ViewLink accessor must be defined"
    ... What should I do??...
    Thanks!!
    Johary Pirez.

    You need to prepare the query using the setWhereClauseParams(x) call, before you initialize your data web bean. Otherwise, if you call the methods after you initialize your web bean, the context has already been set and the error occurs.
    You should insert another data web bean into your page somewhere at the top and use it to setup your query and create a view object. You should remove this bean's Render() method since you are only interested in the Initialize() method here. Add your code to prepare the query and create the view object.
    Then when your JS Tree Browser executes, it will be able to call getRowSet() on the View Object you created already.

  • Tree-browser for TestStand Report?

    The HTML report format is very inconvenient for browsing a long sequence, especially one with lots of nested sub-sequence calls. There is an article detailing how you can modify the report text sequence to at least put links at the top to more of the failures. This is much better than the default, first-failure report, but it still doesn't seem to link to all of the leaf-node failures).
    This is crying for a tree-style browser (ala the Windows File Explorer) where failures on low-level leaf nodes are noted with colors or symbols on the parent-level containers. Clicking on containers exposes the lower level de
    tails....
    Has anyone seen or done something like this for TestStand?

    Try using this "expand.xsl" Stylesheet to see if it is that for which you are looking. Please give feedback for additional features, etc.
    Attachments:
    Expand.exe ‏54 KB

  • JTree File Browser

    I have this class to browse the contents of my default folder. However it displays the
    full path plus the folder & file. How would remove the path and retain the folder
    and file only ?
    import java.awt.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class Tree extends JPanel {
         static JTree tree;
         static Icon leafIcon;
         static Icon openIcon;
         static Icon closedIcon;
         static DefaultTreeCellRenderer render;
         public Tree() {
              super();
              setLayout(new GridLayout());
              final JScrollPane scrollPane = new JScrollPane();
              add(scrollPane);
           setSize(157, 311);
           DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root Label");
              root.add(new DefaultMutableTreeNode("Node Label"));
              File start = new File(System.getProperty("user.dir"));
              TreeModel model = new DefaultTreeModel(new CreateNode(start));
              tree = new JTree(model);
              tree.setCellRenderer(new NodeRenderer());
              tree.setShowsRootHandles(true);
              scrollPane.setViewportView(tree);
         public static void main(String args[]) {
              Tree browse = new Tree();
              JFrame frame = new JFrame("Sample . . .");
              frame.getContentPane().add(browse, BorderLayout.CENTER);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(300,300);
              frame.setLocationRelativeTo(null);
              frame.setVisible(true);
    class CreateNode extends DefaultMutableTreeNode {
        CreateNode(File dir){
            super(dir);
            fillChildren(dir);
        void fillChildren(File dir){
            String[] list = dir.list();
            if( list == null ){
                return;
            for(int i=0; i<list.length; ++i){
                File child = new File(dir, list);
    if(child.isDirectory()){
    add(new CreateNode(child));
    if(child.isFile()) {
    add(new CreateNode(child));
    class NodeRenderer extends DefaultTreeCellRenderer
    private Icon file1 = new ImageIcon("icons/File.gif");
    private Icon file2 = new ImageIcon("icons/Folder.gif");
    private Icon file3 = new ImageIcon("icons/Image.gif");
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean sel, boolean expanded, boolean leaf, int row,
    boolean hasFocus) {
    super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf,
    row, hasFocus);
    DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
    File file = (File) node.getUserObject();
    String name = file.getName();
    if (name.endsWith(".gif")) {
    setIcon(file3);
    } else if (file.isDirectory()) {
    setIcon(file2);
    } else {
    setIcon(file1);
    return this;
    public NodeRenderer() {
    super();

    In your node renderer:
          // This is what you have:
          DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
          File file = (File) node.getUserObject();
          String name = file.getName();
          // This is what you missed:
          setText(name);

  • 2.1 EA1 BIN$ tables appearing in tree broswer

    Hi all,
    I've upgraded to 2.1 from version 1.5.4. Everything seems to be going well but in some of my databases I am now seeing loads of BIN$ tables appearing in the tree browser, for example: BIN$/0LHlBHOQgayX35sjRi7mw==$0
    Has anyone else seen this or is there a way to get the tables to disappear?
    Cheers,
    Ian

    For performance issues, tables from the recycle bin are listed by default now (before they were excluded by code).
    To lose them, just apply the "Exclude recycle bin" filter (right-click the Tables node).
    Have fun,
    K.

  • An id3 tags converting quest

    Hi,
    The Zen Touch doesn't use a file-tree-browsing system, so one need proper id3 tags to make the player usable.
    I have a lot of music with no id3 tags (ripped from CDs, most of which I do not have), whhere it stays just Track for the name and album and artist and genre ist is just <unknown>. Could someone recommend a program (a freeware one) that could help me put id3 tags on my songs?
    thanx

    I believe that you have organized your "tag-less" MP3 files under proper dorectory names and filenames. If that is the case, then Creative MediaSource's Import Wizard can also help you to tag the MP3 files. Just view the PC Music Library of MediaSource. Click Import button.

  • Client Program accessing J2EE entity Bean

    I have trouble find my Course J2EE bean from a client. (The client
    runs on the same computer but a different VM from the bean.)
    In Glassfish (Sun Application Server Nine), I set up a simple
    Container-Managed Entity Bean. I tried to access it from an external
    client as described in the glassfish EJB
    FAQ https://glassfish.dev.java.net/javaee5/ejb/EJB-FAQ.html
    Here is the client program:
    package RS;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.xml.parsers.*;
    import org.apache.xml.serialize.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import RS.CourseHome;
    import RS.CoursePK;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import javax.rmi.*;
    import java.util.Properties;
    import Debug.*;
    public class Client {
    public static void main (String arg[]) throws IOException {
    try {
    InitialContext jndiContext = new InitialContext ();
    Debug.P("jndic ongtext" + jndiContext);
    Object o = jndiContext.lookup("RS.CourseHome");
    Debug.P("looked up object "+o + "|"+o.getClass().getName());
    RS.CourseHome home =
        (RS.CourseHome)PortableRemoteObject.narrow(o,RS.CourseHome.class);
    Debug.P("got home "+home);
    Course C = home.create(1);
    C.setName("blah");
    CoursePK PK = new CoursePK();
    PK.number=1;
    C = home.findByPrimaryKey(PK);
    Debug.P(C.getName());
    catch (java.rmi.RemoteException re) {Debug.P("Remote Exception" + re.getMessage());}
    catch (javax.naming.NamingException ne){Debug.P("Naming Exception"+ne.getMessage());}
    catch (javax.ejb.CreateException ce){Debug.P("Create Exception"+ce.getMessage());}
    catch (javax.ejb.FinderException fe){Debug.P("Finder Exception"+fe.getMessage());}
    }Here is the error message:
    Exception in thread "main" java.lang.ClassCastException
    at com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject.narrow
                       (PortableRemoteObject.java:294)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
      at RS.Client.main(Client.java:26)The debugging indicates that I got the Initial Context
    and got the object but the PortableObject.narrow failed:
    jndic ongtextjavax.naming.InitialContext@1d85f79
    looked up object IOR: (huge number deleted)
    com.sun.corba.ee.impl.corba.CORBAObjectImplEarlier, I tried the version below, but based on the suggestion by Mr. Ebbert
    in the forum started "Error When running the Client Program" by sree_devi,
    I checked
    the following. I went to "Jndi Tree Browsing" from the Administrative Console
    and I found a "RS.CourseHome" entry under "ejb" I found RS.CourseHome there
    but did not see the "Course" tghat I expected to see
    Thus, I tried the version above:
    package RS;
       --- imports deleted for conciseness
    import Debug.*;
    public class Client {
    public static void main (String arg[]) throws IOException {
    try {
    InitialContext jndiContext = new InitialContext ();
    Object o = jndiContext.lookup("Course");
    CourseHome home =
        (CourseHome)PortableRemoteObject.narrow(o,CourseHome.class);
    Course C = home.create(1);
    C.setName("blah");
    CoursePK PK = new CoursePK();
    PK.number=1;
    C = home.findByPrimaryKey(PK);
    Debug.P(C.getName());
    catch (java.rmi.RemoteException re) {Debug.P("Remote Exception" + re.getMessage());}
    catch (javax.naming.NamingException ne){Debug.P("Naming Exception"+ne.getMessage());}
    catch (javax.ejb.CreateException ce){Debug.P("Create Exception"+ce.getMessage());}
    catch (javax.ejb.FinderException fe){Debug.P("Finder Exception"+fe.getMessage());}
    }When I run it, I get the following Naming Exception: Course not found
    I confirmed at the administrative console, that I have "Course" listed
    under Enterprise Applications:
    As per the ejb FAQ, I set up my $CLASSPATH so it starts as follows:
    /opt/j2ee/SUNWappserver/lib/appserv-rt.jar:
    /opt/j2ee/SUNWappserver/lib/javaee.jar:I also verifed in my domain.xml that the orb-listener-1, the default
    naming service port was at 3700.
    Here is the info on the Bean that I have running for both of the tries
    at my Client code.
    ejb-jar.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
    version="2.1">
      <enterprise-beans>
        <entity>
           <description>Course</description>
           <display-name>CourseBean</display-name>
           <ejb-name>CourseBean</ejb-name>
           <home>RS.CourseHome</home>
           <remote>RS.Course</remote>
           <ejb-class>RS.CourseBean</ejb-class>
           <persistence-type>Container</persistence-type>
           <prim-key-class>RS.CoursePK</prim-key-class>
           <reentrant>false</reentrant>
           <abstract-schema-name>Course</abstract-schema-name>
           <cmp-field><field-name>number</field-name></cmp-field>
           <cmp-field><field-name>name</field-name></cmp-field>
        </entity>
      </enterprise-beans>
      <assembly-descriptor>
         <security-role>
            <description>Everyone</description>
           <role-name>everyone</role-name>
         </security-role>
         <method-permission>
            <unchecked/>
            <method>
               <ejb-name>CourseBean</ejb-name>
               <method-name>*</method-name>
            </method>
          </method-permission>
         <container-transaction>
            <method>
               <ejb-name>CourseBean</ejb-name>
               <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
         </container-transaction>
      </assembly-descriptor>
    </ejb-jar>
    Sun-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 EJB 2.1//EN"
    "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-1.dtd">
    <sun-ejb-jar>
      <enterprise-beans>
         <name>CourseBean</name>
         <ejb>
           <ejb-name>CourseBean</ejb-name>
           <jndi-name>Course</jndi-name>
         </ejb>
      <cmp-resource>
         <jndi-name>jdbc/__default</jndi-name>
         <create-tables-at-deploy>true</create-tables-at-deploy>
         <drop-tables-at-undeploy>true</drop-tables-at-undeploy>
      </cmp-resource>
      </enterprise-beans>
    </sun-ejb-jar>
    Course.java
    package RS;
    import java.rmi.RemoteException;
    public interface Course extends javax.ejb.EJBObject {
      public String getName() throws RemoteException;
      public void setName (String Str) throws RemoteException;
      public int getNumber() throws RemoteException;
      public void setNumber (int n) throws RemoteException;
    CourseHome.java
    package RS;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    public interface CourseHome extends javax.ejb.EJBHome {
    public Course create(int id) throws
    CreateException,RemoteException;
    public Course findByPrimaryKey(CoursePK pk)
    throws FinderException,RemoteException;
    CourseBean.java
    package RS;
    import javax.ejb.EntityContext;
    public abstract class CourseBean implements javax.ejb.EntityBean {
    public CoursePK ejbCreate (int number) throws javax.ejb.CreateException{
      this.setNumber(number);
      return null;
    public void ejbPostCreate (int number) {
    public abstract String getName();
    public abstract void setName (String str);
    public abstract int getNumber ();
    public abstract void setNumber (int number);
    public void setEntityContext (EntityContext ctx) {}
    public void unsetEntityContext() {}
    public void ejbActivate () {}
    public void ejbPassivate () {}
    public void ejbLoad () {}
    public void ejbStore () {}
    public void ejbRemove() {}
    }Laurence L. Leff, Ph.D. Associate Professor of Computer Science
    Western Illinois University, 1 University Circle 61455, Pager: 309 367 0787
    FAX 309 298 2302

    hi s-mcgowan,
    "some other processing" comprises of printing of debug lines and publishing to the message queue using JMS. I added more debug lines so that i could see whats really happening... here is the result
    myTableHome.create(...); <----------- no exception was thrown and it returned LocalMyTable object
    print out "Insert successful"
    print out "publishing message"
    ... publish message to message queue using JMS...
    print out "Publish done"
    ... after few milliseconds...
    java.sql.BatchUpdateException: Data exception -- row already exist in index PK_MYTABLE on table MYTABLE.
    From the exception it seems like its doing a batch insert. So that seems to explain why the java.sql.BatchUpdateException is thrown few milliseconds after my call to myTableHome.create(...);
    Is it possible to disable batch update / insert? how?
    thanks in advance,
    leigh

  • Double click event to source code

    hi all
    What im trying to do is when someone clicks one of the keywords in the tree browser file that it takes them to the source code window and to that method or variable the clicked. For exaple lets say have 2 windows, on the left side is just a list of methods and variables and ont he right hand is the window which u can see the source code. What i need is that when someone click on a method name on the left window, it will take them directly to that method name in the source file window (right window).
    public void mouseClicked(MouseEvent e)
    Any ideas what i need to do??
    Maybe it will help if i copy and paste the code of the [b]left window.
    import java.util.Observable;
    import antlr.collections.AST;
    import java.awt.Font;
    import java.awt.event.*;
    import java.awt.event.MouseEvent;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import javax.swing.border.TitledBorder;
    public class FileContentPanel extends ModulePanel {
        private ProgramModel model;
        private JTree contentTree;
        private APIViewer api;
        private SourceViewWindow view;
        private Formatter format;
        private FileTree tree;
        private JPopupMenu menu = new JPopupMenu();
        private JMenuItem viewmenu;
        /** Creates a new instance of FileContentWindow */
        public FileContentPanel(ProgramModel model, APIViewer a) {
            super(model, "File Contents");
            this.api = a;
            createPopupMenu();
            contentTree = new JTree() {
                public String getToolTipText(MouseEvent evt, ActionListener l) {
                    if (getRowForLocation(evt.getX(), evt.getY()) == -1)
                        return null;
                    TreePath curPath = getPathForLocation(evt.getX(), evt.getY());
                    DefaultMutableTreeNode highlighted = (DefaultMutableTreeNode)curPath.getLastPathComponent();
                    Object userOb = highlighted.getUserObject();
                    String ret=highlighted.getUserObject().toString();
                    if (userOb.getClass()==JavaMember.class)
                        ret=((JavaMember)userOb).getSignature();
                    else if (userOb.getClass()==JavaClass.class)
                        ret=((JavaClass)userOb).getSignature();
                    return ret;
            DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();
            ImageIcon file = new ImageIcon(Prototype.class.getResource("images/source.gif"));
            renderer.setLeafIcon(file);
            contentTree.addMouseListener(new PopupTrigger());
            contentTree.setCellRenderer(renderer);
            contentTree.setToolTipText("");
            contentTree.setFont(new Font("Arial", Font.PLAIN, 11));
        private void setTree(JavaFile f) {
            ((DefaultTreeModel)contentTree.getModel()).setRoot(f.buildTree());
            getScroller().getViewport().add(contentTree);
        public void update(Observable o, Object arg) {
            setTree((JavaFile)arg);
        public boolean canViewAPI(DefaultMutableTreeNode node) {
            return (!node.isRoot() && node.getParent().toString().equals("imports"));
        private void createPopupMenu() {
            Action viewAPI = new AbstractAction("View API") {
                public void actionPerformed(ActionEvent e) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode)contentTree.getSelectionPath().getLastPathComponent();
                    if (node != null)
                        api.viewAPI(node.toString());
            viewmenu = menu.add(viewAPI);
        class PopupTrigger extends MouseAdapter {
            public void mouseReleased(MouseEvent e) {
                maybeShowPopup(e);
            public void mousePressed(MouseEvent e) {
                maybeShowPopup(e);
                //tree.getTree();
               // System.out.println("U are nearly there");
             public void mouseClicked(MouseEvent e)
               System.out.println("jknxncnnxzv");
            private void maybeShowPopup(MouseEvent e) {
                if (e.isPopupTrigger() ) {
                    int x = e.getX();
                    int y = e.getY();
                    TreePath path = contentTree.getPathForLocation(x, y);
                    if (path == null)
                        return;
                    contentTree.setSelectionPath(path);
                    contentTree.scrollPathToVisible(path);
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
                    if (node != null) {
                        viewmenu.setEnabled(canViewAPI(node));
                    menu.show(contentTree, x, y);
    Cheers

    Does JavaClass contain the list of JavaMembers? If so, and if it is supposed to reflect the current state of the file that is open on the right hand side, then it should probably have methods to get the line and column number for the start of the contained JavaMembers. If you can figure out how to keep that in sync, you should be able to query it directly and set the cursor position.

  • How to access local connection factory created within Foreign Server in OSB

    Hi All
    I am facing an issue in my config plan. We have a RIB Foreign server with the following local connection factory:
    jms/RibAqJmsXATopicConnectionFactory
    I am using the below in my configuration plan:
    <cus:envValueAssignments>
    <xt:envValueType>Service URI</xt:envValueType>
    <xt:location xsi:nil="true"/>
    <xt:owner>
    <xt:type>ProxyService</xt:type>
    <xt:path>RLTPReturnToWarehouse/ProxyServices/ConsumeRIBRTWMessages</xt:path>
    </xt:owner>
    <xt:value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema">jms://localhost:7001/jms.RibAqJmsXATopicConnectionFactory/jms.etASNInFromRIBToWH1</xt:value>
    </cus:envValueAssignments>
    and i am getting the below error:
    [java]
    [java] Loading customization File ./dev/OSBCustomizationFile.xml
    [java] Customization applied to the created resources only []
    [java] com.bea.wli.config.customization.EnvValueCustomization@553c13
    [java] Unexpected error: com.bea.wli.sb.transports.TransportException
    [java] Problem invoking WLST - Traceback (innermost last):
    [java] File "D:\VFUKScripts\DeploymentScripts\osb\import.py", line 200, in ?
    [java] File "D:\VFUKScripts\DeploymentScripts\osb\import.py", line 122, in importToALSBDomain
    [java] com.bea.wli.sb.transports.TransportException: Failed to lookup connection factory jms.RibAqJmsXATopicConnectionFactory
    what am i missing here?

    [java] com.bea.wli.sb.transports.TransportException: Failed to lookup connection factory jms.RibAqJmsXATopicConnectionFactory
    Looks like the JNDI that you created for the ConnectionFactory is not reflected in the server.
    Login to WLS Console> Summary of Servers > server_name > View JNDI Tree
    Browse to the JNDI tree and see if your JNDI is visible there. If it is not then, please restart the server and recheck.
    Once you are able to find it in the JNDI tree, then execute the customization file.
    If you have modified the existing JNDI properties (that have a small exclamatory symbol) then any changes to those are not reflected till all the servers in the cluster are restarted.
    If it still does not work, then recreate a new Connection with a different name and then retry. It should work then.
    Thanks,
    Patrick

  • Help Connecting A Stateless Session Bean To MySQL Database

    Hi, I'm trying to connect a simple stateless session bean that has been
    deployed using the admin console to a MySQL database that has been
    set up and pinged using the JDBC Resources/Connection Pools part of the
    admin console.
    When I attempt to connect to the database using the session bean I get the
    following error message:
    Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: ; nested exception is:
         java.sql.SQLException: No database selected
         at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:161)
         at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:142)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source)
         at DBDynamicStub.testDatabase(_DB_DynamicStub.java)
         at DBClient.main(DBClient.java:9)
    Caused by: java.rmi.RemoteException: ; nested exception is:
         java.sql.SQLException: No database selected
         at com.sun.ejb.containers.InvocationHandlerUtil.throwRemoteException(InvocationHandlerUtil.java:96)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:141)
         at $Proxy26.testDatabase(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:123)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1569)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:951)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:181)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:721)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:469)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1258)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    Caused by: java.sql.SQLException: No database selected
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2379)
         at com.mysql.jdbc.Connection.execSQL(Connection.java:2306)
         at com.mysql.jdbc.Statement.executeQuery(Statement.java:1192)
         at DBBean.testDatabase(DBBean.java:45)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:153)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:950)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:158)
    Obviously this means that the bean can't connect to the database but I am
    unsure why this is. When I set up the database using the admin console
    I set the the jndi name to jdbc/test and I've tried using the following look up
    code to find the database that is referenced by the JNDI name:
    Context context = new javax.naming.InitialContext();
              DataSource ds = (DataSource) context.lookup("jdbc/test");
    and also
    Context context = new javax.naming.InitialContext();
    DataSource ds = (DataSource)context.lookup("java:comp/env/jdbc/test");
    Neither of these methods work.
    When I look at the JNDI Tree Browsing window which is available from the
    admin console there is no mention of the database at all, there are four
    items in the three, they are:
    UserTransaction
    ->jdbc
    ->ejb
    DBBean
    Do I need to add a JNDI reference somewhere in order for the bean to locate
    the database? I thought that when I created the database in the admin
    console and specified a JNDI name this would be all that's required in order
    for beans to locate the database, obviously not.
    If anyone can offer any advice at all I would be very very grateful.
    Ian

    stmt.execute("use YOUR_DATABASE_NAME");
    // then your db queries.This approach works for me.
    It also works to specify the database in the query like this:
    InitialContext initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    DataSource ds = (DataSource) envCtx.lookup("jdbc/myDB");
    Connection conn = ds.getConnection();
    try {
           Statement statement  = conn.createStatement();
           ResultSet rs = statement.executeQuery("select * from myDB.news");
           ...As you can see I added myDB. to the query.
    But why is this necessary?
    If I use DriverManager instead, this is NOT necessary. Like this:
    Connection connection = null;
    try {
           Class.forName("com.mysql.jdbc.Driver");
           connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/myDB", "username", "password");
           Statement statement = connection.createStatement();
           ResultSet rs = statement.executeQuery("select * from news");
           ...Why do I not have to run the query statement.execute("use YOUR_DATABASE_NAME"); or specify the database name in the query statement.executeQuery("select * from myDB.news"); when I use DriverManager to obtain a Connection when I have to do that when using a DataSource?
    It don't seem very efficient to have to run the extra query ( use db-name ) before I run any other query in my application.

  • How do I add a button for a custom task on the List Accounts page in 5.5

    I'm trying to add a button to the bottom of the List Accounts page that launches a custom task. I thought this would be easy - just modify UserActionsConfig. I've already added the task to context menus. The problem is there are only options to add buttons for the Find User results page and the context menus. Is there a missing attribute key that needs to be included? Is there a different config file that I need to modify? Any help would be appreciated.

    Sorry not possible in 5.x. You will have to use 6.0 and the new HTML based tree browser.
    WilfredS

  • JCO - Get meta data - Grey status in JCO connections tab

    Hi all,
    I read many post on this topics within this forum but I didn't succeed to get meta data required and to set correctly my connection.
    Let's start quickly to give you my conf
    In the j2ee admin
    -> Services > SLD Data Supplier > CIM Client Generation Settings
    I set fields with : SLD7000 / 50000 and my logon info
    Save and test -> result is ok !
    In my web dynpro application, I am able to get correct BAPI from BCE system using my logon info. And I map my view to display data from the corresponding BAPI called.
    So at this time, in my IDE, the connection to the SAP Backend system SAP works because I can get the list of BAPIs from the BCE SAP Backend System as well.
    Build and deploy my application.
    Now, let's go to webdynpro welcome page on my j2ee server : http://<host>:<port>/webdynpro/welcome
    -> content administration
    -> I select from the left tree browser my application, and open the "JCO Connections" Tab. I can see my connections previously I set in my webdynpro application. But I CAN'T use the button "Create" to configure new JCO connection. ??
    Last thing:
    in the BCE backend system
    transaction : RZ70
    I have, host = sldmain and service = sapgw47
    Also, in the list of data collection programs, everything is checked as active except the program "_SLD_RFC"
    I don't know if it is important....?
    Finally, I give you from the exception I got in my browser only lines "Caused by"....
    Caused by: com.sap.dictionary.runtime.DdException: TypeBroker failed to access SLD: Error while obtaining JCO connection.
    Caused by: com.sap.tc.webdynpro.services.sal.sl.api.WDSystemLandscapeException: Error while obtaining JCO connection.
    Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create J2EE cluster node in SLD for 'J2E.SystemHome.localhost': com.sap.lcr.api.cimclient.LcrException: CIM_ERR_NOT_FOUND: No such instance: SAP_J2EEEngineCluster.CreationClassName="SAP_J2EEEngineCluster",Name="J2E.SystemHome.localhost"
    Thanks a lot for your support and help,
    Best regards,
    Emmanuel.

    Hi Emmanuel
    You said
    " I select from the left tree browser my application, and open the "JCO Connections" Tab. I can see my connections previously I set in my webdynpro application. But I CAN'T use the button "Create" to configure new JCO connection. ??"
    What is their status ? Is it green on red? Usually create is greyed out if it is green.  What about Edit?
    Try creating a new Web Dynpro component with another destination name ,deploy and then check the Content administrator if these new destinations have Create enabled
    After running RZ70 did you check the Technical System in SLD administration to see if the technical details have been propogated ?
    Regards
    Pran

  • One Small Feature Request

    Well, I got the Add-In installed and working. Looks pretty good. One small feature request I have, that I have become accustom to doing from another tool that I use is that when editing a package, in the Oracle Explorer window, when you expand the Packages node, then expand the package you are working on, it shows a list of procedures and functions in that package. This is great. Now what would be really great is that if you could double click on one of these procedures or functions it would take you to that place in the code of the package body.
    So for example, let's say I have a package called Pkg_DoStuff. Pkg_DoStuff has three procedures, Foo1, Foo2, and Foo3. When I expand Pkg_DoStuff in the Oracle Explorer windows, I see nodes for Foo1, Foo2, and Foo3. Now, if I double click on Foo3, I would like the code window to place the cursor at the start of the Foo3 procedure in the package body.
    Thanks,
    Kevin

    Another feature request:
    Please add a Raptor feature to the Data Connections and allow users to apply filters to tree browsing. We use Oracle Apps 11i, and there must be about 50 thousand tables, views and packages that can potentially be visible. It usually takes several minutes for the Data Connections tree to respond when I bring up a list of tables even for a login with limited access. However, with the filter applied in raptor, I can browse very quickly to tables, views and packages that I need.
    Thank you.

  • JSP, View Object and ? parameter

    I have a view object that uses a ? type parameter in its query. The use ? type parameter checkbox has been marked in the view and the view compiles successfully.
    Now this view is being used by the Data Web bean JS Tree Browser in a JSP page.
    The JSP code
    <jsp:useBean class="oracle.jbo.html.databeans.JSTreeBrowser" id="roleMenuTree" scope="request" >
    <%
    roleMenuTree.setDepthLevel(6);
    roleMenuTree.setReleaseApplicationResources(false);
    roleMenuTree.setDisplayAttributes("Name");
    roleMenuTree.initialize(pageContext,"Tasksys_TasksysAppModule.MenuTreeView");
    Object x[] = new Object[1];
    x[0] = "tasksys";
    roleMenuTree.getRowSet().getViewObject().setWhereClauseParams(x);
    roleMenuTree.getRowSet().getViewObject().executeQuery();
    roleMenuTree.render();
    %>
    </jsp:useBean>
    But I end up getting the following error. WHY ?
    Error: 500
    Location: /tasksys/jsp/login_submit.jsp
    Internal Servlet Error:
    javax.servlet.ServletException: JBO-27122: SQL error during statement preparation. Statement: SELECT Menus.ID, Menus.NAME, Menus.DESCRIPTION, Menus.MODULE, Menus.MEN_ID FROM MENUS Menus WHERE menu_allowed(?, to_char(id)) = 'Yes'
    void org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
    void org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, org.apache.tomcat.core.Response)
    void org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apache.tomcat.service.TcpConnection, java.lang.Object[])
    void org.apache.tomcat.service.TcpWorkerThread.runIt(java.lang.Object[])
    void org.apache.tomcat.util.ThreadPool$ControlRunnable.run()
    void java.lang.Thread.run()
    null

    You need to prepare the query using the setWhereClauseParams(x) call, before you initialize your data web bean. Otherwise, if you call the methods after you initialize your web bean, the context has already been set and the error occurs.
    You should insert another data web bean into your page somewhere at the top and use it to setup your query and create a view object. You should remove this bean's Render() method since you are only interested in the Initialize() method here. Add your code to prepare the query and create the view object.
    Then when your JS Tree Browser executes, it will be able to call getRowSet() on the View Object you created already.

Maybe you are looking for

  • SOAP over HTTP/POST

    Hi everyone, I'd be eternally grateful if someone could provide me with a quick + easy solution to the following (basic?) task. I have a user form with the required parameters and a submit button. I have an XML schema which specifies the format for t

  • Re-installing Windows 7

    Hello I upgraded mt T420s to windows 8 and would like to recover it to factory win 7. The lenovo recovery drive still exists, but i can not get into recovery mode when i restart my computer! Any thoughts?

  • How to create and add an XML node at run time ?

    Hello and thanks to All of You i've been learning a lot since i use this forum.. I'm having another problem, !!! i would like that my executeShape function insert a new XMLChildnode called "adverts"  to my Pages:XML via the evenListener of the execut

  • New feature for autosuggest widget

    Hi Spry developers! I have implemented a new feature in autosuggest widget, and I ask you if you can add this feature in Spry 1.6 release... You can view my example here: Multiple Autosuggest Example You can choose a splitting string that reinitializ

  • GL account validations in MR41

    In MR44 when we post a document it prompts u an error messge if the GL account is blocked. This is not the case with MR41, it will create a document no even though the GL account is blocked. I want to put the same validation of MR44 for blocked GL ac