Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1786

Wrong param was read for binaryStorage with type database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.1.2.Final, 3.2.0.Final
    • None
    • None
    • None

    Description

      repository-config-schema.json has section for storage:

      	...
       "binaryStorage" : {
      
      	...
              "url" : {
                       "type" : "string",
                       "description" : "The URL to be used to establish the database connection.",
                       "required" : true,
                      },
              },
      

      But in org.modeshape.jcr.RepositoryConfiguration was read "connectionURL" param:

       		public static final String CONNECTION_URL = "connectionURL";
      		...
      
      		public AbstractBinaryStore getBinaryStore() throws Exception {
      	          ...
      	            } else if (type.equalsIgnoreCase("database")) {
                      String driverClass = binaryStorage.getString(FieldName.JDBC_DRIVER_CLASS);
                      String connectionURL = binaryStorage.getString(FieldName.CONNECTION_URL);
      		...
      		
      

      So as result :

      javax.jcr.RepositoryException: Error while starting 'FederatedRepository' repository: org.modeshape.jcr.value.binary.BinaryStoreException: java.sql.SQLException: The url cannot be null
      	at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:613)
      	at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:580)
      	at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:149)
      	at org.modeshape.example.filesystem.ModeShapeExample.main(ModeShapeExample.java:64)
      Caused by: java.lang.RuntimeException: org.modeshape.jcr.value.binary.BinaryStoreException: java.sql.SQLException: The url cannot be null
      	at org.modeshape.jcr.value.binary.DatabaseBinaryStore.start(DatabaseBinaryStore.java:222)
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1071)
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:966)
      	at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:354)
      	at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:611)
      	... 3 more
      Caused by: org.modeshape.jcr.value.binary.BinaryStoreException: java.sql.SQLException: The url cannot be null
      	at org.modeshape.jcr.value.binary.DatabaseBinaryStore.connect(DatabaseBinaryStore.java:332)Shutting down engine ...
      
      	at org.modeshape.jcr.value.binary.DatabaseBinaryStore.start(DatabaseBinaryStore.java:208)
      	... 7 more
      Caused by: java.sql.SQLException: The url cannot be null
      	at java.sql.DriverManager.getConnection(DriverManager.java:554)
      	at java.sql.DriverManager.getConnection(DriverManager.java:185)
      	at org.modeshape.jcr.value.binary.DatabaseBinaryStore.connect(DatabaseBinaryStore.java:330)
      	... 8 more
      

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            eshevchenko_jira evgeniy shevchenko (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: