Refusing to serve hidden directory, via 404 Error
I got this error while running jupyter notebook inside my EC2
My Solution --> when i first run it, i was inside .jupyter directory.
I created my own 'workspace' directory, switching into it and then run it again the 'jupyter notbook'
Now all ok.
Hoped it helped,
Dor
Showing posts with label apache. Show all posts
Showing posts with label apache. Show all posts
Aug 7, 2018
Jun 5, 2014
log4j.properties
Sample log4j property file, logging only to file, if you want console add 'stdout' in the rootlogger and remove the comments in the section below.
I included hibernate and spring logging relevant
# Root logger option
log4j.rootLogger=INFO, file
log4j.category.com=WARN
log4j.category.org=WARN
log4j.category.com.softweave=DEBUG
log4j.category.org.springframework=INFO
#log4j.category.org.springframework.beans.factory=INFO
#log4j.category.org.springframework.beans.factory.support=INFO
log4j.category.org.apache.cxf.service.factory.ReflectionServiceFactoryBean=WARN
log4j.category.org.hibernate.hql.internal.ast.HqlSqlWalker=ERROR
log4j.category.org.hibernate.SQL=INFO
# To see hibernate parameters in the query and not just ? you must set this to TRACE
log4j.category.org.hibernate.type=INFO
log4j.category.org.hibernate.tool.hbm2ddl=INFO
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=log_file_name_and_location.log
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n
# Direct log messages to stdout
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.Target=System.out
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - #%m%n
# spring transaction log
log4j.logger.org.springframework.orm.jpa=INFO
log4j.logger.org.springframework.transaction=INFO
#log4j.logger.org.springframework.orm.hibernate3.HibernateTransactionManager=DEBUG
# hibernate full details log
log4j.logger.org.hibernate=INFO
#log4j.logger.org.hibernate.type=trace
I included hibernate and spring logging relevant
# Root logger option
log4j.rootLogger=INFO, file
log4j.category.com=WARN
log4j.category.org=WARN
log4j.category.com.softweave=DEBUG
log4j.category.org.springframework=INFO
#log4j.category.org.springframework.beans.factory=INFO
#log4j.category.org.springframework.beans.factory.support=INFO
log4j.category.org.apache.cxf.service.factory.ReflectionServiceFactoryBean=WARN
log4j.category.org.hibernate.hql.internal.ast.HqlSqlWalker=ERROR
log4j.category.org.hibernate.SQL=INFO
# To see hibernate parameters in the query and not just ? you must set this to TRACE
log4j.category.org.hibernate.type=INFO
log4j.category.org.hibernate.tool.hbm2ddl=INFO
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=log_file_name_and_location.log
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n
# Direct log messages to stdout
#log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.Target=System.out
#log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - #%m%n
# spring transaction log
log4j.logger.org.springframework.orm.jpa=INFO
log4j.logger.org.springframework.transaction=INFO
#log4j.logger.org.springframework.orm.hibernate3.HibernateTransactionManager=DEBUG
# hibernate full details log
log4j.logger.org.hibernate=INFO
#log4j.logger.org.hibernate.type=trace
Labels:
apache,
appender,
category,
consoleappender,
conversionpattern,
hbm2ddl,
hibernate,
hibernate3,
log4j,
log4j.properties,
logger,
patternlayout,
rollingfileappender,
spring,
springframework,
stdout
Aug 6, 2013
javax.el.ELException: The identifier [public] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.
Had this lately
javax.el.ELException: The identifier [public] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.
org.apache.el.parser.AstDotSuffix.setImage(AstDotSuffix.java:46)
org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1069)
org.apache.el.parser.ELParser.ValueSuffix(ELParser.java:1035)
org.apache.el.parser.ELParser.Value(ELParser.java:980)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
org.apache.el.parser.ELParser.Multiplication(ELParser.java:714)
org.apache.el.parser.ELParser.Math(ELParser.java:634)
org.apache.el.parser.ELParser.Compare(ELParser.java:446)
org.apache.el.parser.ELParser.Equality(ELParser.java:340)
org.apache.el.parser.ELParser.And(ELParser.java:284)
org.apache.el.parser.ELParser.Or(ELParser.java:228)
org.apache.el.parser.ELParser.Choice(ELParser.java:185)
org.apache.el.parser.ELParser.Expression(ELParser.java:177)
org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1183)
org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1019)
org.apache.el.parser.ELParser.Value(ELParser.java:968)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
org.apache.el.parser.ELParser.Multiplication(ELParser.java:714)
org.apache.el.parser.ELParser.Math(ELParser.java:634)
org.apache.el.parser.ELParser.Compare(ELParser.java:446)
org.apache.el.parser.ELParser.Equality(ELParser.java:340)
org.apache.el.parser.ELParser.And(ELParser.java:284)
org.apache.el.parser.ELParser.Or(ELParser.java:228)
org.apache.el.parser.ELParser.Choice(ELParser.java:185)
org.apache.el.parser.ELParser.Expression(ELParser.java:177)
org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1183)
org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1019)
org.apache.el.parser.ELParser.Value(ELParser.java:968)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
Solution for me was easy and simple
Adding this to the vm arguments
-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
javax.el.ELException: The identifier [public] is not a valid Java identifier as required by section 1.19 of the EL specification (Identifier ::= Java language identifier). This check can be disabled by setting the system property org.apache.el.parser.SKIP_IDENTIFIER_CHECK to true.
org.apache.el.parser.AstDotSuffix.setImage(AstDotSuffix.java:46)
org.apache.el.parser.ELParser.DotSuffix(ELParser.java:1069)
org.apache.el.parser.ELParser.ValueSuffix(ELParser.java:1035)
org.apache.el.parser.ELParser.Value(ELParser.java:980)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
org.apache.el.parser.ELParser.Multiplication(ELParser.java:714)
org.apache.el.parser.ELParser.Math(ELParser.java:634)
org.apache.el.parser.ELParser.Compare(ELParser.java:446)
org.apache.el.parser.ELParser.Equality(ELParser.java:340)
org.apache.el.parser.ELParser.And(ELParser.java:284)
org.apache.el.parser.ELParser.Or(ELParser.java:228)
org.apache.el.parser.ELParser.Choice(ELParser.java:185)
org.apache.el.parser.ELParser.Expression(ELParser.java:177)
org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1183)
org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1019)
org.apache.el.parser.ELParser.Value(ELParser.java:968)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
org.apache.el.parser.ELParser.Multiplication(ELParser.java:714)
org.apache.el.parser.ELParser.Math(ELParser.java:634)
org.apache.el.parser.ELParser.Compare(ELParser.java:446)
org.apache.el.parser.ELParser.Equality(ELParser.java:340)
org.apache.el.parser.ELParser.And(ELParser.java:284)
org.apache.el.parser.ELParser.Or(ELParser.java:228)
org.apache.el.parser.ELParser.Choice(ELParser.java:185)
org.apache.el.parser.ELParser.Expression(ELParser.java:177)
org.apache.el.parser.ELParser.NonLiteral(ELParser.java:1183)
org.apache.el.parser.ELParser.ValuePrefix(ELParser.java:1019)
org.apache.el.parser.ELParser.Value(ELParser.java:968)
org.apache.el.parser.ELParser.Unary(ELParser.java:950)
Solution for me was easy and simple
Adding this to the vm arguments
-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true
Nov 20, 2011
Override pom from command line
Hi Everyone,
I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.
Solution:
Define a property like this
<skip.my.tests>true</skip.my.tests>
Add it to the <properties> section
In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>
This is the solution for all the thing you want to override from command line.
Hoped it helped,
Dor
I had this scenario but my solution catch them all.
I had this <skipTests>true</skipTests> in my pom.
Trying to "mvn -DskipTests=false test" => not good, it doesn't override the pom.
Solution:
Define a property like this
<skip.my.tests>true</skip.my.tests>
Add it to the <properties> section
In the above example, i will replace it and it will look like this <skipTests>${skip.my.tests}</skipTests>
This is the solution for all the thing you want to override from command line.
Hoped it helped,
Dor
Sep 21, 2011
getResponseCode() Illegal character in URL
2 Hours i have spent on this.
String key = base64encode(password);
What's solved me the issue was this "key.replaceAll("\r\n?", "");"
Hoping that it will assist you too and save you the time i already spent,
(The base64encode method based on apache-commons base64encoder)
Dor
String key = base64encode(password);
What's solved me the issue was this "key.replaceAll("\r\n?", "");"
Hoping that it will assist you too and save you the time i already spent,
(The base64encode method based on apache-commons base64encoder)
Dor
Sep 18, 2011
FTPClient completePendingCommand() deadlock stuck freeze
It's strange, that this method hangs or freeze for this method.
I used commons-net 2.2v, don't know if it already solved at 3v. But, i have found that my problem was:
Executing this method before closing the input stream.
Switching them, first closing the input stream and then running completePendingCommand() solved the issue.
+
There are some cases where this method isn't really necessary, beware.
Hoped it helped,
Dor
I used commons-net 2.2v, don't know if it already solved at 3v. But, i have found that my problem was:
Executing this method before closing the input stream.
Switching them, first closing the input stream and then running completePendingCommand() solved the issue.
+
There are some cases where this method isn't really necessary, beware.
Hoped it helped,
Dor
Jan 20, 2011
Invalid row number (100039) outside allowable range (0..65535)
Lately i got this error while using apache poi
version 3.2 but it's still exists in 3.7:
"the poi 3.2 or 3.7 version support till 65535 max rows not more"
Actually, excel 2003 maximum rows in a sheet is 65535, but since than in version like in excel 2007 and excel 2010
the maximum rows per sheet is around 1m. But apache poi still doesn't support this amount of rows.
Meaning, that you need to split into several sheets
Something like this:
if (i>65535){ // or some other number or condirion
// create a new sheet
sheet = workBook.createSheet();
i = 1;
}
Hoped that it helps,
Dor
Dec 30, 2010
create / install new subversion (svn) server as a windows service
Not once i have been asked how to create a new service for the subversion aka svn server in windows.
So, the solution in command line is very simple:
sc create Subversion binpath= "c:\SVN\svn-win32-1.6.2\bin\svnserve.exe --service --root c:\SVN\Repository" displayname= "Subversion" depend= Tcpip
displayname = can be anything
Hoped i helped a bit,
Dor
So, the solution in command line is very simple:
sc create Subversion binpath= "c:\SVN\svn-win32-1.6.2\bin\svnserve.exe --service --root c:\SVN\Repository" displayname= "Subversion" depend= Tcpip
displayname = can be anything
Hoped i helped a bit,
Dor
Nov 23, 2010
Websphere admin console doesn't work on MyEclipse
Hi All,
Working with MyEclipse Blue Edition and WAS 6.1, Suddenly WAS admin stopped from being working on MyEclipse and throwing exceptions in the console.
Solution for this problem, by steps:
1) Find the directory named "optionalLibraries\Apache\Struts\1.2.4"
2) Copy "commons-validator.jar" into your "lib\ext" directory.
3) Stop the server and Start it again.
Hoping that it will help you also if this is your case.
Dor
Working with MyEclipse Blue Edition and WAS 6.1, Suddenly WAS admin stopped from being working on MyEclipse and throwing exceptions in the console.
Solution for this problem, by steps:
1) Find the directory named "optionalLibraries\Apache\Struts\1.2.4"
2) Copy "commons-validator.jar" into your "lib\ext" directory.
3) Stop the server and Start it again.
Hoping that it will help you also if this is your case.
Dor
Exception in thread "main" Java.lang.NoSuchFieldError: TRACE
Exception in thread "main" Java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:622)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.cognizant.util.ServiceHelper.initQueueService(ServiceHelper.java:153)
at com.cognizant.main.StartUp.(StartUp.java:28)
at com.cognizant.main.StartUp.main(StartUp.java:46)
solution
Upgrade your log4j version to 1.2.12 or higher in your classpath.
at org.jboss.logging.Log4jLoggerPlugin.isTraceEnabled(Log4jLoggerPlugin.java:85)
at org.jboss.logging.Logger.isTraceEnabled(Logger.java:122)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:622)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.cognizant.util.ServiceHelper.initQueueService(ServiceHelper.java:153)
at com.cognizant.main.StartUp.(StartUp.java:28)
at com.cognizant.main.StartUp.main(StartUp.java:46)
solution
Upgrade your log4j version to 1.2.12 or higher in your classpath.
ParserInitializationException: Error initializing parser
Using apache commons net,
If you are trying to connect using FtpClient but it fails with the above exception.
Try this solution:
ftpClient.configure(ftpClientConfig);
FTPClientConfig constant list includes many types. For me, this type works.
Dor
If you are trying to connect using FtpClient but it fails with the above exception.
Try this solution:
ftpClient.configure(ftpClientConfig);
FTPClientConfig constant list includes many types. For me, this type works.
Dor
Subscribe to:
Posts (Atom)