Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

remove logging.properties from vaadin-sass-compiler root package #258

Open
vaadin-bot opened this issue Jul 24, 2014 · 4 comments · May be fixed by #309
Open

remove logging.properties from vaadin-sass-compiler root package #258

vaadin-bot opened this issue Jul 24, 2014 · 4 comments · May be fixed by #309
Labels

Comments

@vaadin-bot
Copy link

Originally by kumm0307


Normally when no logging.properties given for an application, tomcat/conf/logging.properties defines logging in tomcat.

vaadin-sass-compiler breaks this behavior with an own logging.properties file. Tomcat loads this properties file for the whole application.

Tested on Tomcat 7.0.54

Slightly realated to #14000


Imported from https://dev.vaadin.com/ issue #14291

@vaadin-bot
Copy link
Author

Originally by neeme


Also causes failure to deploy Vaadin application on JBoss EAP 6.0.0.
The failure:

13:07:07,406 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."myVaadinApp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myVaadinApp.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "myVaadinApp.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011555: Failed to configure logging using 'logging.properties' configuration file.
    at org.jboss.as.logging.LoggingConfigurationProcessor.deploy(LoggingConfigurationProcessor.java:125)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
    ... 5 more
Caused by: java.lang.IllegalArgumentException: className is null
    at org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:52) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:54) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.logmanager.config.LogContextConfigurationImpl.addHandlerConfiguration(LogContextConfigurationImpl.java:138) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.logmanager.PropertyConfigurator.configureHandler(PropertyConfigurator.java:477) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:379) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.logmanager.PropertyConfigurator.configure(PropertyConfigurator.java:92) [jboss-logmanager-1.3.1.Final-redhat-1.jar:1.3.1.Final-redhat-1]
    at org.jboss.as.logging.LoggingConfigurationProcessor.deploy(LoggingConfigurationProcessor.java:122)
    ... 6 more

@vaadin-bot
Copy link
Author

Originally by neeme


If you do not use SASS, just exclude the dependency in pom.xml:

    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-server</artifactId>
      <version>7.3.8</version>
      <exclusions>
        <exclusion>
          <groupId>com.vaadin</groupId>
          <artifactId>vaadin-sass-compiler</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

@vaadin-bot
Copy link
Author

Originally by ryanhow


I am using SASS. And this appears to still be an issue in 7.6.4.

I can remove the dependency in the pom and put a local one in with the logging.properties removed.

The SASS compiler doesn't seem to change very often :)

But would still be good to remove it!

It took me a little while to track down why my logging had gone awol.

@vaadin-bot
Copy link
Author

Originally by ryanhow


I believe this static block of code in ScssStylesheet.java is the culprit

    static {
        String logFile = System.getProperty("java.util.logging.config.file");
        if (logFile == null) {
            try {
                LogManager.getLogManager().readConfiguration(
                        ScssStylesheet.class
                                .getResourceAsStream("/logging.properties"));
            } catch (SecurityException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

@vaadin-bot vaadin-bot added the bug label Nov 11, 2016
kisstkondoros added a commit to kisstkondoros/sass-compiler that referenced this issue Feb 12, 2017
Motivation:
The static initializer of ScssStyleSheet overrides the logger
configuration, causing side effects in the surrounding
application. To prevent this, the related code has been removed
along with the now unused logging.properties and
CustomConsoleHandler.

Resolves vaadin#258
@kisstkondoros kisstkondoros linked a pull request Feb 12, 2017 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant