A very Strange Problem!!!help me!!

i encounter a very strange problem, in EJB
i write two EJB, one Stateless Session called A, and one Entity called B.
i want to call B's findByPrimaryKey method in one A's Business, but failed!!!
but when i remove the statement that performed the findByPrimaryKey method to A's setSessionContext method, It's Success!!!!!
what the Problem, i am useing the Borland 's AppServer.
who can help

how u create the entity bean B from A?
using proper lookup?
can u try by write a small function inside bean A
that contain proper lookup to Bean B...
then try to call finbyPrimaryKey...
now tell me is it working?
or else can u give code or clear idea..
if i can help u ,,,, sure i will
do mail me
[email protected]

Similar Messages

  • Hibernate-very strange problem, help please

    Hi, i got such a strange problem that im sure you ll think im doin crazy talk :) , i dont see why this would happen at all, i have a class called "Package", mapped to a table "package". whenever i do a query on this table using hibernate, even the simplest "find all" kinda of query, hibernate does update on the table b4 doin the query! even more weird, it does the update when the first query on this table happens, it deletes all values of a column (yes only this column); then if i do the same query again, no update at all. however if now i mannuall add those missing values, it does the update again and deletes them! sry its confusing, heres my code and more of wat i done:
    The mapping Package.hbm.xml
    <hibernate-mapping package="tuition.bo">
    <class name="Package" table="package">
    <id name="id" column="study_package_id" type="long">
    <generator class="sequence"/>
    <property name="name" column="name" not-null="true"/>
    <property name="satTiming" column="sat_timing" not-null="false"/>
    <property name="satSubjects" column="sat_subjects" not-null="false"/>
    <property name="sunTiming" column="sun_timing" not-null="false"/>
    <property name="sunSubjects" column="sun_subjects" not-null="false"/>
    <set name="classes" inverse="true" cascade="delete-orphan" lazy="true">
    <key column="package_id"/>
    <one-to-many class="Class"/>
    For example initialy i populated database using hibernate, like this:
    package_id, name, sat_timing, sat_subjects, sun_timing, sun_subjects
    1 no.1 9-12 business 9-12 law
    2 no.2 9-11 business 9-11 law
    Then after i populated this database, i did this query:
    <b>List res=getHibernateTemplate().find("FROM Package");</b>
    and you can see the log file as such: (excerpt)
    16:23:06,687 INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
    16:23:06,703 INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    16:23:09,968 DEBUG JDBCTransaction:46 - begin
    16:23:09,968 DEBUG JDBCTransaction:50 - current autocommit status: true
    16:23:09,968 DEBUG JDBCTransaction:52 - disabling autocommit
    <b>16:23:10,640 DEBUG SQL:324 - select</b> studypacka0_.study_package_id as study1_, studypacka0_.name as name12_, studypacka0_.description as descript3_12_, ....... from _3AT_package studypacka0_
    Hibernate: select studypacka0_.study_package_id as study1_, studypacka0_.name as name12_, studypacka0_.description as descript3_12_, studypacka0_.day as day12_, studypacka0_.sat_timing as sat5_12_, studypacka0_.sat_subjects as sat6_12_, .......
    16:23:10,734 DEBUG JDBCTransaction:83 - commit
    <b>16:23:10,796 DEBUG SQL:324 - update</b> _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=?
    Hibernate: update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=?
    <b>16:23:10,812 DEBUG SQL:324 - update </b>_3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=?
    Hibernate: update _3AT_package set name=?, description=?, day=?, sat_timing=?, sat_subjects=?, sat_hours=?, sun_timing=?, sun_subjects=?, sun_hours=?, unit_price=?, years_id=?, group_id=? where study_package_id=?
    <b>16:23:10,812 DEBUG SQL:324 - update</b> _3AT_package set name=?, description=?,
    16:23:10,953 DEBUG JDBCTransaction:173 - re-enabling autocommit
    16:23:10,953 DEBUG JDBCTransaction:96 - committed JDBC Connection
    as you can see, it does update and changed table field values to this:
    package_id, name, sat_timing, sat_subjects, sun_timing, sun_subjects
    1 no.1 business law
    2 no.2 business law
    ---------- all tiimings are gone. and now if i re-do the same query, there are NO UPDATE operations....howver if i add some values to sat_timing, sun_timing, and re-do the query, very surprisingly, i saw those update operations which delete all timing values again!
    im totally lost... i havent changed any config, this doenst happen to my other classes at all but just this one.... any ideas please! even some thought of what may caused this would be great help! thank you!

    well i got the setters wrong.... being so stupid i am... sry for creating such a long and massy thread.

  • Very Very Strange Problem - Help

    I own a MacBook Pro 17 inch. I connect it to a 30" Cinema Display. It has been working great for the past 6 months. Few days ago, I was doing a presentation using a flat screen which went fine. A day later, When I tried to connect the MacBook pro back to my cinema display, it just did not work. The display is not detected at all. I first thought maybe the connector was not damaged but the dosplay worked fine with another computer. I then though maybe the diplay out in my computer was damaged, but my MacBook works ok wiht other screens and projectors. The strange thing is that there is absoultely no communicatio between this specifc Macbook pro and this 30" inch Cinema display. Very strnage. Appreciate your help.

    Try resetting PRAM…

  • Very strange problem, help needed please???

    I had a piece of software that acted as a virtual disk when I plugged in my 60GB Video Ipod but when I opened iTunes it appeared as if my iPod was connected with a different name and over 20 GB's used (which is right) but nothing could be seen. After disabling the virtual drive, rebooting and trying again I still had the same problem. I have all my library on my PC so it didn't bother me to try a system restore, I did the system restore but when it was finished it said that my iPod was restored but the wrong name was there and I'm missing 30 GB's. I'm happy to completely wipe it and start again but I've tried the restore twice now and I get the same problem, the capacity has halved??

    I did the system restore but when it was finished it said that my iPod was restored but the wrong name was there and I'm missing 30 GB's
    hmmmm. we'd probably better check on this possibility:
    Windows confuses iPod with network drive and may keep iPod from mounting or songs may seem to disappear
    love, b

  • I have very strange problem with Iphone 3gs. Whenever it gets little hot or exposed to 30 degree temperature it losses signals (No service). Whenever it is cooled down the service is back. Please help!

    I have very strange problem with iphone 3gs. Whenever it gets little hot or exposed to 30 degree or above temperature it losses signals (No service). Whenever it is cooled down the service is back. Whenever I am using Skype or playing game for a while it losses carrier signals and wifi. When it is cooled down afer shutting down the carrier signals and wifi are back. It is for sure problem is with heating, but 30 degree tempeature in Oman is normal and some time it goes upto 50 degrees. I have noticed this has started after I started using substandard charger as I lost my original charger of the phone. Please help!! Thanx.

    The specifications define an operating range up to 35 degrees.

  • Nokia 3250:A very strange problem...

    hi..i'm facing a very strange problem in my handset 3250.. i've upgraded its os but still there is problem: http://discussions.europe.nokia.com/discussions/bo​ard/message?board.id=smartphones&;message.id=9102#M9102 any idea about such type of problem.....

    what is firmware?? How can i have its latest edition??
    Can you help me because i too have the same problem:
    Problem 1:
    1-I install any software (e.g:snake game) through Application manager (Pc Suit) in memory card.
    2-I launch that software (snake game) just after installation it works properly.
    3-Now i switch-off the hand set and than switch-on it.
    4-I try to launch that software (snake game) again but it doesn't response.
    Problem 2:
    1:There is a image in my Memory card.
    2: I set that image as a wallpaper.
    3-Now i switch-off the hand set and than switch-on it.
    4-Wallpaper reset to default one.
    Problem 3:
    1-I install a theme through Application manager (Pc Suit) in memory card.
    2: I apply that theme in my hand set.
    3-Now i switch-off the hand set and than switch-on it.
    4- Now theme reset to default one.

  • ALV Grid - Very Strange Problem

    I am facing a very strange problem in ALV Grid. Our’s is a ECC5 system on SAP_APPL SAPKH50011 and SAP_BASIS SAPKB64016.
    I have implemented the ALV grid in a screen using classes. This grid by default appears in display mode however it can be switched to change mode and back to display mode using a custom button on the ALV toolbar. When the user clicks the change button the grid appears in editable mode. During the back and forth switching of the ALV between Change/Display modes the ALV grid control is not destroyed however the toolbar, fieldcatalog and ALV contents are refreshed.
    The data which is entered in an editable cell is validated using the data_changed event which has been implemented locally. If the validation fails an error message is raised using the message statement which is being issued correctly. Now when I correct the data and then click on another cell in the ALV grid the program is being aborted. Any clue why this is happening??

    Please check this code
    In the PBO of the screen set the field catalog and layout , i think this will help not to refresh the field catalog every time swtich between display and change mode
        set titlebar sy-dynnr with p_netwk.
        call method g_grid->set_frontend_fieldcatalog
            it_fieldcatalog = gt_fieldcat[].
        call method g_grid->set_frontend_layout
            is_layout = gs_layout.
        call method g_grid->refresh_table_display.
    2. Regarding program abort, please paste the first page of system dump

  • Very strange problem facing

    Hello All,
    I am facing very strange problem from last a week.
    I have made flex application using Flex3 and AMFphp.
    I was running very fine but just from before 7 days, my all images will not displayed in Mozilla Firefox browser.
    but it is running fine in Internet Explorer browser.
    any idea? I have tried to know what happen but i failed.
    Please help me to identify what's going wrong.
    Thank you.

    Have you tried emptying your cache?

  • Very strange problem / Perpetual command key

    I've been using OS X since its inception, and have never had this problem before.
    Starting yesterday, I noticed a very strange problem that was happening randomly. When I clicked on an app in the dock, it would just reveal the app to me in Finder rather than opening it. Other problems including multiple selections when single-clicking on items with my mouse, and not being able to type. After some fidgeting, I realized that my iMac is acting like I'm always holding down the command (apple) key. If I have a window open, for instance, pressing the H (just by itself) key will hide the window. Pressing Q will quit whatever is active.
    I shut down, restarted, plugged in a different keyboard, used a different mouse, unplugged all my periphs, deleted all haxies and their attached files, and it still happened. I unplugged my 2nd monitor, and that seemed to fix it after another restart... but then I plugged in my 2nd monitor again and restarted, and now everything is fine. It's just happening randomly. I'm afraid to restart my Mac now. This is really bizarre!!!
    Someone please help!

    If it's any help, it started right after the following:
    When booted to Vista one night, I noticed ghosting on my nice new iMac screen which kinda irked me. I could see the menubar with the Spotlight menu icon burned into the screen.
    So when I got back into OS X I looked for a menubar hider. I tried Menushade and Menufela, both of which are quite old... probably before any mention of an Intel switch had ever occurred.
    But now I had a problem... no clock. So I went ahead and downloaded Yahoo! Widget Engine (aka Konfabulator). I know, I know... what a crazy workaround just to hide the menubar (this is why it would be GREAT if Apple would build in its own menubar hider option!)
    Anyway, this stuff started happening, so I deleted all of those apps (Menufela, Menushade, and Yahoo Widget Engine) with AppZapper (a great little app).
    Ugh... this is what you get for experimenting with homegrown apps, I guess.
    Anyway, hope that helps.

  • A very strange problem in netbeans

    i debug a project in netbeans,a a very strange problem happens.
    a member variable was different between wtk20 and wtk22.and the variable was changed many places so it's hard to trace!
    but there hasn't the problem when i debug project in jbuilderx!

    My problem is, even I've written the SQL in the correct syntax, in my java code, it just look like this
    adc.SQL("insert into test(subject, content) values('" + sf.filter(subject.getText()) +"'"
                                  + "," + "'"
                                  + sf.filter(board.getText()) + "')" );
    where subject is a textfield and board is a JTextArea and sf is a string filter which use regular expression, I basically want to insert the string in these component into the database, Many strings work, but client for updates can't be inserted.
    With my best,
    Zike Huang

  • Very strange problem w/ iTunes PC

    Well, I have a very strange problem - I added some music to my iTunes and when I was changing the informations and cover, my iTunes crashed. When I restarted the program, the album is missing and when I found it on my hard drive, I am not able to import it back to the iTunes. This happens with both Import from the menu and the classic Drag/Drop method. So what to do? Is there any way to get it back?
    EDIT: Tried to move the files to another folder. Didn't work though.

    I just found the problem lies with iTunes 7.0.
    I ran the sames songs (ones with problem) into iTunes 4.7.1, with MSN messenger (same version)'s song display selected.....the song title/artist displayed and it did not get kicked out!!!!
    If it's not my 80gig iPod.......I would not have gotten iTunes 7.0!!!!!!!

  • Please Help - Very strange problem with internal String encoding

    I created a file in one-byte russian encoding cp1251 and declared String literal with 2 letters:
    String str = "ab"; //attention! ab - two russian characters
    After I got bytes from it - str.getBytes("cp1251") - it returned 2 byte's array.
    Now I created a file with UTF-8 encoding with equal content and suddenly:
    After I got bytes from it - str.getBytes("cp1251") - it returned 4! byte's array. Why?
    I need to get a one-byte encoded arrays (cp1251 or koi8-r) but getBytes ALWAYS returns two-byte encoded arrays.
    It is very strange: cp1251 is always one-byte encoded, but .getBytes("cp1251") returns two-byte on each letter. Why? Please help.

    I did not read a string from a file. I created 2 .java files with different encodings (cp1251 and UTF-8) and compiled them, telling compiler with -Dfile.encoding=*** to read them correctly. While execution java interprets two looking equal in editor strings as different objects with different .intern() representation.
    Why java consider source .java file encoding while creating internal representation of String object and creates from looking equally in editor strings two DIFFERENT Unicode representations. And it is impossible to convert one representation to other - impossible to get two equal byte[] arrays.

  • Please help me with Nokia E71 very strange problem...

    I have Nokia E71_v1, I got lots of strange problem like:
    1- The camera didnt save the images and create the images like this: Name of the image*jpg but I can take videos without a problem.
    2- when I put anything in the memory card or the phone memory it became currpted and then I couldnt open them at all, the message "can open the file" or "file is currpted" appears.
    3- I couldnt install any application to the phone, if I put any sis file on the memory I get "file currpted" message but if I sent it to the phone via bluetooth I could install it.
    4- The name of the folders usually change their name and currpted characters appeard in the folder naming.
    5- When I added any mp3 files to any memory the files are disappeared.
    Noka E71-1 (19)
    please help
    090620091272.jpg ‏242 KB
    090620091273.jpg ‏299 KB

    You better reset the E71. Dial *#7370# 12345 reformat, you'll lose all data. Make a backup first and restore without the settings. Reformat the card in the phone and remove the card using the menu from the power button. Do not encrypt the card as a test.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Facing a very strange problem plz help

    hello experts
    before sometimes code that is given below was working very well
    i doesn,t make any change in this code but after sometime when i run this code thn rs.getstring(1) was not able to acess the data while rs.next(); methode is working properly
    is something wrong here or i am missing some very important in this i am very puzzled please help me
    <%@ page language="java" import="java.sql.*" %>
    <title>Process the authentication</title>
    <body background="images/modbkgnd.jpg" bgproperties="fixed">
       String tablename="",query1;
       tablename = request.getParameter("thread");
       String subject = request.getParameter("Subject");
       Connection conn=null;
       ResultSet rs;
       Statement st=null;
       query1="select * from "+tablename;
        <p><font size="1"color="#CC00CC"><span style="background-color: #C0C0C0">
           <%= subject %> 
                        <%= rs.getString(2) %>  
                <%=rs.getString(3) %>    
               </span></font><span style="background-color: #808080">
        <a target="_blank" style="text-decoration: none" href="replyforum.jsp?tableid=<%=tablename%>"> <font size="1" color="#FFFFFF">Reply>></font>
        <table width=60% style="border-collapse: collapse" cellpadding="0" cellspacing="0" border="0" >  
            <tr align=left>
              <td width=60%><font size="1" color="#800000"><%= rs.getString(1) %>
    <%    }
         }catch(SQLException ex)
           out.print("Please try after some time");

    hello guys for your valuable support but i have tried that thing you are saying above
    when i write rs.getString(1) before other it still give unable to access database
    think something else i am very confused
    [i have told u that code initially was working but now i don,t know why ......................................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Very strange problems since upgrading.

    Ok, since I did a Pacman -Syu a week or so ago, I've been having some very strange issues.
    Number one, about 60-70% of the time I am completely unable to log into the box, I end up rebooting over and over to finally get the desktop environment to successfully load. It ran fine before. My rc.conf looks like this:
    MODULES=(dm_mod fuse)
    INTERFACES=(eth0 eth1)
    gateway="default gw 192.168.xxx.xxx"
    DAEMONS=(syslog-ng network netfs crond hal fam apcupsd httpd mysqld ntpd gdm)
    What will happen is gnomes new login screen (I assume it's gnomes new login screen anyway), will pop up, I'll log in by selecting name, entering password... all fine. Then the hard drive will go nuts for a second or so (expected), and I'll get an untitled window that pops up and says:
    unable to update ICEauthority file /home/user/.ICEauthority
    Which is strange, since to my understanding, I've never installed or used ICE. Then another window pops up with more information that I am unable to remember (too long). Then it will grind a bit, then stop at the same leaf background gnome startup used, then a final window will pop up complaining that Nautilus is unable to create the directories  "/home/user/Desktop" or "/home/user/.Nautilus".... which is complete horsecrap since those directories have existed on this hard drive for years now.
    Then it simply stops at the leaf background, and nothing else loads. So of course my first thought when I upgraded was, aw crap, X needs some work again. So I immediately do a {CTRL}-{ALT}-{F2} to get a bash prompt... and suddenly the plot thickens... I get nothing, just a blank screen with a cursor in the upper left. No bash login, nothing. So again I figure, ok, no big deal, I logged on F7, I'll just go back and kill X... I go back, still leaf screen, then hit {CTRL}-{ALT}-{BSPACE}... nothing. I can't kill X, and I can't get a bash login. I'm stuck. The only command that works is {CTRL}-{ALT}-{DEL}.
    So of course being the lazy bastard that I am, and this box being a MythTV box, I figure, no problem, I'll fix that later since if I reboot enough I can get logged in and everything is fine, I'll just leave it running like I always do. Except for last night when I decide to tackle the problem. I thought I was being very smart when I removed 'gdm' from the final daemon in /etc/rc.conf... until I realized that just left me with a computer that had booted, but NO BASH LOGIN PROMPT. Nothing, no way to control the computer at all. I was just sitting there watching my Mythbackend spit out notices and errors one by one, unable to get any sort of # or $. I managed to grab an old archlinux CDrom and use it to rescue the system by restoring an old /etc/rc.conf, but I have no understanding why I would not get a login prompt.
    So you see, I'm quite stuck. I cannot seem to get any sort of command-line login prompt without X running (terminal still works) to fix things. And 60-70% of the time, X/gnome will not finish starting up. Any help?
    Last edited by jeremyrainman (2009-12-02 14:24:10)

    miau wrote:
    Maybe you are ot allowed to write the ICEauthority file...what is the output of
    ls -l /home/user/.ICE*
    output is:
    $ ls -l /home/user/.ICE*
    -rw------- 1 user user 12878 2009-12-02 11:41 /home/user/.ICEauthority
    schuay wrote:
    Not having a bash login prompt looks either like
    a fscked /etc/inittab. Your output should look like this:
    ~]$ grep tty /etc/inittab
    c1:2345:respawn:/sbin/agetty -8 38400 tty1 linux
    c2:2345:respawn:/sbin/agetty -8 38400 tty2 linux
    c3:2345:respawn:/sbin/agetty -8 38400 tty3 linux
    c4:2345:respawn:/sbin/agetty -8 38400 tty4 linux
    c5:2345:respawn:/sbin/agetty -8 38400 tty5 linux
    c6:2345:respawn:/sbin/agetty -8 38400 tty6 linux
    Or this:
    I looked through that thread there, it sounds like a udev + kernel 31 issue? so I promptly did:
    $ uname
    And suddenly became alarmed that I'm not seeing a linux version number. Why would this happen? I went through what fixed it for other people on that thread (renaming udev directories, reinstalling udev), and it hasn't made any difference, so I think this is a different issue.
    The other two suggestions in this thread would seem to be worthless since the /.ICEauthority file has the proper ownership/permissions.
    Still at a loss. wiping and reinstalling is not pretty on a mythbox with nearly a terrabyte of recorded TV.

Maybe you are looking for

  • Third Gen ipod won't work or restore

    My friend has an old ipod with the click wheel. I think it's third generation. He hasn't been able to turn it on, and when it is connected to the computer it isn't recognized in Itunes. A couple times, a message popped up that said it needed to be re

  • Can't open PDF with flash after upgrade Reader 10.1.5 and Flash player 11.5.502.146

    We rolled out Reader 10.1.5 and Flash 11.5.502.146 [Windows 7] this week and discovered that one can not view a PDF containing Flash content. We receive the message "To view the Flash Technology content in this PDF file, please install the required v

  • Production environment, error in BPELConsole

    Hi there, I had installed, following step by step the installation guides, a production environment on three linux boxes RHE3; one for the DB v10g and in the others two an AS whit j2ee and web cache and obviously BpelPM. I do not installed WebCache A

  • Exporting movie for use on Powerpoint - Windows

    Does anybody know what settings I should use if I want to use a movie footage on Windows Powerpoint (it is for a friends presentation tomorrow). It is a 8min film. Tried Mpeg 4 - After 30mins it was estimating 500 mins!!! Would another (quicker) enco

  • Best Video Sender on the market

    Hi, ive currently got sky multi room - main box in the living room is a hd box with a wired internet connection, second box is a wifi hd box in the playroom. Looking to get sky in one of e bedrooms also so looking for a good quality video sender usin