I'm new to jpa and openjpa and to this list:
1. how to search the archives? I found
http://mail-archives.apache.org/mod_mbox/openjpa-users/ where I can not
figure out how to search
2. In my first attempt to use openjpa with netbeans/maven I created
classes from an existing mysql db. everything wo
Fay -
Yes! you got it. And that is why java.sql.Timestamp or java.util.Date
values interoperate correctly between timezones without any
adjustments. If I serialize a Date and save it in a file and email you
that file, you will get the same Date but the time with toString() will
be corrected
Hi Adam,
Thank you for the clarification. That makes sense. I also observe that the
milliseconds value from the java Data/Calendar object is the same regardless of
the timezone setting. So we can not actually "persist timestamp in UTC
timezone" in the database with timestamp column, right?
Hello Fay,
no reason to worry, it is logical that the time saved to the database depends on
the default time zone in Java. If you don't set the default time zone, it uses
the time in your operating system.
I did say that the database field TIMESTAMP default is without time zone - you
can spe
To my knowledge, as far as DB2 is concerned, DB2 v9 and below does not have
"timestamp with time zone" data type. The value stored in the DB2 timestamp
column is without time zone information. It is up to the application to
determine the time zone. For example, in my db2 table, I have the follo
Of course java.util.Date is already measured in milliseconds UTC without
regard to TimeZone. So it may seem that you are converting your Date
objects to a different timezone, but that's not the case. This is why
you can use Calendar.compareTo() with objects in different TimeZones.
By definit
By the way, the timezone can also be stored in the timestamp column in the
database, but I think not by default and you must specify TIMESTAMP WITH LOCAL
TIMEZONE or similar, depending on your DB software.
Adam Hardy on 17/03/09 21:55, wrote:
What I understand is that Java will store the date i
What I understand is that Java will store the date in milliseconds from
1970-01-01 UTC. However your operating system and your database will probably
affect what is stored in the database, and then JDBC will work out the correct
millisecond value when it instantiates a date from your database.
Hi Fazi,
I found that by putting
TimeZone.setDefault(TimeZone.getTimeZone("Etc/UTC"));
to make your java app in UTC time zone (see below in testDate), openjpa will
store the dates in UTC in the database.
public void testDate(){
TimeZone.setDefault(TimeZone.getTimeZo
Thanks a lot for your help Milosz!
Miłosz Tylenda wrote:
>
> Hi Andiqo,
>
> That "compatible" property seems promising. I once used it when needed to
> tweak how String parameters are sent to PostgreSQL.
>
> I am not sure what you mean by "directly specify properties". If I want to
> specify
Hi,
I have a Eclipse plugin for OpenJPA available. The plugin can be
downloaded from an update site [1]. Some people have used the plugin and
found it working. It perhaps will make sense as a "contribution" without
burdening OpenJPA's normal build process on strong dependency to Eclipse
librarie
Hi Andiqo,
That "compatible" property seems promising. I once used it when needed to
tweak how String parameters are sent to PostgreSQL.
I am not sure what you mean by "directly specify properties". If I want to
specify a JDBC driver property, usually I add it to the database URL or
configure the
> It took 2.3 sec
That matches with my numbers. If you use a connection pool, it will come
down to ~0.75 seconds.
> Btw Pinaki, your plugin works perfect with MyEclipse 7.1.1 aswell. FYI.
> Nice work ;)
This is my very first attempt to learn how to build plugins. I think it is
beginner's luck :)
That's what I'm going to try and figure out tomorrow when I get there. Going
to take this laptop with me and see if I can figure it out. They are not on
the same network, though that shouldn't matter as I have used a local MySQL
install on all computers.
Will of course update when if/when I find
What is different abut your laptop at home vs. multiple computers at
work? Are they all connected to the same network?
On 3/17/2009 11:30 AM, Shubbis wrote:
Ok, I still dont know what the problem is, but it seems like its not
OpenJPA's fault (i think).
I just took the whole project home with m
Ok, I still dont know what the problem is, but it seems like its not
OpenJPA's fault (i think).
I just took the whole project home with me, and installed it on my own
laptop in a new workspace, and what do you know.. It took 2.3 sec. compared
to the 12-15 sec.
Now, I still don't know the root of
Somehow DB got into this situation again (identical stack traces). I end-up
removing (commenting out) @Version field from PSLBase class and now it works
(without any changes to DB).
I think it points quite conclusively that something is not right with the
way @Version field influence enhanced co
Hi
I need to persist all timestamps in UTC timezone. I found this documentation
which talks about using Calendar by setting the timezone value to the
desired timezone
(http://openjpa.apache.org/builds/1.1.0/apache-openjpa-1.1.0/docs/manual/ref_guide_pc_scos.html#ref_guide_pc_calendar_timezone),
Thanks. Are you using OpenJPA 1.2? What postgres JDBC driver are you
using?
From the manual it looks like by default the property
|openjpa.jdbc.DBDictionary will be set from the value of property
||openjpa.ConnectionDriverName. I'm just wondering if these default
settings are correct for Po
Would it be possible to have you zip up your entire directory structure and
upload that? Make sure that everything is compiled and enhanced... hopefully
that will shed some more light on what is going on.
-Rick
Shubbis wrote:
>
>
>
> Pinaki Poddar wrote:
>>
>> I do not find anything obvious
Hi,
> Maybe someone could post an example of their build.xml file so that i
> could try it. See if maybe its my
> enhancing thats the problem.
If you are an Eclipse IDE user, you can try a plugin [1] that keeps your
classes enhanced always. Or you may be better of with Ant builds as Mike had
p
I am looking at the snippet of code I have created and I start to wonder if
PLSEntity should be decorated with @MappedSuperclass instead of @Entity.
Could it be the reason for all this shenanigans?
--
View this message in context:
http://n2.nabble.com/Strange-%22ClassCast%22-Exception-%28and-e
Which version of MS SQL and which JDBC driver are you using?
-Donald
rpalache wrote:
Hi all,
Using max and size in same query is not working in microsoft SQLServer.
To demonstrate the problem, I added a new method in test case
org.apache.openjpa.persistence.jpql.functions.TestEJBQLFunction th
It looks like e-mail did not get my attachment. Here it is
http://n2.nabble.com/file/n2492089/PLSClasses.txt PLSClasses.txt
--
View this message in context:
http://n2.nabble.com/Strange-%22ClassCast%22-Exception-%28and-even-stranger-way-it-disappear%29-tp2491173p2492089.html
Sent from the Ope
See below:
On Mar 17, 2009, at 11:07 , Kevin Sutter (via Nabble) wrote:
> Andrei,
> More questions than answers, but let's see where this takes us...
>
> On Tue, Mar 17, 2009 at 7:45 AM, Andrei Tchijov wrote:
>
> >
> > Out of blue, I started to get following exception:
> > http://n2.nabble.com/
Andrei,
More questions than answers, but let's see where this takes us...
On Tue, Mar 17, 2009 at 7:45 AM, Andrei Tchijov wrote:
>
> Out of blue, I started to get following exception:
> http://n2.nabble.com/file/n2491173/ClassCastException.txt
> ClassCastException.txt .
>
Thanks for the call st
A slightly overcomplicated example is in the OpenJPA source code. It a bit
kludgy since it's invoked during a maven build and we don't want it to run
if we aren't going to run the tests in maven..
You can see the file in fisheye at [1] .
The relevant portion of the file is here (I've removed some
I have stopped my application, opened mysql and used "UPDATE ..." to
set appropriate columns to "null".
I do have "@ManyToOne" defined like this
@ManyToOne
private PLSObject object;
On Mar 17, 2009, at 10:50 , Michael Dick wrote:
Hi Andrei
What do you mean by reseting the version field to null?
The application should not update the version field (nor should it need to).
OpenJPA will update the version for you automatically, if the application is
calling setVersion(1) then that could cause problems. Off the top of my head
Sorry, I have wrote this e-mail fist thing in the morning before I
got my cup of coffee.
Maybe this is a solution to all OpenJPA problems? We should Enchant
entities instead of Enhancing them. It works in WoW :)
On Mar 17, 2009, at 10:44 , Kevin Sutter (via Nabble) wrote:
> Couldn't resis
Couldn't resist... :-)
On Tue, Mar 17, 2009 at 7:45 AM, Andrei Tchijov wrote:
>
> P.S. I am running OpenJPA 1.2.0 with mySQL. All classes are enchanted
> during build time (using ant task).
Enchanted? I love it! I know you meant "enhanced" (instead of
"enchanted"), but I think I like the i
Pinaki Poddar wrote:
>
> I do not find anything obvious in the tests that can cause the slowdown.
> Now the usual suspect: Have you enhanced Storeage/WeraHouse classes at
> build-time?
>
>
Maybe someone could post an example of their build.xml file so that i could
try it. See if maybe its my
Out of blue, I started to get following exception:
http://n2.nabble.com/file/n2491173/ClassCastException.txt
ClassCastException.txt .
To the best of my understanding, problem occur when I am trying to access
@OneToMany field defined as following:
@OneToMany( mappedBy = "object", casc
Yep, I sure have..
Shubbis
Pinaki Poddar wrote:
>
> I do not find anything obvious in the tests that can cause the slowdown.
> Now the usual suspect: Have you enhanced Storeage/WeraHouse classes at
> build-time?
>
>
--
View this message in context:
http://n2.nabble.com/Slow-performance-w
I do not find anything obvious in the tests that can cause the slowdown.
Now the usual suspect: Have you enhanced Storeage/WeraHouse classes at
build-time?
--
View this message in context:
http://n2.nabble.com/Slow-performance-with-OpenJPA-when-selecting-from-a-ManyToMany-relation.-tp2466994p24
And my persistence.xml
org.apache.openjpa.persistence.PersistenceProviderImpl
test.model2.Wearhouse
test.model2.Storagecategory
Hi again,
Thanks for your patience and I am sorry for the late reply, but we are only
stationed at the offices three days a week.
I must admit i don't understand what you mean by test harness. If you could
explain i will gladly post it.
In the meantime I have created a new project and added Ope
Hi,
Welcome to 'bleeding edge' technology - may you live in interesting time
:)
SVN commit 755031 has a change to address the issue you found.
Yes, Slice is built with maven along with rest of the modules of OpenJPA.
You can also find a series of test cases for Slice in openjpa-slice/../te
38 matches
Mail list logo