Deena Jeyachandran

Greenhorn
+ Follow
since May 24, 2008
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Deena Jeyachandran

Hi David,

Thanks for your reply.
I am confident, that the collection is accessed within the hibernate session. In our application the session is valid for an entire transaction. the code snippet I added was only one method in the transaction.

Hi Guys,

I get the below exception trace when trying to iterate through the Collection retrieve through Hibernate one-to-many mapping

Exception:
org.hibernate.LazyInitializationException: illegal access to loading collection
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java(Compiled Code))
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java(Inlined Compiled Code))
at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java(Compiled Code))

This is a intermittent problem and goes away after every server restart.

We are trying at least to find out the cause of the issue. Could you please give some suggestions of what could go wrong.

Here is what I have already checked.
Checked the AbstractPersistentCollection class source the reason for error.



From this I took that initializing variable is set to true before starting to read a row in the resultset/Collection and set to false after initialized.

So, there should have been a different thread that was accessing the collection at the same time or initializing was left at true even after initialization was complete.

I have googled my best, but could not find a reason.





JDK1.4, Websphere 6.0, Hibernate3

When you define @Resource, you are declaring the resource reference to use directly in you class. So I think you don't there is need for jndi lookup. You can use it as a instance variable directly.

If I am correct, I have a question.
If you are declaring the value of variable directly in the class, why do you want to use Resource annotation. It could be a simple instance variable.




Please disregard my last post. Thats incorrect.
Your resource type is declared as int primitive. Could you try Integer type?
Check this link posted Mar 5, 2010 by Head first Editor. HF EJB 3 delayed indefinitely :-(

http://answers.oreilly.com/topic/1143-head-first-ejb-3-0/
In runServer.bat, the path of Server class is incorrect
Change it to org.hsqldb.server.Server and then run. It works
12 years ago
Hi All,

Our SSL was about to expire and so recently updated our SSL certificate recently to change the validity for next one year.

After that, Many of our company's clients have reported this error, when they try to open our SSL URL on their Browser(IE & Firefox).

This error does not happen to me or other users within the company network. I checked with few of my friends outside my company network, but they also did not get the problem.

I thought it might be a problem with the Clients computer.
I tried to fix the problem over phone with the following

1. Check date and time on computer and the certificate.
2. Check URL domain matching with the Issued to name in the certificate
3. Checked old certificate exists in Internet Options->Content
4. Install the new certificate manually in the browser through view certificate option
5. Clear Cache state in IE

The above steps did not solve the problem

I am suspecting there could be a problem with the certificate being implemented. But not sure if this could really be the problem as it does not occur for everyone.

Appreciate any help to fix the problem

Regards,
Deena

12 years ago
Hi All,


I am working on a Web application and the app is a client to a webservice.
I am using Axis2-v1.3 with XML Beans for the client. Web sevice is host by 3rd party.
I have deployed my web application in Weblogic81 SP4

Below is the request XML generated at my client end. I have given the stack trace at the end

[Jan 06 16:58:16] - <updateCustomer xmlns:ns="http://xxxxx.xx..xxx">
<userToken>
<AccessScope>3</AccessScope>
<Groups>
<String>bb</String>
</Groups>
<UserId>mth08</UserId>
</userToken>
<customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://xxxxx.xx..xxx">
<aaaa>test</aaaa>
<bbbb/>
<ccc>W</ccc>
<ddd/>
<eee>2</eee>
<fff>hugh</fff>
<ggg>jackman</ggg>
<hhh/>
<iii/>
<jjj/>
<kkk>true</kkk>
<lll/>
<ns:mmm>
<ns:nnn>12234</ns:nnn>
<ns:ooo>36355</ns:ooo>
<ns:ppp>@#@</ns:ppp>
<ns:qqq>2009-01-07</ns:qqq>
</ns:mmm>
<rrr/>
</customer>
</updateCustomer>

1. When I call stub.update(), the exception is thrown. The exception is thrown at client side itself before reaching the service.

2. Exception always occurs for the above sample data.

3. The web service call occurs successfully, if I do one of the changes given below
a. If I increase the number of characters to node aaa from test to testabcd, the service call happens successfully.
b. keeping the sample as such, If I change the fff & ggg nodes to some other name it works. But not always, it does fail for some names.
c. Keeping the sample as such, If I add value to one of the blank fields, it works.

4. Exception never occurs when I deploy the web-app in my local computer. Exception always occurs for the above sample data, when I deploy the web app in a remote server. I have tried re-deplyment or re-start of server thinking it might be due to some objects not getting garbage collected. But the exception still occurs when i deploy in a remote server

Have been struggling with this problem for quite a while. I would really appreciate any help in this regard.

Stack Trace:

[Jan 07 13:30:37] - StAXOMBuilder.java-org.apache.axiom.om.impl.builder.StAXOMBuilder.next
[Jan 07 13:30:37] - OMStAXWrapper.java-org.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode
[Jan 07 13:30:37] - OMStAXWrapper.java-org.apache.axiom.om.impl.llom.OMStAXWrapper.<init>
[Jan 07 13:30:37] - OMElementImpl.java-org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReader
[Jan 07 13:30:37] - OMElementImpl.java-org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReaderWithoutCaching
[Jan 07 13:30:37] - OMSerializerUtil.java-org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream
[Jan 07 13:30:37] - OMElementImpl.java-org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize
[Jan 07 13:30:37] - OMElementImpl.java-org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume
[Jan 07 13:30:37] - SOAPEnvelopeImpl.java-org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally
[Jan 07 13:30:37] - SOAPEnvelopeImpl.java-org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize
[Jan 07 13:30:37] - OMElementImpl.java-org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume
[Jan 07 13:30:37] - OMNodeImpl.java-org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume
[Jan 07 13:30:37] - SOAPMessageFormatter.java-org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo
[Jan 07 13:30:37] - AxisRequestEntity.java-org.apache.axis2.transport.http.AxisRequestEntity.writeRequest
[Jan 07 13:30:37] - EntityEnclosingMethod.java-org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody
[Jan 07 13:30:37] - HttpMethodBase.java-org.apache.commons.httpclient.HttpMethodBase.writeRequest
[Jan 07 13:30:37] - HttpMethodBase.java-org.apache.commons.httpclient.HttpMethodBase.execute
[Jan 07 13:30:37] - HttpMethodDirector.java-org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry
[Jan 07 13:30:37] - HttpMethodDirector.java-org.apache.commons.httpclient.HttpMethodDirector.executeMethod
[Jan 07 13:30:37] - HttpClient.java-org.apache.commons.httpclient.HttpClient.executeMethod
[Jan 07 13:30:37] - HttpClient.java-org.apache.commons.httpclient.HttpClient.executeMethod
[Jan 07 13:30:37] - AbstractHTTPSender.java-org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod
[Jan 07 13:30:37] - HTTPSender.java-org.apache.axis2.transport.http.HTTPSender.sendViaPost
[Jan 07 13:30:37] - HTTPSender.java-org.apache.axis2.transport.http.HTTPSender.send
[Jan 07 13:30:37] - CommonsHTTPTransportSender.java-org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons
[Jan 07 13:30:37] - CommonsHTTPTransportSender.java-org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke
[Jan 07 13:30:37] - AxisEngine.java-org.apache.axis2.engine.AxisEngine.send
[Jan 07 13:30:37] - OutInAxisOperation.java-org.apache.axis2.description.OutInAxisOperationClient.send
[Jan 07 13:30:37] - OutInAxisOperation.java-org.apache.axis2.description.OutInAxisOperationClient.executeImpl
[Jan 07 13:30:37] - OperationClient.java-org.apache.axis2.client.OperationClient.execute
[Jan 07 13:30:37] - CSMVOUIServicesStub.java-au.com.qantas.csmvo.pmaui.services.CSMVOUIServicesStub.updateCustomerContact
[Jan 07 13:30:37] - SectorFunctionServiceClient.java-au.com.qantas.csmvo.pmaui.serviceclients.SectorFunctionServiceClient.updateCustomerContact
[Jan 07 13:30:37] - CustomerContactUpdateAction.java-au.com.qantas.csmvo.pmaui.actions.CustomerContactUpdateAction.process
[Jan 07 13:30:37] - UIBaseAction.java-au.com.qantas.csmvo.pmaui.actions.UIBaseAction.execute
[Jan 07 13:30:37] - RequestProcessor.java-org.apache.struts.action.RequestProcessor.processActionPerform
[Jan 07 13:30:37] - RequestProcessor.java-org.apache.struts.action.RequestProcessor.process
[Jan 07 13:30:37] - ActionServlet.java-org.apache.struts.action.ActionServlet.process
[Jan 07 13:30:37] - ActionServlet.java-org.apache.struts.action.ActionServlet.doPost
[Jan 07 13:30:37] - HttpServlet.java-javax.servlet.http.HttpServlet.service
[Jan 07 13:30:37] - HttpServlet.java-javax.servlet.http.HttpServlet.service
[Jan 07 13:30:37] - ServletStubImpl.java-weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
[Jan 07 13:30:37] - ServletStubImpl.java-weblogic.servlet.internal.ServletStubImpl.invokeServlet
[Jan 07 13:30:37] - ServletStubImpl.java-weblogic.servlet.internal.ServletStubImpl.invokeServlet
[Jan 07 13:30:37] - WebAppServletContext.java-weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
[Jan 07 13:30:37] - AuthenticatedSubject.java-weblogic.security.acl.internal.AuthenticatedSubject.doAs
[Jan 07 13:30:37] - SecurityManager.java-weblogic.security.service.SecurityManager.runAs
[Jan 07 13:30:37] - WebAppServletContext.java-weblogic.servlet.internal.WebAppServletContext.invokeServlet
[Jan 07 13:30:37] - ServletRequestImpl.java-weblogic.servlet.internal.ServletRequestImpl.execute
[Jan 07 13:30:37] - ExecuteThread.java-weblogic.kernel.ExecuteThread.execute
[Jan 07 13:30:37] - ExecuteThread.java-weblogic.kernel.ExecuteThread.run
12 years ago

You can use html:submit tag for search button and html:cancel tag for others. Struts will bypass validation when those buttons are pressed.



I understand this will work, if I use the regular Struts Action. If I use with LookupDispatchAction, I get the error "does not contain handler parameter named parameter". I think it is because LookupDispatch expects property in submit to match the parameter field value defined in struts config. But I have left the property field blank as adviced in html:cancel tag description
"Property - Name of the request parameter that will be included with this submission, set to the specified value. WARNING - If you set this attribute to a value other than the default, this will NOT be recognized as the cancel key by the Struts controller servlet or the Action.isCancelled() method. You will need to do your own cancel detection."
The struts API for Lookup dispatch action quotes
"If the submit was cancelled (a html:cancel button was pressed), the custom handler cancelled will be used instead. "

Could you suggest, what I can do?
[ December 23, 2008: Message edited by: Deena dayal Jeyachandran ]
12 years ago
Hi All,

I have page with multiple buttons.

One To perform search based on criteria and bring up a list of records matching the criteria. and the few buttons to open a new page based on the selected record from the list.

Is it advisable to use one Form or two Action forms for this page?

If a single form, should I go for Action/LookupDispatchAction?

I would prefer a single form and Action.
If I set validate="true" for the action mapping, validation runs no matter what button I click.

I need validtion (using validation.xml) to run only, when I do the search using the criteria. But if the user is clicking any of the other buttons to go to a new page, validation should not run. Is there any way I can do this with just one form?

Thanks in advance.

Deena
12 years ago
If the user presses back button on browser window, is there a way to expire the session of user.
Your suggestion worked. Thanks.
13 years ago
Hi,

I am trying to read a properties file in Struts Action class.
The location of the properties file is
WEB-INF/classes/function.properties.

When I use
new FileInputStream("function.properties")
I get File Not found Exception.

Please help.

Thanks,
Deena
13 years ago