1 2 Previous Next 24 Replies Latest reply on Sep 5, 2012 4:09 AM by kbachl Go to original post
      • 15. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
        rhauch

        You could try getting the latest from 'master' and building ModeShape again. We've committed changes that should fix the issue, but I'd love to have independent confirmation before we release Beta3 later today.

        • 16. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
          kbachl

          ok, ill checking out right now, keep you updated;

          • 17. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
            kbachl

            sorry Randall,

             

            same problem as described before; Transient in logs, repo empty on restart even the storage path has data plus JDBM has data, too;

            • 18. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
              rhauch

              It sounds like your application is not able to find the configuration file, and it's creating a transient ISPN cache and "transient" (or temporary) binary store. Are you sure it's using the right JSON config file?

              • 19. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                kbachl

                defenitely - else java would scream out load, see my repo-init code:

                 

                 

                 

                   public class JcrService {

                 

                        static Logger log = LoggerFactory.getLogger(JcrService.class);

                        ModeShapeEngine engine;

                 

                        public void close() {

                 

                            Future<Boolean> future = engine.shutdown();

                 

                            try {

                                if (future.get()) {

                                    System.out.println("ModeShape 3 Shutdown successful");

                                }

                            } catch (Exception e) {

                                e.printStackTrace();

                            }

                 

                        }

                 

                        /**

                         * modeshape 3.x

                         *

                         * @param modeshapePath

                         * @return

                         */

                 

                        public Repository createRepositoryMS3(String modeshapePath) {

                            try {

                                log.info("JCR...");

                 

                                engine = new ModeShapeEngine();

                                engine.start();

                 

                 

                                RepositoryConfiguration config = RepositoryConfiguration.read(getJsonFileContent());

                 

                 

                                Problems problems = config.validate();

                                if (problems.hasErrors()) {

                                    System.err.println("Problems starting the engine.");

                                    System.err.println(problems);

                                    System.exit(-1);

                                }

                 

                                return engine.deploy(config);

                 

                            } catch (Exception e) {

                                throw new RuntimeException("Could not create repository! ", e);

                            }

                        }

                 

                        public static String getJsonFileContent() throws IOException {

                 

                            String json = new Scanner(JcrService.class.getResource("config/repository-ms3.json").openStream())

                                    .useDelimiter("\\Z").next();

                 

                            json = json.replace("cache-ms3.xml", JcrService.class.getResource("config/cache-ms3.xml").getFile());

                 

                            return json;

                        }

                 

                 

                }

                • 20. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                  kbachl

                  Randall, were you able to reproduce the mentioned problems? - Is there anything I can do to help you with this issue?

                  • 21. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                    rhauch

                    I presume you debugged the "getJsonFileContent()" to verify that it is correct? (BTW, it is possible to use system properties within a configuration file; see our documentation.)

                     

                    No, I haven't had time to try to reproduce the problem. Perhaps you could supply a full JUnit test with all the code needed to run, plus your JSON configuration file.

                    • 22. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                      kbachl

                      Hi Randall,

                       

                      json is read and alright. I digged deeper and got something interesting. I use 3 workspaces for storing nearly same data as developement, staging and production. I started up the server letting it log:

                       

                       

                      [#|2012-08-24T10:17:19.490+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace development - not existing, creating...|#]

                       

                      [#|2012-08-24T10:17:19.764+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace development bx_ZbzboUjFeJwmEZRdAhlAcfuEo created!|#]

                       

                      [#|2012-08-24T10:17:19.764+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace staging - not existing, creating...|#]

                       

                      [#|2012-08-24T10:17:19.829+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace staging bx_ZujYyDPYcInkZVnATKbNfVHN created!|#]

                       

                      [#|2012-08-24T10:17:19.829+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace production - not existing, creating...|#]

                       

                      [#|2012-08-24T10:17:19.899+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace production bx_ZSNaiWKUQpltZbnTBubEBlkce created!|#]

                       

                      now, if I dont do anything but just stop the server and restart it, I get:

                       

                      [#|2012-08-24T10:20:37.360+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace development bx_ZbzboUjFeJwmEZRdAhlAcfuEo already existing;|#]

                       

                      [#|2012-08-24T10:20:37.360+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace staging bx_ZujYyDPYcInkZVnATKbNfVHN already existing;|#]

                       

                      [#|2012-08-24T10:20:37.360+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace production - not existing, creating...|#]

                       

                      [#|2012-08-24T10:20:37.621+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|workspace production bx_ZbkBnzcDsJpENZbgRmUyvJLXHo created!|#]

                       

                      meaning that somehow the last workspace that was created is not found. If I now let it exactly query for the workspace ID "bx_ZSNaiWKUQpltZbnTBubEBlkce" I get:

                       

                      [#|2012-08-24T10:33:01.890+0200|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|session: cant find workspace!|#]

                       

                      [#|2012-08-24T10:33:01.892+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=18;_ThreadName=Thread-6;|javax.jcr.NoSuchWorkspaceException: The workspace bx_ZSNaiWKUQpltZbnTBubEBlkce was not found

                          at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:667)

                          at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:578)

                      ....

                       

                      So it seems as the last workspace created somehow doesnt get stored but the previous ones get stored. Just to mention: the code to create the workspaces is allways the same, its in a loop. Beside that on Modeshape 2 as well as Jackrabbit it works as expected, ending up with 3 workspaces. Any Idea where to dig deeper?

                       

                      PS: all was done using BETA 3

                      • 23. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                        rhauch

                        Can you create a test case that replicates the behavior, and then log a JIRA and attach the test case?

                         

                        Thanks

                        • 24. Re: Modeshape 3 Beta 2: java.lang.NumberFormatException: For input string: "classname"
                          kbachl

                          Hi Randall,

                           

                          sorry for late answer but were on vacation

                           

                          Meanwhile Horia was faster: https://issues.jboss.org/browse/MODE-1617

                           

                          thats the bugger,

                           

                          Best

                          1 2 Previous Next