10 Replies Latest reply on Dec 11, 2013 9:34 PM by aditbhiday

    Problem using Modeshape 3.6.0 JCA adapter

    aditbhiday

      Hi,

      am having problems using the Modeshape 3.6.0 JCA adapter rar file. I am able to deploy the rar file on Glassfish 3.1.2 and specify the path to the repository configuration file. However when I try to access the repository it gives the following error:

      Unexpected exception while creating resource for pool modeshapePool. Exception : javax.resource.ResourceException: Failed to create session: Error while starting 'My Repository' repository: Unable to load component metadata!|#].

       

      On some digging, found that it was due to the Infinispan 5.x jars which are bundled inside the JCA rar file. That issue seems to be fixed in Infinispan 6.x.

      This was sometime back. Recently again when I tried to reproduce the same issue, then I got the following error with a near ideantical configuration:

       

      INFO: Could not complete requestjavax.jcr.RepositoryException: com.sun.appserv.connectors.internal.api.PoolingException: Failed to create session: Error while starting 'sample' repository: java.util.ServiceConfigurationError: org.infinispan.configuration.parsing.ConfigurationParser: Provider org.infinispan.loaders.bdbje.configuration.BdbjeCacheStoreConfigurationParser52 not a subtype

       

      This happens although I am not using the Berkley Database to persist the Infinispace data. The Infinispace configuration specifies FileCacheStore for it.

      Does anyone know as to what the solutions for this is? Additionally, has anyone tried using the Modeshape JCA 3.6.0 adapter on Glassfish? Would appreciate your response.

      Thanks,

      Adit

        • 1. Re: Problem using Modeshape 3.6.0 JCA adapter
          rhauch

          Can you share all or part of your configuration files? Also, while our JCA adapter does include Infinispan 5.2.x, we've not released anything that uses Infinispan 6.x JARs. Are you placing ISPN JARs on the class path as well? That may be a problem in the JCA adapter on Glassfish, since Glassfish (IIUC) does not have really have isolated class loaders. Note that none of the ModeShape releases are ready to use Infinispan 6; that will come with ModeShape 4.0 early next year.

          • 2. Re: Problem using Modeshape 3.6.0 JCA adapter
            oleg.kulikov

            Hi Adit, let me try to reproduce your problem with Glassfish. I will do a test and report.

             

            --Oleg

            • 3. Re: Problem using Modeshape 3.6.0 JCA adapter
              aditbhiday

              Thank you for your responses. Am attaching the configuration files, which were used. Both these configuration files reside in "C:/modeshapeRepository" on the Windows filesystem of a machine I am using. Actually, am not placing the ISPN jars separately in the class path of the Glassfish server, but could that be a possible workaround to our problem, since the Infinispan forums say, that this error is due to Infinispan jars being inside another archive file, which in our case happens to be the JCA rar file. Would it help if I place the Infinispan jars separately on the server class path and remove the jars from the JCA .rar file ...?

              • 4. Re: Problem using Modeshape 3.6.0 JCA adapter
                oleg.kulikov

                Hi Adit, I have just finished test of the JCA adaptor with glassfish. Everythings is working smooth for me, the only underwater stone was how to specify url for repository URL property of the RA (with file:// prefix is working for me).

                 

                Can you please specify more details how are you deploying adaptor so we can find the difference?

                 

                --Oleg

                • 5. Re: Problem using Modeshape 3.6.0 JCA adapter
                  aditbhiday

                  Hi. I had used the file:// prefix also, while specifying the url for the respository and yet it gave problems both times that I tried it on Glassfish 3.1.2. Did you happen to use the same version of Glassfish or a later version perhaps for this ...?

                  Let me give it a try again here and then write a full post with details.

                  • 6. Re: Problem using Modeshape 3.6.0 JCA adapter
                    aditbhiday

                    I use the following URL to specify the path to the file, since I am developing on Windows: file:/C:/modeshapeRepository/modeshapeconfig.json .

                    I seem to be getting the same errors, which were there previously. Additionally, there was another thing that I had not mentioned earlier. After creating the connection pool for the modeshape jca rar file, when I ping the connection pool through the admin console, then an error is thrown saying " the repository <name of the modeshape repository> has already been deployed". Additionally, I have a JNDI name which points to this connection pool. When I create and deploy the modeshape-jca-example (which is a part of the sample Modeshape applications in Github), then I get the errors mentioned in my first post, on accessing the Modeshape repository through JNDI.
                    Do you happen to be getting any of the errors that I mentioned above ...?

                    • 7. Re: Problem using Modeshape 3.6.0 JCA adapter
                      oleg.kulikov

                      Initialy I tryied with Glassfish 4 (no problem) and when I am trying GlassFish 3.1.2.2(build 5) I am getting exception java.lang.ClassCastException: org.modeshape.jca.JcrRepositoryHandle cannot be cast to javax.jcr.Repository what is definitely not true. However, in all cases repository starts successfully. Let me try to digg a bit more.

                      • 8. Re: Problem using Modeshape 3.6.0 JCA adapter
                        oleg.kulikov

                        Resolved problem with class cast exception and now got exception with infinispan similar to the original post. Trying to resolve the problem.

                        • 9. Re: Problem using Modeshape 3.6.0 JCA adapter
                          oleg.kulikov

                          Hi Adit,

                          I am able to deploy JCA on GlassFish 3.1.2 now. It will work if inside rar leave only modeshape-jca.jar and rest jars move domain/lib folder. You can try this way also.

                           

                          --Oleg

                          • 10. Re: Problem using Modeshape 3.6.0 JCA adapter
                            aditbhiday

                            Modeshape 3.6.0.Final JCA adapter works fine with the above mentioned workaround.

                            Thanks a lot Oleg and Randall for your help on this. Cheers!