Yuri Savchenko

Greenhorn
+ Follow
since Sep 23, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yuri Savchenko

I'm using

style to log in my java web application. I start tomcat 8.0.21 from startup.bat (project requirement) on windows 10. I can see all the logging in console window, including java.util.logging.Logger.log logging. But I can't see any java.util.logging.Logger.log logging in tomcat standard log files - %tomcat%/logs/catalina.2018-07-31.log and localhost.2018-07-31.log. I cant see all the tomcat logging, but not my web application logging. I need to track some problems with my web application on client machines in production, because I can't model such problems on my local computer. I need to see my logging along with other tomcat logging in %tomcat%/logs/catalina..log. It would be better to to use tomcat logging configuration for all the projects. But using a per-project configuration is acceptable too. I have googled the whole day, but all the recipes I found did not work for me. Please don't offer to use log4j. Using java.util.logging is a project requirement. Here is my %tomcat%/conf/logging.properties file

1 year ago
Hello!
I'm not sure, but it looks like an errata for me.
Page 374. In "Requirements for reduce() Arguments" section

looks like it should be
Hello, Java friends!
I think, there is an errata on
Sybex OCP Java 8 Study Guide -> Appendix A Answers To Review Qestions -> Chapter 8: IO -> Question #21 (page 567)
"D is also incorrect because a serialized empty array is not the same as a null pointer. "
should be
"D is also incorrect because a serialized empty arrayList is not the same as a null pointer. "

Original question is on page 450. Option D looks like "private java.util.List<Zebra> friends = new java.util.ArrayList<>();"
Text under the table on page 206 also says "Only the method name and property name have naming conventions here."
Hi,

Answer to question 9 on page 220 (Review Questions for chapter 4 "Methods and Encapsulation") state that C is correct answer

Athough Table 4.5 on page 206 says that "The method name MUST have a prefix of set/get/is, followed by the first letter of the property in uppercase, FOLLOWED BY THE REST OF THE PROPERTY NAME.", which means that for property named numberWings we must use "getNumberWings", not "getNumWings" methodName.
Is there errata on page 206 (on table) or page 343 (on aswer) ?

Thanks for answers!
Hi,

question 15 of the Assessment Test (page xxxvii) has a code



which will not compile, because more than one class/interface declared as public. Or CanSwim and Amphibian supposed to be declared in different .java file? Anyway I think it would be more clear if CanSwim and Amphibian would have default(package) visibility.
It is disputable issue. But on a real exam I would probably assume it is a valid HenHouse and lose some valuable points.
Hi,

On the assessment test on page xlii (question 14) the correct answers are not including the option C. But replacing blank line with


the application will compile but not produce any output. So option C should be correct to.
Thank you!
Hello!

I'm using JDBC with Oracle XE 11g2, driver ojdbc6.jar (Oracle Database 11g Release 2 (11.2.0.3) JDBC Drivers, JDBC Thin for All Platforms) from oracle.com

I've got a table
<code>
CREATE TABLE ORGANIZATIONS
(
CODE VARCHAR2(4),
DESCRIPTION VARCHAR2(255)
);
</code>

And I'm trying to get all organizations into ResultSet using CallableStatement with stored function:
<code>
CallableStatement cs = connection.prepareCall("{? = call FN_GET_ROWS}");
cs.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR);
cs.execute();
</code>

I've created two types:
<code>
CREATE OR REPLACE
TYPE TEST_OBJ_TYPE AS OBJECT (
CODE VARCHAR2(4),
DESCRIPTION VARCHAR2(255)
)
</code>

and

<code>
CREATE OR REPLACE
TYPE TEST_TABTYPE AS TABLE OF TEST_OBJ_TYPE
</code>

and my function is

<code>
CREATE OR REPLACE
FUNCTION FN_GET_ROWS RETURN TEST_TABTYPE AS V_Test_Tabtype Test_TabType;
BEGIN
SELECT TEST_OBJ_TYPE(A.CODE, A.DESCRIPTION)
BULK COLLECT INTO V_Test_TabType
FROM
(SELECT CODE, DESCRIPTION
FROM ASM.ORGANIZATIONS
) A;
RETURN V_Test_TabType;
END;
</code>

but when I run my program I've got error:

<code>
P LS-00382: expression is of wrong type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
</code>
Thanks, Tim
But the main reason I had decided to transform my project was jsf2.0's ajax support. So I'm looking for solution that would be as simple as possible just to make my application work.
8 years ago
JSF
Hi,
I have an jsf 1.2 web application and I want to transform it to jsf 2.0 web application.
My question is how can I replace the following code
<c:if test="${!myBean.correctAuthorization}">
<jsp:forward page="login.jsp" />
</c:if>
with jsf 2.0 - like
?
Thanks for your help
8 years ago
JSF