Pious Francis

Greenhorn
+ Follow
since Jun 25, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Pious Francis

I am uploading a file using the struts2 file uploder. In struts.xml I set struts.multipart.maxSize to 1 MB. If the file limit exceeds after import, my form data is reset and all user inputs are appearing as blank (I have some text fields along with the file upload control). In the logs I am getting the error 'The request was rejected because its size exceeds the configured maximum' which is expected. I am printing the action errors in JSP and this message is printed in the JSP , which is again as expected.
But why my form data is getting reset?

Another point is if I set maxSize in the fileUpload interceptor it works fine, I am getting errors message with form data kept as it is. The issue is only with the struts2 struts.multipart.maxSize setting in the struts.xml. According to my observation struts.multipart.maxSize takes precedence than the interceptor maxsize setting, so I need to set a upload limit in struts.multipart.maxSize.
And other xml basesd struts validations are working fine for me, where I get validation errors printed on page, but form data is not lost after validation run.

Anybody faced this issue .. Can somebody help to resolve this? Any suggestions appreciated.....
13 years ago
Thank you
I cleared the problem by setting the auto commit back to false before closing the connection and it worked and the RollBack exception is now no more.

Yet the follwing message is still there:

ConnectionFac I J2CA0122I: Resource reference jdbc/dsOraXA could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]

isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

I read the IBM link
http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rdat_jnditips.html

Does it mean that while using a user specified JNDI name to look up the
data source such message can be expected?
is there any way to suppress this log message?

I'm using the JNDI name as jdbc/dsOraXA, and calling this like
javax.sql.DataSource DSN =(javax.sql.DataSource) initialContext.lookup("jdbc/dsOraXA");

I also tried
javax.sql.DataSource DSN =(javax.sql.DataSource) initialContext.lookup("java:comp/env/jdbc/dsOraXA");

But both failed!!. The latter gave me a Name not found Exception!

Thanks for any help
Pious
20 years ago
Hi All,

I'm getting the following error message frequently in the WAS log.

LocalTranCoor E WLTC0033E: Resource jdbc/dsOraXA rolled back in cleanup of unresolved LocalTransactionContainment

LocalTranCoor E WLTC0032E: One or more resources rolled back. An unresolved LocalTransactionContainment had an unresolved action of rollback.

WebAppTransac E WTRN0043I: LocalTransaction rolled-back due to setRollbackOnly.

which is always preceeded by the following message:

ConnectionFac I J2CA0122I: Resource reference jdbc/dsOraXA could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

I'm Using JDBC,WAS 5.0,Struts with Oracle 8i.
Configured the datasource for OracleXADataSource,
and given the JNDI name jdbc/dsOraXA.
And set the AutoCommit to False in JDBC. For each transaction I'm explicitly giving commit() and rollback() statements.

Every thing works properly,but getting these error messages frequently in the Websphere log(SystemErr.log).

Thanks in Advance
Pious
20 years ago
Hi All,
How can i call a command like,sqlldr,from Oracle stored procedure. My purpose is to load a text file to some Oracle tables using Sql Loader.

I'm Using Java/Struts/Oracle 9i.

Thanks
Pious
20 years ago
Thanks All
Infact suggestion from Nicola Guy will work if i say resource=false and message as the key in validation.xml. Then there is no use from the custom bundle.

and it's known that Struts 1.2 solves this problem with a new 'bundle' attribue in the validation.xml.

Any ideas....

Thanks
Pious
20 years ago
I've already done this in struts-config.xml. But still the validator ignores the custom bundle.

Pious
20 years ago
Hi All,
I'm using struts 1.1 validation frame work with Websphere 5. The follwing tag is configured in the validation.xml file.
<form name="loginForm">
<field property="employee_id" depends="required">
<arg0 name="required" key="loginform.employee_id"/>
</field>
</form>
I am using different resource bundles. I want the validator to take 'loginform.employee_id' key from my custom Resource Bundle,say myAppMessages.properties, which is in the /AppServer/resources directory which is also in the classpath.
I've given the entries :
errors.required={0} is required.
loginform.employee_id=Employee Id
in the custom resource bundle.

But the validator takes only the value of 'errors.required' and not of 'loginform.employee_id' from the property file and the error message is
' required'. If I'm giving 'loginform.employee_id' in the ApplicationResource.properties then the right message "Employee Id is required" will come.

Does it mean that the key 'loginform.employee_id' should be taken only from the AppicationResources.properties.

How can I make the validator to read the key from my custom resource bundle?

Thanks in Advance
Pious
20 years ago
I am using Struts-Layout tags(http://struts.application-servers.com)
in my application. By default the configuration file for using the tag is Struts-Layout_default.properties and it shold be under WEB-INF/classes directory. I'm thinking of moving the property file to another location and giving it another name,say myapp_struts-layout.properties. It iss possible to move it to another folder in the class path. But I have no idea on renaming the same.

Anybody please help me..

I'm using struts 1.1 / Websphere

Thanks

Pious
20 years ago
I changed the DOCTYPE definition in my web.xml from

< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/dtd/web-app_2_2.dtd">;

to

< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">;
then I rebuilt the EAR

and it Worked.

And I would like to know the regular practice of converting J2EE 1.2 level application to J2EE 1.3 level in WAS 5.

Thanks
20 years ago
I'm getting the connection from a class,a Connection Manager class, invoked from the struts Action class.

Thanks
20 years ago
I am getting the following error while connecting to the database using the datasource created in websphere.
[Root exception is java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet]

I'm using WAS 5/Struts/Oracle.
Please help me to know about creating EAR with J2EE 1.3 level and deploying it on WAS 5.

Thanks in advance
20 years ago