JDO object id problem when working with an appserver

Hi,
I'm running into a problem when passing a JDO object id as an argument to a
bean. My client is finding a JDO object locally, then attempting to
instantiate a bean which wraps the JDO object. Since the JDO object is not
Serializable, I'm passing the object id to the bean constructor, so that the
bean can look up the object again, this time in the appserver, and wrap it,
without ever serializing the object.
I'm guessing that the JDOId class for the JDO object is generated on the fly
in the client, and therefore does not exist in the ClassLoader in the
appserver. Any ideas how I can fix this?
Thanks,
Eric
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException:
java.lang.ClassNotFoundException: test.TheTest$JDOId (no security manager:
RMI class loader disabled)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno
wn Source)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:25
8)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
at $Proxy0.create(Unknown Source)
at test.TheTestRemote.<init>(Unknown Source)
at test.TheTest.getRemoteObject(TheTest.java:19)
at
com.hcm.tools.util.CollectionHelper.getFirst(CollectionHelper.java:23)
at
com.hcm.tools.jdo.JDOFactory.executeSingletonQuery(JDOFactory.java:234)
at test.Test.print(Test.java:22)
at test.Test.main(Test.java:11)

Hi David,
I'm trying to use JDO to completely replace Entity Beans. Of course, this
leaves me with an important question: how do you make the JDO object
available remotely? My answer is to wrap JDO objects with a stateful
session bean, and pass through method calls made on the bean to the JDO
object. Both the bean and the JDO object will implement some interface, so
you can use an object in a client without any knowledge as to whether it is
a bean or a JDO object. ( Important note: I can get away with this because
of another cool Solarmetric product, the session bean creator, which
enhances a simple java object into a session bean )
Now, once I have some interface implementation, maybe a local persistent
object, maybe a remote object, I will want to do something with it. There
are a couple considerations here. First, if I want to edit the object, I
need to make sure a transaction gets started. I do this by having my
session beans take care of starting and committing transactions. Since I
have written my own JDO Factory that takes care of synchronizing PM caches
across transactions, this has the effect of keeping all my caches in the
appserver up-to-date as well ( more on that if you're interested ). So, in
order to call a 'set' method, I need to ensure that the object I have is in
it's "remote" state, so-to-speak.
So I created an interface called RemotePersistentObject, which all these
other interfaces extend. It includes two methods, getRemoteObject (), and
getObjectId (). The reason for getObjectId (), instead of
getPersistentObject (), is that often times you don't want your JDO objects
to be Serializable, especially if you have JDO objects that you want to
guarantee remain unique ( say, no two Stock objects have the same ticker
symbol ). Besides, you want the remote object to represent the same
concept, and as soon as you serialize the persistent object, you have a copy
of the original JDO object that will no longer do nice things you'd like it
to do, like get updated when some transaction in a different thread modifies
a field.
So, to get around this serialization issue, I just pass the JDO object id to
the bean, and have the bean lookup and wrap the appropriate JDO object on
the server. I wrote a couple optional base classes that provide a lot of
the functionality for this, since it turns out that wrapping a
non-serializable JDO object is non-trivial. The problem there is that when
the bean passivates, it serializes the state of the session bean... oops.
So the base classes take care of keeping a transient reference to the actual
object, while keeping a non-transient ref to the object id. All attempts to
use the actual JDO object are filtered through a getObject () method, which,
if the transient ref has disappeared due to bean passivation, looks up the
object in a read-only PM again.
Hmmmm. Lots of stuff here. I'll stop here and answer any questions (
criticisms ) you may have.
-Eric
"David Ezzio" <[email protected]> wrote in message
news:[email protected]...
Eric,
Curious minds want to know: what are you up to here? I found this to
be a very interesting post, and I would like to know more about the
architecture you are using and its motivation if you can share it.
David Ezzio
Eric Lindauer wrote:
Hi,
I'm running into a problem when passing a JDO object id as an argument
to a
bean. My client is finding a JDO object locally, then attempting to
instantiate a bean which wraps the JDO object. Since the JDO object isnot
Serializable, I'm passing the object id to the bean constructor, so thatthe
bean can look up the object again, this time in the appserver, and wrapit,
without ever serializing the object.
I'm guessing that the JDOId class for the JDO object is generated on thefly
in the client, and therefore does not exist in the ClassLoader in the
appserver. Any ideas how I can fix this?
Thanks,
Eric
Exception in thread "main"java.lang.reflect.UndeclaredThrowableException:
java.lang.ClassNotFoundException: test.TheTest$JDOId (no securitymanager:
RMI class loader disabled)
at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unkno
wn Source)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:25
8)
at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
at $Proxy0.create(Unknown Source)
at test.TheTestRemote.<init>(Unknown Source)
at test.TheTest.getRemoteObject(TheTest.java:19)
at
com.hcm.tools.util.CollectionHelper.getFirst(CollectionHelper.java:23)
at
com.hcm.tools.jdo.JDOFactory.executeSingletonQuery(JDOFactory.java:234)
at test.Test.print(Test.java:22)
at test.Test.main(Test.java:11)

Similar Messages

  • Problem when working with package???Please, help me!!!

    I got 3 .java files from one Java tutorial as follow:
    Server.java (in package mygame.server)
    Utilities.java (in package mygame.shared)
    Client.java (in package mygame.client)
    All the above files are placed in "E:\Java Programmes\source"
    After compiling, i got correspponding .class files:
    Server.class (placed in "E:\Java Programmes\class\mygame\server")
    Utilities.class (placed in "E:\Java Programmes\class\mygam\shared")
    Clients.class (placed in "E:\Java Programmes\class\mygame\client")
    But when i run Server.class which contains main method, i got error as follow:
    E:\Java Programmes>java class\mygame\server\Server
    Exception in thread "main" java.lang.NoClassDefFoundError: class\mygame\server\S
    erver (wrong name: mygame/server/Server)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    That was very puzzled for me. I cannot find out what wrong with my files. Please., any boby, help me!!! I always got this problem when working with package and managing files. Thanls a lot.

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Nexus 1000V. problem when working with the console VMWare

    I have a problem when working with the console VMWare.
    Sometimes it is impossible to connect any of the hypervisor to the guest OS managed by them.
    I get the message: "Unable connect to the MKS: Host address lookup for server <name of the hypervisor> failed: No such host is known."
    This message always appears in conjunction with the reconfiguration of virtual switch: "Reconfigure vNetwork Distributed Switch .... Initiated by Cisco_Nexus_1000V_ ....."
    Upon completion of the reconfiguration, Communication console, with guest OS is restored, or on its own or after a reboot srv-vc.
    In this time, I do not see any message in Nexus 1000v log.
    What is this?
    Thanks in advance.

    Smells of a DNS issue.  Are you sure your ESX hosts are reachable from your client via DNS hostname?  Try pinging them from a command prompt/terminal.  You may have DNS server issues.
    As a temp fix, edit your [windowspath]/system32/etc/drivers/hosts file and manually add the ESX host name and IP, then re-test.
    Regards,
    Robert

  • Keymapping problem when working with emacs and openbox

    I have an apple keyboard and I had to do some remapping of the keys to make the mod-4 key the first key to the left of the space bar for when working with Emacs.  The below script worked fine when I was using the dwm window manager, but after switching to openbox I have found that instead of swapping keycodes between the option and command keys, only the command key seems to be working since the initial openbox command-space doesn't work when pressing option-space.
    One odd thing I noticed, was on the new setup when I click run `showkey` and press the option and command keys I get 56 and 125 respectively, but these keys don't work at all when inserting them into the below script instead of the 64 and 133.
    I must admit I created the script below by continually tweaking it until it worked so there could be a much better way of doing it.
    //.xmodmap
    ### capslock => ctrl
    xmodmap -e "clear Lock"
    xmodmap -e "add Control = Caps_Lock"
    ### switch alt and command
    xmodmap -e "keycode 64 = Alt_L"
    xmodmap -e "keycode 133 = Meta_L"
    ### remap of mod 4
    xmodmap -e "clear Mod4"
    xmodmap -e "add Mod4 = Super_L"
    ** Update:  The Alt key is not being swapped with the command key, but is not just a duplicate.  So no M-x can be done by both Alt-x and Command-x
    Last edited by iso (2011-02-19 19:21:01)

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Problem when Working With Combo

    Dear all,
    I am having a problem when i am working with Combobox.At the time of modification of any existing record i am retrieving the value and description of a Combo and doing accordingly.But sometimes it is showing error that Object Reference is not set.
    If i click that combo(one time) then i am not getting any of error.
    Error comming from the line like : strDesac=oCombobox.Selected.Description
    The thing is that this is not selected item ,it it comming automatically.
    How to handle this types of error.
    Waiting for as reply soon.
    Regards
    Sanjay

    But, this is the question! I dont know how to initialize the combobox' first option. Help me, please! I am using the addItem method as follow:
    MakeJCombo ( JComboBox ComboObj) {
    ComboObj.addItem ("option1");
    ComboObj.addItem ("option2");
    ComboObj.addItem ("option3");
    then:
    public void itemStateChange(ItemEvent ie) ...
    Object origem = ie.getSource()...
    if (origem == ComboObj) ...

  • Problem when working with multiple sequences

    Dears,
    In order to make life easier (I am currently working on a rather long project), I work with multiple sequences, one per chapter.
    My problem: I named one sequence "assembly sequences" in order to add the various sequences. I dropped the sequence no 1, then no 2. All works fine, beside that when playing the sequence no 2, I see two black lines on top and bottom of the screen for the all length of the sequence. Which is not the case when I click on the sequence itself and play it independently.
    Any idea how to solve this ?
    Thanks
    Nic

    Thanks, what happened is that :
    1st sequence is like this : Frame size 720x576 pixels, video rate 25fps, Compressor DV-Pal. And I think it is the one appropriate for me and my country.
    2nd sequence is like this : Frame size 720x480 pixels,
    video rate 29.97 fps, Compressor DV-DVPRO-NTSC.
    I think I should change the second sequence setting, but can I do it after all the work I have done, and continue making a 3rd, 4th and so on ?
    Tx for your precious help,
    Nicolas

  • Problem when working with adobe forms

    hi friends,
    i am new to interactive adobe forms
    i am following the tutorials for learning adobe forms
    when i am working with adobe forms error was occured.
    cannot find PDL type for output device local
    Device type unsuitable for ADS documents
    and i am searching for related documents in sdn
    i had found no. of documents related to this issue but i can't find the proper solution
    i have already installed Adobe Life Cycle Designer.
    can anyone explain me clearly about the issue.
    thanks in advance.
    Regards,
    karunakar

    Check this link (and don't forget to search the forums next time...!)
    Re: Adobe document service error: SOAP Runtime Exception
    Regards,
    Trond

  • Problem when working with Write to SpreadSheet

    Hi again. I'm trying to export some adquired data (double) to Excel, I've found this tutorial in NI webpage: https://decibel.ni.com/content/docs/DOC-36448 and it worked but I have a problem: Columns are not separated when I run it. It would be much appreciated if you can help me, I think maybe its some Excel issue but I want to confirm it, thanks.

    I wrote an array of real value unsing the same vi "write to a spreed sheet file". the data is place in a row but you can trans[pose the data within Excel.
    Einstein proved by taking time in thinking about a problem he proved there is no such thing as gravitational pull. Therefore, given enough time and thought a problem can be solved. If the problem is not solved then there has not been enough thought.
    Attachments:
    WRITING TO AN EXCEL FILE.png ‏23 KB

  • Problem when working with loaded registry hive

    Hi All, 
    I'm working on a project to copy some registry entries to the HKLM hive so they can be inventoried using SCCM. I've spent quite a bit of time trying to figure out the best way to do this, since the keys only exist in the HKCU branch of the registry.
    Here is what I've got so far:
    if (Test-Path -Path C:\Users\User.dom)
    reg load 'HKLM\TempUser' C:\Users\User.dom\ntuser.dat
    if (Test-Path -literalPath "HKLM:\TempUser\Software\Smith Micro\VZAM - Verizon Wireless\DeviceMDN")
    {$Key = (get-item -literalpath "HKLM:\TempUser\Software\Smith Micro\VZAM - Verizon Wireless\DeviceMDN")
    $MEID = (Get-Item -path $Key).property
    $Number = (Get-ItemProperty -path $key -name $MEID).$meid
    write-host "MEID is $MEID"
    Write-Host "Number is $number"
    [gc]::collect()
    reg unload 'hklm\TEMPuser'
    new-item -path "HKLM:\Software\" -name "Inventory"
    New-ItemProperty -Path "HKLM:\Software\Inventory" -Name "MEID" -value $meid -PropertyType "String" -force
    New-ItemProperty -Path "HKLM:\Software\Inventory" -Name "Phone Number" -value $number -PropertyType "String" -force
    The problem is that it works fine if I don't use the $key variable and manually enter the path on each line. Once I try to use the $key variable I get an error message that the path doesn't exist. Can't seem to figure out why that is happening.

    Hi Matt,
    I’m writing to just check in to see if the suggestions were helpful. If you need further help, please feel free to reply this post directly so we will be notified
    to follow it up.
    Thanks for your understanding and efforts.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Problem when working with Answers

    Hello all,
    When I am trying to display the resultset of the Query in the form of a Chart it gives me the following error,"An error occurred during execution of "connect". No connection could be made because the target machine actively refused it. [Socket:920]".Please help me fix it up.
    Thanks and Regards,
    Susane

    hi,
    is your Oracle BI Java Host service is up and running if can you run and check the results in chart view.!!!

  • Problem when work with Image on Conten Mangement

    Hi all,
    My Repository have Library Service enable true and I created one content have type is article. On the window edit the value of "file" property I insert one image from my Repository.
    But I only can search out images were published and only these images can appear on my edit screen when I insert them.
    So now, I want every image I which were uploaded to repository base on a Content type is Image can appear on my edit screen, but needn't check in "Published" status.
    Can you tell me How to do that?
    Thanks a lot!

    I known how to search out the Images content which were not published like you talk. But if I use the image content was not published, It will not show on you content.
    So I want to known that have any way to insert a image content to my Content without published it but it must can show out on my content.
    Thanks

  • Problem with Ai when working with a logo (the program gets slow & I can´t move the logo easily)

    Hi there, Hope everyone is well. I have troubles with my Ai when working with a logo, I just want to move it from one point to another and it gets pretty slow to be moved. I am working on a brand new iMac and this problem surprises me a little bit. Do you know why is this happening? I get de Ai from the Creative Cloud...could it be the internet?

    Can you please show a screenshot?
    Are there any placed raster images in your file? Are there any raster effects in your logo file? What are your Effect > Document Raster Effects Settings... ? Also, what are your Preferences > Scratch Disks settings, and how much free space do you have on that (those) drive(s)?
    I doubt it's the internet, unless you're also synching at the same time ... and while this is taking place your internet connection is super-slow.

  • Problem with Ai when working with a logo (I just can´t move the logo quickly from one point to another) Help!

    Hi there, Hope everyone is well. I have troubles with my Ai when working with a logo, I just want to move it from one point to another and it gets pretty slow to be moved. I am working on a brand new iMac and this problem surprises me a little bit. Do you know why is this happening? I get de Ai from the Creative Cloud...could it be the internet?

    Thnks rcraighead, glad to know about how CC runs. The logo was before a jpg then our designer transform it into vectors but today we were working she found complicated to move the image, it takes secooonds to make it move either from the keyboard or the mouse. I will ask her to see the symbol option, I think she is working with several logos (in vectors) at the same archive...so let see. Thanks buddy! I will be back with a screenshot

  • Additional plug ins not displaying when working with ERBI Business Objects.

    when working with ERBI Business Objects I am attempting to edit a report which requires Java. When I click on edit I get a bar at the top of the screen that say "Additional plugins are required to display all the media on this page". I click install missing plugins and receive a page that says no suitable plugins were found. I click finish and thus it still won't allow me to edit a report.
    Please help

    Please go to Java's website in this case to download Java.

  • Aperature crashed after 3.3 update. I am a novice at best when working with restore functions. Any suggestions on how to fix this problem?

    I had the 3.3 update window with Aperature pop up and say that I could no longer work with my library until updating Aperature. The update froze up about 90% through the completion of the last set(9 of 9/ 90% complete) and ran over night. My MAC shows version 3.3 installed. When I try to open Aperature, I get a system crash error. I am a novice at best when working with software and I am panicing because of the amount of pictures that I have on the system. I do back them up but do not know how to restore Aperature software(I purchased it before the app store and can not find it). Please advise.

    There is an Aperture forum that you can repost in, that is where you will find the guru's for that product. Simply click: Aperture to get there. BTW before you do please complete your profile, it makes it much easier for those attempting to assist you. You can find instructions by clicking Profile Update

Maybe you are looking for

  • Using a upgrade phone

    If I upgraded someone else's line and received the phone, could that phone be activated on another line? Without ever being activated on the "intended" line instead of transferring upgrades, and would the old phone on that line still be able to be us

  • Upgrade Forms 4.5 to 6i or 9i?

    Hi All, I wish to know if it is possible to move to forms 9i from 4.5. We are using Oracle 8i and we think to move on 9i but not soon. Should we upgrade to forms 6i before moving on forms 9i? Many Thanks Marco

  • Missing Scanned Photos in Iphoto

    Hi I used my iPad and iPhone to scan a bunch of old photos.  I then uploaded to iPhoto on my iMac.  I just went into iPhoto and they are all gone!  The folders I made are there along with the titles but the photos themselves are not there.  Help!!

  • Safari issues in iOS 8.0

    In both iPhone and iPad, I am able to swipe back to previous web page, but I can no longer get the swipe forward to work. Selecting text in web pages has become extremely difficult. In fact sensitivity to touch in any web-based text box (this post, f

  • Ipod Needs to be Serviced Help

    I have the "sad" ipod screen when I try to turn my ipod (40gb click wheel) on. I want to send it in and have it serviced, but when I try to set it up online, it says my serial number can't be verified. I typed it correctly. It says to contact HP, but