Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Lam Le

Greenhorn
+ Follow
since Jun 29, 2009
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 Lam Le

Hi all,
I am using oracle kodo to test my JPA application. I did successfully run it in oracle webshop. The kodo jar files I downloaded from http://edelivery.oracle.com/ .However, I do not know why when I run the same application in normal eclipse editor, it causes some problems about fatal user error.

com.bea.dao.DAOException: <1.0.0-SNAPSHOT-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using alias "Application". This could mean that the OpenJPA enhancer or load-time weaver was not run on the type whose alias is "Application". Registered alias mappings: "{Application=null}"
at com.bea.dao.CustomerDAO_Kodo.getAllApplications(CustomerDAO_Kodo.java:42)
at com.bea.dao.Test.main(Test.java:15)

In my src folder, there is one file called license.bea.
Here is my persistence.xml:

<persistence-unit name="unitK">
<provider>
org.apache.openjpa.persistence.PersistenceProviderImpl
</provider>

<class>jpa.Xmltest</class>
<class>jpa.Application</class>
<properties>
<property name="openjpa.TransactionMode" value="local"/>
<property name="openjpa.QueryCompilationCache" value="false"/>
<property name="openjpa.ConnectionDriverName" value="oracle.jdbc.OracleDriver"/>
<property name="openjpa.ConnectionURL" value="jdbc:oracle:thin:@localhost:1521:XE"/>
<property name="openjpa.ConnectionUserName" value="hr"/>
<property name="openjpa.ConnectionPassword" value="hr"/>
</properties>
</persistence-unit>

Thanks for help
Hi all,
I am thinking about a solution that you can upload attachments to server by sending email to specific email address.
Searching in the internet, there is one component can do that but it is not free. I think we can do similar thing.
First we build an application to receive new emails, then get the attachments, save it to a temporary folder and then upload it to server.
I am having problems with receiving email as I do not know how to configure pop3 server.
Here is my code:
Hi all,
I am doing in a project about bea portlet using page flow.
I had problems with dynamic form using netui-data:repeater tag.
I have a variable (jobs) of type java.util.List, each element (job) is a String. I want to populate this list in my form so that i can increase or decrease it if i want.
I did make a similar thing in struts app, I can use logic:iterate tag to iterate this list and use javascript to increase or decrease the size of the list. The trick here is that I use id to change the name of each member:
<logic:iterate name="form" property="jobs" id="job" type="java.lang.String">
this function will populate a list like this
job[0]
job[1]
....
and I can use this function to get list again:
public getJob(in index){
while(this.jobs.size()<=index)
jobs.add(new String());
}
But with bea I can not do this thing. DO in with the netui-data:repeater tag it will generate
jobs[0]
jobs[1]
....
and I can not use function getJob(int index) again.
I know that there is one way in bea to make it worked. That is reloading the page and add a new String to that list. However as I use much javascript, I can not do like that. I have to keep the same page.
I did think about 2 walking arounds:
1. First i define the list in jsp page
<netui-data:getData resultId="jobs" value="{actionForm.jobs}"/>
<%List jobs=(List)pageContext.getAttribute("jobs");%>
I use when I click button "add", it will generate javascript code to add new row, and in the same time i will but 1 netui tag inside javascript code to increase the size of that list
<script>
//function add rows
<%
jobs.add(new String());
%>
</script>
This does not work as the size of the list only increase once.
2. In function getJobs I add new element

public List getJobs(){
this.jobs.add(new String());
return jobs;
}
By doing this, before get any element, it will increase the size of list jobs first. Then later i will cast out Strings which have nothing, just keep elements having content. This works but i do not satisfy with this solution.
3. Im thinking about keep a global variable somewhere (int size=0;) and each time I add a new row, i will call size++ as well. DOing like this, 'size' will have a value which is equal to the size of that list. Then In function reset of the form:
public void reset(ActionMapping mapping, HttpServletRequest request) {
form=new FormBean();
for (int i=0;i<size;i++)
form.getJobs.add(new String());
}
then new Form can be populated. But it still does not work yet.
Can you please hellp me with this issue.
Thanks a lot.
12 years ago