Announcement Announcement Module
Collapse
No announcement yet.
Functionality disappeared without any error message Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Functionality disappeared without any error message

    I have encountered a problem where one of the functionalities of my application stopped working without generating any error messages.

    My application has two basic features: list existing data of and add data to a table in the database via jpa/eclipselink. I was able to deploy the application and the list function worked flawlessly. The add function however didn't work. It didn't generate any error messages neither (based on the dm server log).

    I experienced the same problem back in dm server version 1.0. I solved it by adding two bundles to the Import-Bundle section of the MANIFEST file of the jpa project. The reason why I was able to discovered the two missing bundles is because I had a working copy to compare against. This 1.0 fix didn't work in version 2.0.

    I have tried fixing my MANIFEST file by copying the content of the greenpages.jpa MANIFEST, generating MANIFEST with bundlor, and importing the entire springframework library. None of them worked.

    My question is what's the recommended and reliable way for generating MANIFEST? It is almost impossible to debug when there isn't even an error message.

  • #2
    Candy,
    Thank you for reporting the problem.

    Can you be a little more specific about your missing functionality? Perhaps the manifest you updated would help us here.

    Your more general question is to use Bundlor -- SpringSource Tool Suite (latest version) can generate the MANIFEST.MF file for you, using the byte-code to detect dependencies you have used in the build. Extra control over what is generated is provided by a template.mf file (in the root of the project), which can over-ride entries, suppress others and make version-range decisions.

    The section Generating greenpages.jpa’s manifest using Bundlor in Chapter 5 of the getting-started guide describes how to generate the MANIFEST for Greenpages.jpa -- it should not be necessary for you to update the MANIFEST file directly.

    Steve Powell

    Comment


    • #3
      Steve, Let me try setting up a par to show you the issue. Thanks.

      Comment


      • #4
        Steve,

        If you want to deploy this application, you will need to download apache derby. I have version 10.5.3. No set up scripts are needed.

        Rename com.apress.prodmserver.vehicle-1.0.0.par.zip to com.apress.prodmserver.vehicle-1.0.0.par.

        Thanks.

        Comment


        • #5
          Candy,

          Update: I have now deployed it, and am going to run derby to get the functionality to be exposed.

          I cannot deploy your par, because I have org.eclipse.persistence-1.1.0 (from our previous conversations), and you Import-Bundle org.eclipse.persistence at strict version 1.0.0.

          I can supply this, of course, but please confirm that this is intended, and that the pre-requisites:

          com.springsource.javax.persistence-1.99.0.jar
          com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar
          com.springsource.org.apache.commons.pool-1.3.0.jar
          com.springsource.org.apache.derby.client-10.5.1000001.764942.jar
          com.springsource.org.eclipse.persistence-1.1.0.jar
          com.springsource.org.eclipse.persistence.antlr-1.1.0.jar
          com.springsource.org.eclipse.persistence.asm-1.1.0.jar
          com.springsource.org.eclipse.persistence.jpa-1.1.0.jar
          org.eclipse.persistence-library-1.1.0.libd

          are still correct (modulo 1.0.0 for eclipse, if you like).
          Can you provide a little more information about your development environment? Are you developing under Eclipse, Springsource Tool Suite? And if so, which version are you using?

          Steve Powell
          Last edited by Steve Powell; Feb 17th, 2010, 10:17 AM.

          Comment


          • #6
            Candy,
            How do you deploy derby? I can drop it (I'm using com.springsource.org.apache.derby-10.5.1000001.764942.jar from EBR) into the pickup directory, and the embedded activator starts it, though I'm not sure that will do everything necessary.

            Your app (/vehicle) deploys nicely (I have the corresponding derby client in the usr repository) and shows the front page, but after that it fails to get any persisted data (of course):
            Code:
            exception
            
            org.springframework.web.util.NestedServletException: Request processing failed; nested exception is Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
            Internal Exception: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused.)
            Error Code: 0
            	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
            	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
            	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
            	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
            So presumably the db isn't set up. You said there was no config, is this what you meant me to do?

            Steve Powell

            Comment


            • #7
              The problem appears with both eclipselink version 1.0 and 1.1.

              I downloaded db-derby-10.5.3.0-bin.zip from here. To start derby, run <derby-home>\bin\startNetworkServer. You shouldn't need additional scripts.

              I am using STS 2.3 to develop the application and maven 2.2.1 to build and package the par.

              Thanks.
              Last edited by candy.chiu.ad; Feb 18th, 2010, 12:48 PM.

              Comment


              • #8
                I fixed the problem. The aspectj weaver wasn't "switched" on because I included only 3 packages from aspectj weaver. I tried adding the remaining packages, and that resolved the issue.
                Last edited by candy.chiu.ad; Mar 9th, 2010, 01:11 AM.

                Comment

                Working...
                X