Debasmita Dash

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

Recent posts by Debasmita Dash

Thanks Carey and Paul for replying.

I will be using the ByteArrayOutputStream further to display the image in html page and have used the FileOutputStream here to check the image content.

Thanks,
Debasmita
12 years ago
Hi All,

I have to fetch an image from the given URL and resize it before displaying the same on the html page.
I am able to do this using java.awt.image.BufferedImage and javax.imageio.ImageIO APIs. But I need to do the same without using java.awt. I tried the following code but it's not working. The output file doesn't contain the image.


Thanks for your help.
12 years ago
Hi All,

I am working in Hibernate for the first time and am stuck with an issue.Please help me with the issue.
I want to insert records into the USER_FAVORITE_LST_T table. In the entity UserFavoriteLstEntity (for USER_FAVORITE_LST_T table) I have List<UserFavoriteClmnEntity> which corresponds to the USER_FAVORITE_CLMN_T table.
Following is the code in UserFavoriteLstEntity.


Following is the UserFavoriteClmnEntity class


In the ManagerImp class I am using the following code to set the UserFavoriteClmnEntity values to the UserFavoriteLstEntity.



In the DaoImpl I am using the following to insert the record into the database.


In the persistence.xml I have the following

I am able to insert record into the USER_FAVORITE_LST_T table with the above.But not able to insert records into the USER_FAVORITE_CLMN_T table it throws exception

javax.persistence.EntityNotFoundException: Unable to find com.bpt.cms.services.clientpack.entity.UserFavoriteClmnEntity with id com.bpt.cms.services.clientpack.entity.UserFavoriteClmnEntityPK@95f7c
at org.hibernate.ejb.Ejb3Configuration$Ejb3EntityNotFoundDelegate.handleEntityNotFound(Ejb3Configuration.java:113)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557)
at org.hibernate.type.EntityType.resolve(EntityType.java:379)
at org.hibernate.type.EntityType.replace(EntityType.java:259)
at org.hibernate.type.CollectionType.replaceElements(CollectionType.java:451)
at org.hibernate.type.CollectionType.replace(CollectionType.java:518)
at org.hibernate.type.TypeFactory.replace(TypeFactory.java:482)
at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:340)
at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:267)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:120)
at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53)
at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:677)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:661)
at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:665)
at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:198)
at $Proxy33.merge(Unknown Source)
at com.bpt.services.utils.AbstractDao.saveOrUpdate(AbstractDao.java:56)
at com.bpt.cms.services.clientpackage.dao.CMSClientPackageDaoImpl.saveUserFavorite(CMSClientPackageDaoImpl.java:217)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy34.saveUserFavorite(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor.invoke(ThrowsAdviceInterceptor.java:126)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy35.saveUserFavorite(Unknown Source)
at com.bpt.cms.services.clientpackage.dao.CMSClientPackageDaoImplTest.testSaveUserFavorite(CMSClientPackageDaoImplTest.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:759)
at org.testng.TestRunner.privateRun(TestRunner.java:592)
at org.testng.TestRunner.run(TestRunner.java:486)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
2010-12-08 19:24:33,120 [main] ERROR com.bpt.cms.services.clientpackage.dao.CMSClientPackageDaoImpl - Error occured in CMSClientPackageDaoImpl - saveUserFavorite method..Unable to find com.bpt.cms.services.clientpack.entity.UserFavoriteClmnEntity with id com.bpt.cms.services.clientpack.entity.UserFavoriteClmnEntityPK@95f7c

Please help me with this.
Thanks in advance
Hi,

I have Eclipse 3.4 installed on my system and getting issues while installing the PMD plugin.
I did the following for the installation.
Started Eclipse and selected Help --> Software Updates… --> Available Software --> Add Site…
Entered the URL "http://pmd.sf.net/eclipse" for Location and checked the checkbox against the URL.
The fetching process didn't complete and I got the following error

No repository found at http://pmd.sf.net/eclipse
Error reading update site http://pmd.sf.net/eclipse.
Connection timed out: connect

I tried with the URL "http://pmd.sourceforge.net/eclipse" too and got the same error.

Then I thought of setting the proxy cofiguration and selected Window --> Preferences --> General --> Network Connections
In Network Connections enabled the Manual proxy configuration and clicked on OK.
Then, again tried with the plugin installaion but got the same error.

Need help to resolve the issue.
Please check the following
Will you please give any idea how to do it....
15 years ago
Following is the jsp code.

15 years ago
Thanks for your concern..
Following are the entries in struts-config file.


By using <html:frame> in DisplayContents.jsp I am not able to get the content of ListOfCabinets.jsp.

15 years ago
I have a jsp page that displays the list of folders. When one of the folder name is selected the contents of that folder is diplayed in another jsp page.


I want that when one of the folder name is clicked, the jsp page that displays the contents of the folder to be shown as a frame in the same jsp page at the right.

Thanks....
15 years ago

I m getting the parent nodes(folders) from the action class as a collection object and retieving it from session object in a jsp page. Those are the parent node for the tree. When one of the folder name is clicked, the contents of that folder are retrieved by another action class as a collection object. These are the child nodes. I have downloaded the tree plugin for struts from
http://sourceforge.net/project/downloading.php?group_id=122295&filename=tree1beta.zip
and have done the needful to use it in my project.
In the jsp page that displays the list of cabinets I have the following code snippet.



To import the tld file I have the following.


But it is not recognizing the path and giving compilation errrors.

Thanks in advance for the help....


15 years ago

Is it possible to get it without using javascript??
Whether Struts layout can be used to get the tree view??
15 years ago
How can I get tree view of folders and contents in my struts project.
I have a jsp page that displays the list of folders and when one of the folder name is clicked the contents are displayed in another page.
But the requirement is that when the folder name is clicked the contents should be displayed in the same page in the form of a tree view.
Not getting any proper idea to do the same.
Thanks in advance....
15 years ago

Thanks for the concern...
Solved the issue....now able to retreive the contents
But further I want to dislay the content of the document through a window that will pop upon clicking on the link.
15 years ago

I have a jsp page that lists the folder names. When a folder name is clicked I have to display the contents of the folder and to do this I need to pass the folder name to the next page when the folder name is clicked.

<html:hidden property="cabinetName" value="<%=collection.getString(attr.getName())%>" onclick="javascript:doSubmit()"/>
<td><a href="DisplayContents.jsp">
<%=collection.getString(attr.getName())%></a></td>

The folder name that is "collection.getString(attr.getName())" need to be passed to the java bean which in turn will pass it to the Action class and I m unable to make it.

Thanks in advance........
15 years ago

Can anyone help regarding this topic....

Thanks in advance...
15 years ago