Naresh Daswani

Greenhorn
+ Follow
since Mar 02, 2006
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 Naresh Daswani

Hi All,

Is it possible in Spring framework, to expose group of methods in Configuration XML so these methods are available in all the controllers of application.

For example: I have a class TestUtil and in that there is a method getStackTrace(). Can I expose this method in Spring configuration file in any way so that in all the controllers I can directly say "getStackTrace()" that is making this method exposed in session.

Any help would be greatly appreciated.

Thanks,
Naresh Daswani
Hi,

I am running an web application. All of my jsps are accessible except one. When I try to access this jsp an error occurs and my server stops. giving error that java.exe has encountered an error and is going to shut down.

A pop window of microsoft for sending the error report pops up.

please help.

Thanks and regards
Naresh Daswani
15 years ago
Hi Jeanne,

Thanks for your reply.Yes, the latest JS file is there in the exploded war. Browser caching is not the problem as the same is happening on different different machines. One strange thing is when I'm trying to directly download the JS file from the server, it is returning the old JS file.

What could be the reason for this, Does server cache the js files somewhere.

Thanks and regards,
Naresh Daswani
15 years ago
Hi,

I made a war file, every file in this war is latest. But when I'm deploying this war on IBM Websphere 6.0. it is taking one JS file, the old one, which was there in the previous build. What could be the reason for this and how should I resolve this.

Thanks.

Naresh
15 years ago
Thanks Jaikiran...it worked but please could you tell me the reason behind this code...as it is not feasible for me to write full path of the EO file, I want to put simple name IwfFormsinfoEO only... for that what should I do...

Thanks for your help.

Naresh Daswani
yes that file is there...and logs are fine...while building the session factory there is no problem..

while starting the server following is logged

[12/4/06 19:26:43:776 IST] 00000035 Configuration I Mapping file: D:\IWFLatest\uiConnect\WebContent\WEB-INF\classes\com\tier\uiConnect\hibernate\IwfFormsinfoEO.hbm.xml

[12/4/06 19:26:43:776 IST] 00000035 HbmBinder I Mapping class: com.tier.uiConnect.hibernate.IwfFormsinfoEO -> IWF_FORMSINFO

this specifies the configuration is fine..

Naresh Daswani
Hi,

I don't have any such hibernate.cfg.xml file, I have defined the things in another xml file of spring in following way..

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.generate_statistics">false</prop>
<prop key="hibernate.autocommit">false</prop>
<prop key="hibernate.connection.datasource">jdbc/uim</prop>
</props>
</property>
<property name="mappingDirectoryLocations">
<list>
<value>classpath:com/tier/uiConnect/common/code/persistence/model</value>
<value>classpath:com/tier/uiConnect/hibernate</value>
</list>
</property>
</bean>

All other files are getting mapped...What is the problem with this file I am not getting...plz help..

Naresh Daswani
Hi All,

I'm using spring with hibernate. The method below is used to fetch the data from oracle database. When executing this method I'm getting error:
*** ERROR: IwfFormsinfoEO is not mapped.
*** ERROR: Invalid path: 'forms.formId'
*** ERROR: Invalid path: 'forms.formDescription'
Invalid Queryorg.hibernate.hql.ast.QuerySyntaxError: IwfFormsinfoEO is not mapped. [Select forms.formId,forms.formDescription from IwfFormsinfoEO forms where forms.formDescription is not null]

public FormsVO[] getSelectNotice() throws BusinessException
{
List codeElements = new ArrayList();
Session session = null;
Transaction tx=null;
try
{
String queryString = "Select forms.formId,forms.formDescription from "+ ConstantsUtil.FORM_TABLE+" forms where forms.formDescription is not null";
session =getSessionFactory().openSession();
Query query = session.createQuery(queryString);
List ls = query.list();
}
catch(Exception e)
{
logger.error("Unknown Exception=" + e);

}
return null;
}

I'm having a constant FORM_TABLE with value 'IwfFormsinfoEO'. and my mapping file is

<hibernate-mapping auto-import="false">
<class name="com.tier.uiConnect.hibernate.IwfFormsinfoEO" table="IWF_FORMSINFO" >

<id name="formId" column="FORM_ID">
<generator class="assigned"> </generator>
</id>

<property name="formDescription" column="FORM_DESCRIPTION" />
<property name="outgoing" column="OUTGOING" />
<property name="recipientType" column="RECIPIENT_TYPE" />
<property name="incoming" column="INCOMING" />
<property name="incomingDocType" column="INCOMING_DOC_TYPE" />
<property name="wiAssignToRoleId" column="WI_ASSIGN_TO_ROLE_ID" />
<property name="daysToCompleteWork" column="DAYS_TO_COMPLETE_WORK" />
<property name="priority" column="PRIORITY" />
<property name="workTypeId" column="WORK_TYPE_ID" />
<property name="thtemplateid" column="THTEMPLATEID" />
<property name="createdBy" column="CREATED_BY" />
<property name="dateCreated" column="DATE_CREATED" />
<property name="modifiedBy" column="MODIFIED_BY" />
<property name="dateModified" column="DATE_MODIFIED" />
</hibernate-mapping>

I'm also having a java class, IwfFormsinfoEO.java which is mapped with the database table via this XML.

Please let me know what mistake I'm doing...Its urgent.
Kindly help.

Naresh Daswani
Hi,

Thanks for the information, I did the same as you mentioned, I returned from my controller

return new ModelAndView("pdfView","pdfBytes",pdfBytes);
where pdfBytes is byte[].

But it gave error no view found for pdfView...I think it was trying to search with internalviewresolver and was trying to find a definition in tiles definition.xml where it did not found a view for pdfView.

Thanks
Naresh Daswani
Hi ,

I did entries like this:
<bean id="beanNameViewResolver" class=
"org.springframework.web.servlet.view.BeanNameViewResolver"/>
<bean id="pdfView" class="com.tier.uiconnect.pdfView" />

As I specified in previous post we are using Internalviewresolver also for jsp view in the same servlet.xml
and from controller I return 'pdfView' , now where I'm commiting mistake.
also when I specified order property of the resolvers, it gave error invalid property.

Thanks
Naresh Daswani
[ June 28, 2006: Message edited by: Naresh Daswani ]
Hi All,

We are using jsp's in our application, but for some specific situation we want the contents to get opened in PDF format. We are using internalviewresolver for jsp combining with tiles. Also I have read that we can BeanNameViewResolver for other views..can anyone tell me complete procedure how should I do that... I tried the same..created a class extending the abstractpdfview made entry for that in servlet.xml. also declared beannameviewresolver bean. But when I return the logical name of view from controller with MV. it gives error no view exist for that logical name...

Thanks
Naresh Daswani
Hi All,

Can any one tell me if I can make an XML document with DOM API according to a specified DTD. How will I be able to read the DTD , Then how will I create XML according to that.

Thanks in advance.

Naresh Daswani.
Hi,

I have opened a new child window from a parent window with the help of javascript...But I can click in parent window's link....how can I check the user from not doing so...that is I want control to be only on child window.

Can anyone tell me the solution...Thanks in Advance.

Naresh Daswani
16 years ago
JSP
Hi,

I have opened a new child window from a parent window with the help of javascript...But I can click in parent window's link....how can I check the user from not doing so...that is I want control to be only on child window.

Can anyone tell me the solution...Thanks in Advance.

Naresh Daswani
Thanks Maddias,

U are right ... there was some problem in my login credentials... I have corrected it and now it is working...thanx for ur reply..

Naresh Daswani
Believe in UrSelf!!