Jasmine kaur

Ranch Hand
+ Follow
since Nov 25, 2003
na
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 Jasmine kaur

I need help to get the output in a tabular format using hadoop framework as we have used that only .

Thanks

5 years ago
Hi Team,

Thanks for responding ,yes it is related to Hadoop as we have used Hadoop framework to achieve this by making class Map and reducer
but I need help as I mentioned in a table format.Please help on this how to his achieve this using Hadoop framework.


Thanks once again for he help
5 years ago
Hi All,


I need help as we are processing files which is having a size less than 1MB and we are getting an output in one file but
we need an output in a tabular form like this .
Here Field1 and Field2 are headers and then their respective values should come in another line by reading each respective file, example given below.

Input file1

field1 : data
field2 : data
field3 : data

Input file 2

field1 : data
field2 : data
field3 : data

final Output

Field1 Field2 Field3
Data Data Data ( File 1 Data)
Data Data Data (File 2 Data)
Data Data Data (File 3 Data)


5 years ago
Hi Vinod ,


Thanks and If Im correct I need to put this in persistence.xml file and this seeting will help me to print the query which is created at runtime by JPA.
Please correct me ifIm wrong.

Thanks alot
Hi All,



In our project we have used EJB3.0 and JPA and while working on this we need to see the sql queries formed by JPA
which can help us what joins are getting establish and locks so that we can improve our query, so I need to know
how to see the sql query formed by JPA at run time .
These are the queries

@NamedQuery(name = DetectionEvent.RETRIEVE_DE_LIST_FOR_REPROCESSING, query = "SELECT DISTINCT de "
+ " FROM DetectionEvent de " + "WHERE de.reprocessDE = '" + LrucConstants.DB_YES
+ "' ORDER BY de.chargePointId, de.captureDatetime ASC"),

and this is a method


public List<SummaryRecord> getSRsRequiringRejection(Timestamp pStartTime, Timestamp pEndTime)
{
logger.trace("Entry:getSRsRequiringRejection");
// UC-CORE-ASS002 Reject Detection event
// This retrieves a list of SummaryRecord entities from the
// SUMMARYRECORD
// table in the EventAndVURDAO where the ‘requiresRejection’ flag is
// set.
Query query = mEntityManager.createNamedQuery(SummaryRecord.RETRIEVE_SUMMARY_RECORD_LISTS);
query.setParameter(SummaryRecord.PARAM_START_TIME, pStartTime);
query.setParameter(SummaryRecord.PARAM_END_TIME, pEndTime);
List<SummaryRecord> summaryRecord = query.getResultList();
return summaryRecord;
}
Need to see complete query which is getting generated at runtime so that I can see locks and joins on the table so that w ecan make improvements ..
Please tell us how to acheive this in JPA.

Thanks in advance.


Hi All,

Thanks for helping me , well I need help to resolve this exception which I'm getting.
application.xml file is given below. I have written a class which ahs a mani method and method is also given below.

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:aop="http://www.springframework.org/schema/aop";
xmlns:tx="http://www.springframework.org/schema/tx";
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">;

<bean id="logFactory"
class="com.ibm.ruc.utilities.logging.LogFactory"
factory-method="getInstance"/>

<bean id="exceptionResourceBundle" class="com.ibm.ruc.coreit.utilities.ResourceBundleAdapter">
<constructor-arg>
<value>exception.properties</value>
</constructor-arg>
</bean>

<bean id="exceptionHandler" class="com.ibm.ruc.utilities.exception.ExceptionHandler" factory-method="getInstance">
<property name="resourceBundle" ref="exceptionResourceBundle"/>
</bean>

<!-- CACHE specification -->

<bean id="systemPropertiesCAO"
class="com.ibm.ruc.utilities.cache.cao.PropertyCAO">
<property name="propertiesFile" value="system"/>
</bean>

<bean id="systemPropertiesCache"
class="com.ibm.ruc.utilities.cache.ConfigurationCache">
<constructor-arg ref="systemPropertiesCAO"/>
<property name="name" value="systemPropertiesCache"/>
<property name="logFactory" ref="logFactory"/>
</bean>

<bean id="errorPropertiesCAO"
class="com.ibm.ruc.utilities.cache.cao.PropertyCAO">
<property name="propertiesFile" value="exception"/>
</bean>

<bean id="errorPropertiesCache"
class="com.ibm.ruc.utilities.cache.ConfigurationCache">
<constructor-arg ref="errorPropertiesCAO"/>
<property name="name" value="errorPropertiesCache"/>
<property name="logFactory" ref="logFactory"/>
</bean>

<!-- Configuration Manager Specification -->

<bean id="configurationManager"
class="com.ibm.ruc.utilities.cache.ConfigurationManager"
factory-method="getInstance">
<property name="caches">
<map>
<entry key="systemPropertiesCache"
value-ref="systemPropertiesCache"/>
<entry key="errorPropertiesCache"
value-ref="errorPropertiesCache"/>
</map>
</property>
</bean>

<bean id="fileFactory" class="com.ibm.ruc.coreit.utilities.file.SimpleFileFactory"/>

<bean id="ObjectTranslator" class="uk.gov.tfl.lruc.batch.vehicle.oxm.ManualObjectTranslator">
<property name="logFactory" ref="logFactory"/>
<property name="exceptionHandler" ref="exceptionHandler"/>
<property name="configurationManager" ref="configurationManager"/>
<property name="loggerName" value="BatchVehicleExport"/>
</bean>

<bean id="Application" class="uk.gov.tfl.lruc.batch.vehicle.CoreBatchVehicleListApp">
<property name="logFactory" ref="logFactory"/>
<property name="exceptionHandler" ref="exceptionHandler"/>
<property name="configurationManager" ref="configurationManager"/>
<property name="loggerName" value="BatchVehicleExport"/>
<property name="fileFactory" ref="fileFactory"/>
<property name="objectTranslator" ref="ObjectTranslator"/>
</bean>

</beans>
-----------------------------------


public static void main(String[] pArgs)
{
try
{
ApplicationContext ctx = new ClassPathXmlApplicationContext(SPRING_CONTEXT_FILE);

CoreBatchVehicleListApp app = (CoreBatchVehicleListApp) ctx.getBean(APPLICATION_BEAN_NAME);

// get the key framework instances if any of these are missing we will get a runtime exception

app.getLogger();
app.getExceptionHandler();
app.getRequiredCache(SYSTEM_PROPERTIES_CACHE_NAME);
app.getRequiredCache(ERROR_PROPERTIES_CACHE_NAME);

if (null == app.mFileFactory)
{
throw new IllegalStateException("Please supply an appropriate FileFactoryInterface implementation");
}

if (null == app.mObjectTranslator)
{
throw new IllegalStateException("Please supply an appropriate OXMHandlerFactoryInterface implementation");
}

// Everything checks out if we get here - start processing

app.run();
}
catch (Exception e)
{
// Something has stopped processing. Exit with an abnormal termination code - we can't be sure that everything
// is in place so terminate with minimal support i.e we can't use the logger or exception handler

e.printStackTrace();

System.exit(ABNORMAL_TERMINATION_IN_INITIALISATION);
}
}
9 years ago
Hi All,

I'm trying to run class having a below method but getting an exception while running. I have check but wnat to know what is wrong so that I make necessary correction to fix this exception.
SPRING_CONTEXT_FILE: ist is a string variable pointing to application.xml file.

public static void main(String[] pArgs)
{
try
{ System.out.println(" starting ");
ApplicationContext ctx = new ClassPathXmlApplicationContext(SPRING_CONTEXT_FILE);
System.out.println("before applicationbean name");
CoreBatchVehicleListApp app = (CoreBatchVehicleListApp) ctx.getBean(APPLICATION_BEAN_NAME);
System.out.println("After applicationbean name");
// get the key framework instances if any of these are missing we will get a runtime exception
------------------------------------------------------------------------------------------------------------------------------------

starting
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exceptionHandler' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(AccessController.java:224)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at uk.gov.tfl.lruc.batch.vehicle.CoreBatchVehicleListApp.main(CoreBatchVehicleListApp.java:479)
Caused by: java.lang.NullPointerException
at org.springframework.core.GenericTypeResolver.getTypeVariableMap(GenericTypeResolver.java:144)
at org.springframework.core.GenericTypeResolver.resolveReturnType(GenericTypeResolver.java:93)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType(GenericTypeAwarePropertyDescriptor.java:58)
at java.beans.PropertyDescriptor.setWriteMethod(Unknown Source)
at java.beans.PropertyDescriptor.<init>(Unknown Source)
at org.springframework.beans.GenericTypeAwarePropertyDescriptor.<init>(GenericTypeAwarePropertyDescriptor.java:47)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:250)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:380)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470)
... 14 more


Thanks


9 years ago
The validate () method doesnt exist in servlet API rather these methods are from 3rd party like in struts where we can use the validate framaework and can the files which you have mentioned .

In validator-rules .xml we define the validation condition of the fields of our form and call then call
validate method to validate form in struts validator_rules.xml in our action class. We need to give path of all these configuration files in our web.xml file.

See some example of struts validator and runt that example and you will be able to understand well.

10 years ago
Hi All,

Thanks to all and pradeep , well you have undertsood correctly that is what I want to achieve,. I will implement as in my UI I need to delete services on the basis of their serviveid . User select services and delete selected selected services on the basis of service id so i will implement as you advise me.

I will update you for the same.

Thanks to all once again for helping me out.
10 years ago
JSF
Hi All,

I am working on a project where we are storing user selection in cart if the usre wants to delete the selected item. To achieve please assit me
how to achieve this by using an appropriate jsf componenet . I tried using <h:selectmanycheckbox > but couldnt achieve this.
If user see remove image and then user should be able to dlete that respective selected item so how to achieve this any suggestion will be welcome.

Thanks in advance.
10 years ago
JSF
Hi All,

In my application I need to show dynamic services and this dynamic services should also show default services in the list.

So user will see some of the selected checkbox which will indicates that these are default services which he will get and rest of the services will be with unchecked checkbox.
So Iam using <h:selectManyCheckbox > for this and I am using two list to achieve this the code is given below.

A) value="#{cartBean.highendSelectedArrList} this is a default service_id list which will show the checkbox selected as checked
whereas <f:selectItems value="#{cartBean.highendservices}" /> highendservices is a list which has list of all the service lis.


<h:selectManyCheckbox id="highend" value="#{cartBean.highendSelectedArrList}" border="1" layout="lineDirection">
<f:selectItems value="#{cartBean.highendservices}" />

</h:selectManyCheckbox>


My question is that can you suggest the way so that I dont need to make two list rather one list I can show the use default services for him as well as rest of the services then user make selection and can retrieve the values easily.


Thanks in advance
10 years ago
JSF
Thanks for respodning let me try teh tag which you told me and I will update you for the same.

10 years ago
JSF
Thanks for responding . well what ever you have told I have already done that and after that I posted question.

Thanks once again
10 years ago
JSF
Hi EveryBody,

Iam new to JSF and need help which is as follows.

We are developing an application where we have use JSF at UI and Iam getting data from database and
I want to show this data in the form of list and want to pass this dynamic list to create a dynamic checkbox.

user will make selection from this list. I need help how to iterate this list in jsf , which jsf tag should i use so that i can pass this dynamic list
to checkbox and dynamically checkbox creation will take place and user will be able to make selection from these checkbox.

Please assist me on this. :
10 years ago
JSF
Hi All,

I need help to guide me as we are migrating a documentum application to java platform. This application is an intranet application
which handles IT request related to software and hardware queries. Please assist me to design the workflow for thier business logic for thier IT request ticket raising flow. What are the best ways to design workflow in java so that appplication can migrate well on java platform. We are using JSF at UI level and this application is for 3000 users.

Thanks in adavance.