Chengwei Lee

Ranch Hand
+ Follow
since Apr 02, 2004
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Chengwei Lee

I'm trying to have a query that returns all rows if user_id parameter is NULL/empty. The same query should return a specific row if user_id is not NULL/empty. I did some Googling and found the following suggestion. However, when I preview the Jasper report in the iReport, I hit a Oracle missing keyword error. I checked my syntax and it seems to be okay.

Any help is appreciated!

Hi John,

You're right, it should have been move instead of copy! I'll give it a try.

Thanks!
8 years ago
Hi all,

I need to copy old data from a table to another. Old data as in data older than 3 months, there's a column in the table which I can use as reference for time. How do I write the copying code using SQL*PLUS?

I found the following which seems to copy the entire table, so how do I modify it to copy rows older than 3 months?

Also, how do I get this to be automated say once a month?

Any help in pointing me in the right directions is appreciated!

Thanks!

8 years ago
The WLS Out-Of-Box (OOB) settings would normally suffice. Hence, I would instead, recommend that you look into your coding. Endure that your code is not doing the closing pre-maturely and review that the code is not taking exceedingly long time at accessing the database. Also, check your SQL, make sure that they're not the culprits.
8 years ago

Ravi Pavan wrote:The approach you mentioned(Using Proflers ) would be fine before check in into Repository . Now situation is out of my hand .



The OOM is typically caused by a piece of code in your application. So you cannot have a situation whereby it is out of your hand. Even if that piece of code is deployed to production and you found that it is causing the memory leak, you have got to fix it and release it.

Ravi Pavan wrote:Can you please tell me what is Thread Stuck mean ?


A thread will execute a request and by default, WLS will set a pre-determined duration, 600 seconds, as the threshold for the thread to finish the work. If for whatever reasons, the thread doesn't complete its work within 600 seconds, it is deemed to be "stucked" by WLS. This is however, just, an information/warning. There is a possibility that the thread cannot finish its work or it could be that the thread needs more time to finish its work. Looking through the logs, you may find that the thread becomes unstucked later on. Or if you don't, something is wrong. Look into the code that the thread is running, you may have to fix some bad coding or a bad design.
8 years ago
Hi all,

I'm using Axis2. Writing a client code that calls a service to do file upload. Used Axis 2 to generate the codes from the WSDL files. Compilation is ok. During runtime, I get the following exceptions:



Cheers!
[ October 24, 2008: Message edited by: Chengwei Lee ]
9 years ago
This is what I'm doing. The Hibernate logs are still appearing in the console. Is there something wrong?

I'm using the XML instead of properties file. How do I do this?
I'm using WebSphere Application Server v6.1 and Hibernate. Whenever my server starts up, I get the following. I'm using Log4J too. How could I hide or disable these messages?

Thanks!


[9/19/08 16:57:58:812 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC driver: Oracle JDBC driver, version: 10.2.0.3.0
[9/19/08 16:57:58:875 SGT] 00000016 Dialect I org.hibernate.dialect.Dialect <init> Using dialect: org.hibernate.dialect.Oracle10gDialect
[9/19/08 16:57:58:906 SGT] 00000016 TransactionFa I org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory Using default transaction strategy (direct JDBC transactions)
[9/19/08 16:57:58:922 SGT] 00000016 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[9/19/08 16:57:58:922 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic flush during beforeCompletion(): disabled
[9/19/08 16:57:58:937 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic session close at end of transaction: disabled
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch size: 15
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch updates for versioned data: disabled
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Scrollable result sets: enabled
[9/19/08 16:57:58:984 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC3 getGeneratedKeys(): disabled
[9/19/08 16:57:59:000 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Connection release mode: auto
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default batch fetch size: 1
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Generate SQL with comments: disabled
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL updates by primary key: disabled
[9/19/08 16:57:59:047 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL inserts for batching: disabled
[9/19/08 16:57:59:047 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[9/19/08 16:57:59:062 SGT] 00000016 ASTQueryTrans I org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> Using ASTQueryTranslatorFactory
[9/19/08 16:57:59:062 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query language substitutions: {}
[9/19/08 16:57:59:093 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JPA-QL strict compliance: disabled
[9/19/08 16:57:59:093 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Second-level cache: enabled
[9/19/08 16:57:59:109 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query cache: disabled
[9/19/08 16:57:59:109 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory createCacheProvider Cache provider: org.hibernate.cache.NoCacheProvider
[9/19/08 16:57:59:140 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Optimize cache for minimal puts: disabled
[9/19/08 16:57:59:140 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Structured second-level cache entries: disabled
[9/19/08 16:57:59:156 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Statistics: disabled
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Deleted entity synthetic identifier rollback: disabled
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default entity-mode: pojo
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Named query checking : enabled
[9/19/08 16:57:59:343 SGT] 00000016 SessionFactor I org.hibernate.impl.SessionFactoryImpl <init> building session factory
[9/19/08 16:58:00:656 SGT] 00000016 SessionFactor I org.hibernate.impl.SessionFactoryObjectFactory addInstance Not binding factory to JNDI, no JNDI name configured

Hi,

Does anyone has any working experience with OWASP ESAPI (beta) and/or Stinger (alpha) projects?

Are they worth integrating into the existing application to enhance web application security?

The last update for Stinger 2.5 seems to be nearly a year ago (Aug 2007). The ESAPI seems to target and address all the top 10 vulnerabilities.

Any comments/advices are appreciated.

Cheers!
9 years ago

Originally posted by Cameron Wallace McKenzie:
One solution you might look at is Hibernate Shards, which prides itself on its ability to persist data across multiple databases. It hasn't gone GA yet, but it's pretty solid.

-Cameron McKenzie



Actually I did take a look at it. But as you said, it's not GA yet, so its kinda difficult for me to use it for my current work.

So is 2-phase commit the only way out then? Are all steps ok?

Thanks!
I'm using Struts 2.0.11 and Hibernate 3.2.5ga. I'm trying to catch the StateObjectStateException and redirect to a standard JSP page to inform the user that they're attempting to modify a stale record.

So far the optimistic locking mechanism works. What is not working is that the filter that I'm using to demarcate the transaction is destroyed. I couldn't redirect to a standard JSP page.

From the WAS 6.1 console log, it's clear that the exception was thrown. How do I troubleshoot further on what could be destroying the filter or why doesn't the global direct in Struts 2 not work as expected?

I'd configured the same for other exceptions and the redirect works fine.

Any help is appreciated.

Cheers!
Hi all,

I'm using Hibernate 3.2.5 ga, IBM WAS 6.1 and Oracle 10g. I need to access a couple of databases (different schema) for selects and updates. All these need to be within the same single transaction.

Is using two-phase commit the only way to achieve this? If yes, how would I be able to do so using Hibernate and Oracle 10g? Or are there other way out?

Here's what I think would work, please correct me, wherever I'm wrong:

1. Use the Oracle 10g thin driver (use XA driver).
2. Use the Hibernate Configuration class to load multiple configuration files (one for each database).
3. Write all CRUD codes within a single transaction.

Cheers!

A DVO is Data Value Object now more commonly known as DTO, a Data Transfer Object.


Actually, the widely used name is either Value Object (VO) or Data Transfer Object (DTO). VO is considered as the old name for DTO.
9 years ago

I feel that JSP very tough(syntax and all,my perception only).


JSP is should be used only for presentation. It is similar to the normal HTML. If you're using scriplets within the JSP, that is perhaps what is causing your perception of it being tough.

If you use JSTL or other taglibs, you'd probably find that it is rather ok to use JSP.
9 years ago