J2EE/JSP/EJB - ojvm debugging hangs

I'm using JDeveloper version 10.1.2.0.0 (build 1811) at following enviroment:
Server: Windows XP
Client: Windows XP
JAVA:1.4.2_04 that comes with Jdev
I have the following problem:
I have a project with *.jsp and *.java files when i try do debug a java file using
the ojvm he get's to the breakpoint then if try to the debug using step over/step into
the process hangs no exception and no coming back. If i use the others vm (hotspot, client or sever)
Jdev doesn't hang. The problem only occurs where debugging with ojvm.
When the debug process hangs no way to know what it's doing cause it's not
possible to pause (cliking the debugger pause button there's no reaction) just stopping de
process by cliking 2 times at the debug stop button.
I changed from Jdev 9.0.5.16.15 to Jdev 10.1.2.0.0 (build 1811) same problem.
Any help?

I see. A logger is software that catches the fallout and presents it to you.
Well, I'm slightly resistant because I can program this stuff OK, but I work from home .. there's no backup for me, no sysad to help. I've recently moved to Linux and I'm groping around it. So I fear a day or two of non-productive farting about trying to get a logger to work, and I could do without it.
Then again, it can take me a good while to debug something blind.
So. Any recommendation for a simple logger? Are they java or do they depend on the OS? Oh, and free/open source of course :-)
Or, if anyone could tell me how to get my printlns to work that would be good too :-)
J

Similar Messages

  • Remote debugging hang

    Have anyone enconter the remote debugging hang when debug using Jdeveloper with UCM? I got this happen sometimes in some enviroment. any solutions?
    Thanks

    Hi,
    Thanks for reminding me to check on this.
    Currently you can get to it in the data pane, but it isn't pretty.
    Expand "out: oracle.jsp.runtime.OracleJspWriter".
    The "buffer" field is what you are looking for. Unfortunately, you only see the first 100 characters as the value shown for a character array or String (it's prohibitively expensive to show more). To see more, you have to expand the array. However, when it is expanded, you only see one character per line, which is awful.
    Right click on "buffer: char[8192]..."
    Choose Adjust Range...
    Make the range as big as you think you've written but be careful as it will be slow if the range is really big. 0 to 1000 seems to work okay for me. You can also make the range start in the middle, like 1000 to 2000.
    The default range is 0 to 100.
    Expand "buffer: char[8192]..."
    You can also add a watch (main menu -> Run -> Add Watch... or Ctrl+F5)
    "out.buffer" so you don't have to find the "out" and "buffer" items. You still have to do the Adjust Range part.
    I'll work on making this easier in JDev 5.0.
    Thanks,
    Liz
    null

  • J2EE Architecture (EJB)

    I have become increasing disillusioned with J2EE and EJB�s in particular. I am no longer sure what they are trying to achieve and how the �objectives� are implemented. Writing the simplest EJB by hand is time consuming. Using something like XDocolet produces mountains of �Pseudo-Code� in comment blocks. The very idea of using comments in code to write code seems perverse to me. Surely comments are for comments and code is for code. After all this what is generated? The simplest of SQL statements. What are the benefits ? More efficient code ? More robust code ? Easier to maintain code ? More portable code ?
    Would somebody care to point out what I am missing ?

    Excellent thoughts, Annie, as usual.
    Performance and learning curve seem to be the biggest complaints about J2EE and EJBs.
    I think stateless session and message beans are winners. Entity beans are the red-headed stepchildren: nobody seems to like them much, even with local interfaces. There is so much disagreement about how to handle persistence in Java (e.g., raw JDBC, JDO, O/R mapping, CMP, etc.) that how to "best" handle it is still open to question.
    I'm not aware of the same level of thrashing in the .NET community. (I'm not aware of much in the .NET community.) How have they solved the O/R impedence mismatch to everyone's satisfaction?
    Scott Ambler wrote some terrific papers about O/R mapping. I'll have to go back and re-read them to see if I can figure out which of the competing persistence technologies best address the problem.
    The whole point of J2EE and its containers, IMO, is that the smart developers who write the container relive mere mortal programmers like me from writing a lot of difficult plumbing. The container worries about threading, transactions, persistence, clustering, security, and all sorts of other things that I'd have to write a lot of code to reproduce without it. (Or worse, just leave it out and hope for the best.) I think that's still a worthy thing to do. The trick is to take as much advantage of the container as you can without distorting your application's design or compromising its performance.
    EJB 3.0 is debating this again. POJOs sound like they'll be much more prominent. It'll be interesting to see where this goes.
    Personally, I'm astonished at how complex entity beans and persistence are in J2EE. Entity beans map to database rows, but that's not a good match for the set-like SQL and relational databases. Remote entity beans are a disaster: Do I really need a remote call for each and every field? Local interfaces help, but we still need the Session Facade Pattern, DTOs, all kinds of machinery just to get a bloody value out of a database and into a JSP. How much layering is too much?
    %

  • How to upload a file into server using j2ee jsp and servlet with bean?

    How to upload a file into server using j2ee jsp and servlet with bean? Please give me the reference or url about how to do that. If related to struts is more suitable.
    Anyone help me please!

    u don't need j2ee and struts to do file uploading. An example is as such
    in JSP. u use the <input> file tag like
    <input type="file"....>You need a bean to capture the file contents like
    class FileUploadObj {
        private FormFile srcFile;
        private byte[] fileContent;
        // all the getter and setter methods
    }Then in the servlet, you process the file for uploading
        * The following loads the uploaded binary data into a byte Array.
        FileUploadObj form = new FileUploadObj();
        byte[] byteArr = null;
        if (form.signFile != null) {
            int filesize = form.srcFile.getFileSize();
            byteArr = new byte[filesize];
            ByteArrayInputStream bytein = new ByteArrayInputStream (form.srcFile.getFileData());
            bytein.read(byteArr);
            bytein.close();
            form.setFileContent(byteArr);
        // Write file content using Writer class into the destination file in the server.
        ...

  • Error converting j2EE-Specific ejb xml to object representation

    I am trying to webservice using Sun one. I got four entity beans and two sessions. I exposed the business of the session beans as webservice function.
    I tested the individual sesion beans they are working fine.
    When I created a webservice, and when I am trying to deploy the web service the follwing error occured.
    I tried to run the verrfier tool, but is not loading the file...it s getting stucked up.
    Here,
    BSApp -- J2ee application in which webservice is included
    BSManagerContrl --- is one of the two session bean which i created
    Book -- is the entity bean
    I also checked the module of the session bean to verify whether i included the Book enity bean or not. Other wise I would i successfully tested the session bean.
    Thank you
    [b][b]Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- Failed to load
    deployment descriptot for BSApp
    Cause: Error converting j2EE-Specific ejb xml to object representation
    BSManagerContrl_EJBModule.jar
    app_BSApp BSManagerContrl_EJBModule
    Referencing error: This bundle has no bean of name [Book]
    <ejb><ejb-name>Book</ejb-name><jndi-name>ejb/Book</jndi-name><pass-by-refernece>false</pass-by-reference><cmp><mapping-properties>

    Hi parsuram,
    Its not coming up anymore. All i did was re-map the table under Sun AS Mappings under properties for the EJBModule. Its really strange. Thanks a lot for your concern. I really appreciate it.

  • Good books for learning Java(Servlets,JSP,EJB,etc.,),Javascript.

    Hi Experts,
    Can you suggest me some good books on java , javascript.The books should include the internals of Servlets,JSP,EJB.
    Thanks
    vishal

    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=756427&start=7
    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=751055
    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=743429
    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=742997&start=11
    http://forum.java.sun.com/thread.jspa?forumID=54&threadID=750775&start=24
    Just a simple search for this forum....
    It took me 10 seconds tofind these..
    JJ

  • EJB Lock debugging

    Hi All,
    I enabled EJB Lock Debugging by setting
    weblogic.debug.ejb.locking=true
    We have around 100 CMP Entities in the System .
    However, after this, I observed that many "ready" and "passivated" messages appear
    in the log as below:
    [BaseEJBContext] : lock obtained by: 'Scrub timer lock' on: 'Context hashcode:
    '522737', primaryKe
    y: '1803', flags: 'READY ', needsRefresh: 'false', needsFlush: 'false', pinCount:
    '0', owner: 'Scr
    ub timer lock', ejbObject hashcode: '6781345', bean hashcode: '2775737''
    [BaseEJBContext] : lock released by: 'Scrub timer lock' on: 'Context hashcode:
    '522737', primaryKe
    y: '1803', flags: 'PASSIVATED ', needsRefresh: 'false', needsFlush: 'false', pinCount:
    '1', owner:
    'null', ejbObject hashcode: '0', bean hashcode: '2775737''
    I see that log files are getting full very fast.. Is it that for every bean it
    generates the message? After sucessful login, It again started printing above
    messages (I guess for almost all entities)..
    Thank you for clarifying my doubt.
    Regards,
    Nilesh.

    I'm not sure I understand your question. If you enable to the debug
    logging checks on a big system, you will definitely see lots of output.
    -- Rob
    Nilesh wrote:
    Hi All,
    I enabled EJB Lock Debugging by setting
    weblogic.debug.ejb.locking=true
    We have around 100 CMP Entities in the System .
    However, after this, I observed that many "ready" and "passivated" messages appear
    in the log as below:
    [BaseEJBContext] : lock obtained by: 'Scrub timer lock' on: 'Context hashcode:
    '522737', primaryKe
    y: '1803', flags: 'READY ', needsRefresh: 'false', needsFlush: 'false', pinCount:
    '0', owner: 'Scr
    ub timer lock', ejbObject hashcode: '6781345', bean hashcode: '2775737''
    [BaseEJBContext] : lock released by: 'Scrub timer lock' on: 'Context hashcode:
    '522737', primaryKe
    y: '1803', flags: 'PASSIVATED ', needsRefresh: 'false', needsFlush: 'false', pinCount:
    '1', owner:
    'null', ejbObject hashcode: '0', bean hashcode: '2775737''
    I see that log files are getting full very fast.. Is it that for every bean it
    generates the message? After sucessful login, It again started printing above
    messages (I guess for almost all entities)..
    Thank you for clarifying my doubt.
    Regards,
    Nilesh.

  • Accessing remove EJBs while debugging using the Embedded Application Server

    I'm trying to configure to debug a multi-tier application (servlets + EJBs) where a servlet accesses EJBs set up on a second OC4J application server. I've set up rmi.xml in the embedded application server to reference my second application server by adding the line.
    <server host="127.0.0.1" username="admin" port="23791" password="password"/>
    When I run the embedded application server it seems to hang, with the stack in
    the following state:
    OC4J main()
    OC4J launchOC4JCommandLine()
    ApplicationServer launchCommandLine()
    Thread join()
    Thread join(0)
    Object wait(0)
    The following exception is generated on the second application server
    C:\Program Files\Oracle\JDeveloper9i\j2ee\home>java -jar oc4j.jar
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    java.lang.NullPointerException
    java.lang.ClassLoader com.evermind.server.rmi.RMIInputStream.getClassLoa
    der()
    java.lang.Class com.evermind.server.rmi.RMIInputStream.resolveClass(java
    .io.ObjectStreamClass)
    java.io.ObjectStreamClass java.io.ObjectInputStream.inputClassDescriptor
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    int java.io.ObjectInputStream.inputObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    void com.evermind.server.rmi.RMIConnection.handleBindObject()
    void com.evermind.server.rmi.RMIConnection.run()
    void com.evermind.util.ThreadPoolThread.run()
    Has anyone got any ideas what is happening here and how I can fix it?
    Thanks,
    Mark.

    This is an OC4J question. Try posting your message to the Products > Application Server > J2EE forum. Someone there should be able to answer your question.

  • Accessing remote EJBs while debugging using the Embedded Application Server

    I'm trying to configure to debug a multi-tier application (servlets + EJBs) where a servlet accesses EJBs set up on a second OC4J application server. I've set up rmi.xml in the embedded application server to reference my second application server by adding the line.
    <server host="127.0.0.1" username="admin" port="23791" password="password"/>
    When I run the embedded application server it seems to hang, with the stack in
    the following state:
    OC4J main()
    OC4J launchOC4JCommandLine()
    ApplicationServer launchCommandLine()
    Thread join()
    Thread join(0)
    Object wait(0)
    The following exception is generated on the second application server
    C:\Program Files\Oracle\JDeveloper9i\j2ee\home>java -jar oc4j.jar
    Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
    java.lang.NullPointerException
    java.lang.ClassLoader com.evermind.server.rmi.RMIInputStream.getClassLoa
    der()
    java.lang.Class com.evermind.server.rmi.RMIInputStream.resolveClass(java
    .io.ObjectStreamClass)
    java.io.ObjectStreamClass java.io.ObjectInputStream.inputClassDescriptor
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    int java.io.ObjectInputStream.inputObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject(boolean)
    java.lang.Object java.io.ObjectInputStream.readObject()
    void com.evermind.server.rmi.RMIConnection.handleBindObject()
    void com.evermind.server.rmi.RMIConnection.run()
    void com.evermind.util.ThreadPoolThread.run()
    Has anyone got any ideas what is happening here and how I can fix it?
    Thanks,
    Mark.

    This is an OC4J question. Try posting your message to the Products > Application Server > J2EE forum. Someone there should be able to answer your question.

  • How to upgrade web app to J2EE compliant, EJB, etc.

    I support an application that was designed and created before the EJB 2.0 spec
    came out. It was built by a regional consulting company, who used their own application
    framework instead of EJB stuff. Their framework mainly consists of classes to
    handle transactions, JDBCconnections, and what is basically their equivalent of
    an EJB, called a Domain Object. The framework is actually pretty impressive and
    works quite well.
    I'm trying to evaluate whether it would be worth 'upgrading' the entire application,
    to use EJBs and other things to make it J2EE compliant. I've worked with JSPs
    and servlets for a couple years, but I've no experience with EJBs. I've pieced
    together an extremely simply stateless-session bean and have been able to use
    it on a JSP, but now I'm trying to get entity beans working, and can't find any
    examples or tutorials of how to invoke, load, create, etc. an EJB in a JSP/servlet.
    Can anyone recommend a resource for this? I've just ordered the latest Enterprise
    Java Beans book from OReilly, but I didn't know how much that had on actually
    using EJBs within JSPs and servlets.
    Thanks

    Hello Karthik,
    I just tried to solve my problem with your suggestions, unfortunately, my JSP channel still doesn't work :(
    The portal server keeps reporting "Server Error..." when I tried to add query at the end of the href.
    Do you still have any other suggestions?
    Thank you

  • JSPs, EJBs in WebLogic Server 6.1

              Hi everyone,
              I'm starting to develop my first j2ee application. Mainly it is a few jsp pages
              accessing ejbs business logic.
              I would like to implement a security system to prevent anonymous users to access
              the jsp pages.
              It is possible to configure in a descriptor the user information and a profile
              associated with each user, such as read, write, update, delete...? When i refer
              these users i'm talking about the customers that will user the application..they
              are not weblogic users.
              In a few words...i want to implement a basic security system.
              Thanks for your help,
              Best Regards,
              João Seixas
              +351 93 8487351
              [email protected]
              [email protected]
              

    Please post this to the security newsgroup.
              Joao Carlos Seixas wrote:
              > Hi everyone,
              > I'm starting to develop my first j2ee application. Mainly it is a few jsp pages
              > accessing ejbs business logic.
              > I would like to implement a security system to prevent anonymous users to access
              > the jsp pages.
              > It is possible to configure in a descriptor the user information and a profile
              > associated with each user, such as read, write, update, delete...? When i refer
              > these users i'm talking about the customers that will user the application..they
              > are not weblogic users.
              > In a few words...i want to implement a basic security system.
              >
              > Thanks for your help,
              > Best Regards,
              > João Seixas
              > ------------------------------------
              > +351 93 8487351
              > [email protected]
              > [email protected]
              > ------------------------------------
              Regards,
              Ann
              Developer Relations Engineer
              BEA Support
              

  • Standard Javabean inside a JSP/EJB application

    Hello!
    I want to use a JSP-file as a graphical user interface for a j2EE-application. I want to use a standard Javabean as an intermediate connector between the JSP and the Enterprise Java Beans.
    Deployment details:
    - 2 bean-Jars inside a EJB-module
    - A JSP-file inside a .WAR-file
    But what about the standard Javabean, where shall I put it?
    What are the correct settings in the deployment tool?....
    bye from
    G�ran, Stockholm

    You just need the standard JavaBean available to the EJB as well as the JSP. One nice way is to package such beans into a JAR and include the JAR in the EJB module as well as the WAR as a library.

  • Exception : JSP & EJB

    Hi,
    I'm working on a project but it doens't work perfectly.
    It use J2EE, EJB and JSP technology but I'm fresh in this field.
    At the moment, sometimes (but not for each utilisation and I don't unterdstand why !) there is a Servlet exception which is :
    A Servlet Exception Has Occurred
    Exception Report:
    javax.servlet.ServletException: Cannot create bean of class util.DocumentationServicesBean
    Root Cause:
    java.lang.ClassNotFoundException: class util.DocumentationServicesBean : java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: Client not authorized for this invocation.
         at java.beans.Beans.instantiate(Beans.java:211)
         ... ... ...If someone know the reason of this problem, please let me know.
    Thanks !

    it's not a servlet exception but when ur jsp/servlet is trying to invoke the EJBs, by any means, like creating a new instance, or just getting the pre-existed data by some finder method etc. etc., some times it doesn't have sufficient rights to do that call. Then ur ejb server throws an error, which ultimately comes to the webserver in the form of ServletException.
    java.rmi.RemoteException: Client not authorized for this invocation.
    at java.beans.Beans.instantiate(Beans.java:211)check ur deployment descriptor for the different roles and their rights, and different methods and permissions for them.
    good luck,

  • J2EE without EJB

    hello
    i want to ask how can i use the J2EE container without implementing EJB's. i just want to use servlets, JSP, and classes. is this possible and how can i find info about this. thanx
    Feras
    [email protected]

    Hi Feras,
    The purpose of a J2EE container (such as OC4J) is to execute J2EE applications. A J2EE application is comprised of modules. There are basically two types of modules: "client" and "ejb". A J2EE application can contain any combination of modules -- therefore it may only have a single "client" module (and no "ejb" module -- for example).
    Have you not read the available documentation? For the latest version of OC4J, the documentation is available from:
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/index.htm
    And there is also the J2EE specification and related documentation, that is available from:
    http://java.sun.com/j2ee
    Hope this answers your question.
    Good Luck,
    Avi.

  • JSP, EJB in Jboss 4 with mySQL database. Error in connecting to database

    Hi, i using JBoss 4-0-1 with jsp and mySQL database. I get this example from a book using stateless session beans. However i modify it so it can connect to mySQL database.
    This is my code for jsp.
    <%@ page import="asg.MusicEJB.*,
    java.util.*,
    javax.naming.Context,
    javax.naming.InitialContext,
    javax.rmi.PortableRemoteObject" errorPage="error.jsp" %>
    <%--
         The following 3 variables appear in a JSP declaration.
         They appear outside the generated _jspService() method,
         which gives them class scope.
         Since we want to initialize our Music EJB object once
         and read the Music Collection database to get the
         recording titles once, we place this code inside
         method jspInit().
         The EJB business method getMusicList()
         returns a collection of RecordingVO objects which we
         store in ArrayList albums.
    --%>
    <%!
         MusicHome musicHome;
         Music mymusic;
         ArrayList albums;
         Properties properties=new Properties();
         public void jspInit() {
                   properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                   properties.put(Context.PROVIDER_URL, "localhost:3306");
                   System.out.println("............................in properties");
              try {
                   //Context initial = new InitialContext();
                   InitialContext jndiContext = new InitialContext(properties);
                   //Object ref  = jndiContext.lookup("MusicEJB");
                   Object objref = jndiContext.lookup("java:comp/env/ejb/EJBMusic");
                   musicHome = (MusicHome)PortableRemoteObject.narrow(objref, MusicHome.class);
                   mymusic = musicHome.create();
                   albums = mymusic.getMusicList();
                   System.out.println(".............................in line 64");
              } catch (Exception ex) {
                   System.out.println("Unexpected Exception............: " +
                             ex.getMessage());
                   ex.printStackTrace();
    %>
    <%--
         The following scriptlet accesses the implicit
         request object to obtain the current URL
         and saves it to the session object for later retrieval. 
         It also saves variable mymusic, so we can
         make remote calls to our Music EJB, and the collection of
         RecordingVO objects.  These variables will all be available
         to other pages within the session.
    --%>
    <%
         String requestURI = request.getRequestURI();
         session.putValue("url", requestURI);
         session.putValue("mymusic", mymusic);
         session.putValue("albums", albums);
    %>
    <html>
    <head>
    <title>Music Collection Database Using EJB & JSP Version 9.7</title>
    </head>
    <body bgcolor=white>
    <h1><b><center>Music Collection Database Using EJB & JSP</center></b></h1>
    <hr>
    <p>
    There are <%= albums.size() %> recordings.
    <form method="post" action="musicPost.jsp">
    <p>
    Select Music Recording:
    <select name="TITLE">
    <%
         // Generate html <option> elements with the recording
         // titles stored in each RecordingVO element.
         // Obtain the current title from the session object
         // (this will be null the first time).
         String title;
         String currentTitle = (String)session.getValue("curTitle");
         if (currentTitle == null) currentTitle = "";
         RecordingVO r;
         Iterator i = albums.iterator();
         while (i.hasNext()) {
              r = (RecordingVO)i.next();
              title = r.getTitle();
              if (title.equals(currentTitle)) {
                   out.println("<option selected>" + title + "</option>");
              else {
                   out.println("<option>" + title + "</option>");
    %>
    </select><p><p>
    <%--
         Provide a "View Tracks" button to submit
         the requested title to page musicPost.jsp
    --%>
    <input TYPE="submit" NAME="View" VALUE="View Tracks">
    </form>
    </body>
    </html>Message was edited by:
    chongming

    This is the deployment descriptor for the .ear file.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
    <application>
      <display-name>MusicDAOApp</display-name>
      <description>Application description</description>
      <module>
        <web>
          <web-uri>war-ic.war</web-uri>
          <context-root>music</context-root>
        </web>
      </module>
      <module>
        <ejb>ejb-jar-ic.jar</ejb>
      </module>
    <!--
      <module>
        <java>app-client-ic.jar</java>
      </module>
    -->
    </application>
    And this is the deployment for the ejb class files:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
      <display-name>MusicEJB</display-name>
      <enterprise-beans>
        <session>
          <display-name>MusicEJB</display-name>
          <ejb-name>MusicEJB</ejb-name>
          <home>asg.MusicEJB.MusicHome</home>
          <remote>asg.MusicEJB.Music</remote>
          <ejb-class>asg.MusicEJB.MusicBean</ejb-class>
          <session-type>Stateless</session-type>
          <transaction-type>Bean</transaction-type>
          <env-entry>
            <env-entry-name>MusicDAOClass</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>asg.MusicEJB.MusicDAOCloudscape</env-entry-value>
          </env-entry>
         <env-entry>
         <env-entry-name>dbUrl</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>jdbc:mysql://localhost/music</env-entry-value>
          </env-entry>
          <env-entry>
            <env-entry-name>dbUserName</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>chongming</env-entry-value>
          </env-entry>
          <env-entry>
            <env-entry-name>dbPassword</env-entry-name>
            <env-entry-type>java.lang.String</env-entry-type>
            <env-entry-value>kcm82</env-entry-value>
         </env-entry>
          <security-identity>
            <description></description>
            <use-caller-identity></use-caller-identity>
          </security-identity>
        </session>
      </enterprise-beans>
    </ejb-jar>I can combine the jar and war files into a ear file. deploying is alright without any errors.
    However when i run the jsp, it prompt this error:
    You Have Encountered an Error
    Stack Trace
    java.lang.NullPointerException
         at org.apache.jsp.musicGet_jsp._jspService(org.apache.jsp.musicGet_jsp:111)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Thread.java:595)
    How to i solve the error? I look at he catch results in the command prompt of JBoss , i found that when running, the code will be caught by the exception and display this:int.java:527)
    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
    kerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    13:55:21,375 INFO [STDOUT] Unexpected Exception............: EJBException:; nes
    ted exception is:
    javax.ejb.EJBException: getMusicList: SQLException during DB Connection:
    The url cannot be null
    13:55:21,375 INFO [STDOUT] java.rmi.ServerException: EJBException:; nested exce
    ption is:
    javax.ejb.EJBException: getMusicList: SQLException during DB Connection:
    The url cannot be null 13:55:21,375 INFO[STDOUT] at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:352)
    13:55:21,375 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:196)
    What can i do to solve the problem? please helpMessage was edited by:
    chongming
    Message was edited by:
    chongming
    Message was edited by:
    chongming

Maybe you are looking for

  • Is a 64GB SSD good enough for a primary boot drive on a Macbook Pro?

    My hard drive just failed and I am thinking of going the SSD way - installing a 64GB SSD as my bootable drive and taking out my optical disc to install a 500GB HDD. Will the 64GB work for my purpose? Or do I need to go higher? Thanks!

  • How to get items from catalog-help ASAP

    I have several completed scrapbook pages that I cannot find anywhere in computer. They are showing up in the Catalog -pictures are there and its not stating it is a missing file. When I try to open or copy them,it goes immediately to browse for missi

  • Seeking Diagnosis: ADSL Max: Automatic Reset of Hu...

    I’m hoping that the forum can suggest a diagnosis for an intermittent problem with my BT broadband link. I’ve been told in the past that my link uses ADSL Max. The problem has occurred before, though not for a couple of months, and not since an NTE5

  • How to Write Error messages to application.log file in OAS 10g.

    Hi All i am in urgent need of writing log messages to Oracle Application Server10g application.log file. Using JDeveloper 10.1.3.4.0.4270. Thanks & Regards, Renuka Edited by: Renuka on Jan 18, 2013 8:00 AM

  • EA1 - Blank SQL Worksheet

    Hello. MY OS is Win 7 Enterprise 64-bit.  I've just installed SQL Developer 4 EA1.  I have also installed JDK 1.7.25. 64-Bit,  just today.  When I open a sql file in EA1, I see the test of the file and I can run the SQL with no issue.  However, if I