Database lookup fails with CMP bean and J2EE1.4

What else could I have missed?
Running my client, I am getting the following error in the
J2EE server:
RaceControllerBean ejbCreate
RaceControllerBean leaving
RaceControllerBean createRace
RaceControllerBean makeConnection
javax.naming.NameNotFoundException: No object bound to name java:comp/env/jdbc/Cloudscape
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:657)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:94)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.mnm.run.ejb.race.RaceControllerBean.makeConnection(Unknown Source)
The J2EE server shows this printout upon starting up:
Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:CloudscapeDB;create=true
Again, what could be the problem? Thanks for any help.
Andreas

you might need to add it as a resource for your bean in your ejb-jar.xml file, as follows
<enterprise-beans>
<entity>
<ejb-name>RaceControllerBean</ejb-name>
<resource-ref>
<res-ref-name>jdbc/Cloudscape</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>

Similar Messages

  • Problem with CMP bean and MySQL: please help me!!!

    Hi,
    I am using J2EE Sun server 1.3 and Mysql 4.0 database with its MySQL Connector/J 3.0.
    The driver connection to the database is fine since "Generate Default SQL" in deploytool gives "SQL generation complete".
    However, I can't have a simple row with one text field called test being created in my mysql table called test.
    Of course , the mysql server is started and the test table set for use.
    Here is my code (I try to access my database from a servlet using a CMP Entity bean):
    try{
    Context initial = new InitialContext();
    Object objref = initial.lookup(EntityHome.JNDI_NAME);
    EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    Entity test= home.create("zob");               
    /*EntityHome home = (EntityHome)PortableRemoteObject.narrow(objref,EntityHome.class);     
    catch (Exception ex){                                                                out.println("exception message : " + ex.getMessage()+"</body></html>");}
    I get the following exception message :
    RemoteException occurred in server thread; nested exception is: java.rmi.RemoteException: nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"; nested exception is: java.sql.SQLException: Syntax error or access violation, message from server: "You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"EntityCMPTable" WHERE "test" = 'zob'' at line 1"
    I would be very grateful for help since I have a close deadline for this!!!!!!!!
    Thank you very much in advance dear java experts!!!!!!!
                                       

    Hallo
    I have the same problem and the same configuration.
    Do you have a solution for this problem ??
    Thanks
    Georg

  • Handling BLOBs with CMP Beans

    Hi,
    is there a detailed example how to handle Blob's with CMP Beans?
    I'm trying to store some images in a database (Oracle 9i) using CMP Beans and Oracle iAS 9.03 and jdk 1.4.
    Thanks in advance
    Jens

    We are currently developing a How-To on this and will put this on OTN.
    1) Code snippet from Bean Class:
    public abstract byte[] getPicture();
    public abstract void setPicture(byte[] newPicture);
    public Long ejbCreate(Long empno, byte[] newPicture)
    setEmpno(empno);
    setPicture(newPicture);
    return empno;
    public void ejbPostCreate(Long empno, byte[] newPicture)
    2) Mapping in the orion-ejb-jar.xml:
    <entity-deployment name="EmployeePicture" data-source="jdbc/OracleDS" table="EMPPIC">
    <primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(8)"/>
    </primkey-mapping>
    <cmp-field-mapping name="empno" persistence-name="EMPNO" persistence-type="NUMBER(8)"/>
    <cmp-field-mapping name="picture" persistence-name="PICTURE" persistence-type="BLOB(4000)"/>
    </entity-deployment>
    3) Create the client to create the bean:
    Long empNo =(Long) Long.valueOf(request.getParameter("EmpNo"));
    String fileName =request.getParameter("ImageFileName");
    InputStream is = new BufferedInputStream(new FileInputStream(fileName));
    int len;
    // Initialize byte array
    byte byteValue[] = new byte[2048000];
    len = is.read(byteValue);
    EmployeePictureLocal employeePicture = empHome.create(empNo , byteValue);
    out.println("Picture of Emp#:"+empNo +" successfully Loaded into DB <br> <br>");
    4) Code snippet to view the image :
    Long empNo =(Long) Long.valueOf(request.getParameter("EmpNo"));
    out.println("Picture of Emp#"+empNo);
    EmployeePictureLocal emp = empHome.findByPrimaryKey(empNo);
    response.setContentType("image/jpeg");
    OutputStream os = null;
    os = response.getOutputStream() ;
    byte[] pic = emp.getPicture();
         os.write(pic);
    os.close();
    os = null;
    Let me know if this helps
    thanks
    Debu

  • Partial queries with CMP beans

    Hi,
    I have a custom finder method called findBySurname which takes in a string. I've set up the partial query to read: surname=$1 (where surname is the cmp field mapped to the table column). I've checked the orion-ejb-jar.xml file and the query has been inserted. However, when I run the sample client, I get a resultset that contains all the records in the table! I've got similar finder methods on 3 CMP beans and they all do the same thing. Is this a bug in the Release Candidate 2 version of Jdeveloper (which I'm using) or am I missing something?
    Thanks in advance,
    Gillian

    Known Issues along with the bug # are documented in the release notes of the product.
    You can see the release notes from Help menu of the product.
    raghu
    JDev Team

  • Transport of Transformation failed with RC= 12 and job: RDDEXECL cancelled in Target sytem

    Gurus,
    When i am importing the workbench request from dev to qty.
    I am getting error : Program terminated (job: RDDEXECL, no.: 22321300).
    Transformation contains only Endroutine.
    Job log:
    Job started
    Step 001 started (program RDDEXECL, variant , user ID DDIC)
    All DB buffers of application server xxxxxx were synchronized
    The internal session was terminated with the runtime error UNCAUGHT_EXCEPTION (see ST2
    Job cancelled.
    When i see the dump it is througing errror at the method of following class.
    CL_RSO_TLOGO_PERSISTENCY-CHECK_INITIALIZED
    Could you please help. Thanks in advance.
    Ashok

    Hi Ashok,
    In QA use program "RSTRAN_ROUT_RSFO_CHECK" to check and remove any inconsistencies for the transformations. After that again transport those transformations in new TR and import in QA.
    Also you have to search "Transport of Transformation failed with RC= 12 and job: RDDEXECL canceled in Target system" by Dinesh Tiwari.
    Check the reply of Fun Sébastien in http://scn.sap.com/message/13795238#13795238.

  • My IPOD Touch initially had a white screen.  I tried correcting this by restoring default settings via ITunes.  The Restore Failed with error 1602 and now the IPOD touch is completely dead. It will not power on or respond when I plug it into my PC via USB

    My IPOD Touch initially had a white screen.  I tried correcting this by restoring default settings via ITunes.  The Restore Failed with error 1602 and now the IPOD touch is completely dead. It will not power on or respond when I plug it into my PC via USB.  I get an error on my PC stating that device attached to USB port is not recognizable.  Can anyone help?

    Error 1602: Try the following steps to resolve this error:
    Ensure proper USB isolation troubleshooting has been performed, and test with a known-good cable.
    Follow the steps listed for Error 1604.
    This error may be resolved by disabling, deactivating, or uninstalling third-party security, antivirus, and firewall software. See steps in this article for details on troubleshooting security software.
    Above from:
    http://support.apple.com/kb/TS3694

  • Acrobat 7 mandatory update failing with error 16820 and blocking the use of the program

    Acrobat 7 mandatory update failing with error 16820 and blocking the use of the program

    Sorry I can't get the screen print to upload
    It says
    Mandatory Update Available
    A Mandatory version of this application is available for download. Application can't continue without installing this version.
    Application:     Acrobat_com
    Installed version: 2.0.0.0
    Update Version : 2.3.0.0
    Download now                    Quit
    Release notes ( this is blank)
    After selecting 'Download Now' I get the following message;
         Download failed
         There was an error downloading the update. Error #16820
         Close

  • Putting a row into a pageable cache failed with error 9 and error message

    Hi Guys,
                 I am fetting the follwoing message when the job is scheduled.
    Putting a row into a pageable cache failed with error <9> and error message <Db::put: Bad file descriptor>
    I read the forum and Manoj has suggested to one of the forum member to change the size of the Pcache setting through the server manager. But I do not see the setting there. can any one please let me know where exactly I can see and increase the size of the Pcache.
    Thanks

    Hi
    I've had the same problem.  We know from other (more meaingful) error messages that we ran out of space for the Pageable Cache, but we've just increased it by 50GB and still get the same error.
    Anyone??
    Btw i don't think you there is a setting for PCache size - it will just use all the free disk you have on the drive where you have located the PCache directory.
    Richard

  • Flash Player download keeps failing with lost connection and then gives up.  satellite Internet connection

    Win XP. Firefox 34.0.5 (latest)
    The Flash  Player download keeps failing with lost connection and then gives up.I am on a  satellite Internet connection.
    It seems to be extremely slow even when loading the installer which is only 1MB. Then when I run the installer and it starts to download the installation there are frequent messages about losing the connection and then finally gives up.
    I have had problems with other software failing when I am on a satellite link. This is most likely because of the huge latency which may be taken as a link failure. Ping times are typically 800ms but can be 2000ms sometimes!

    Hello,
    The online shim installer, which you are using actually downloads and installs Flash Player silently in the background.  If your satelite connection is experiencing latency issues it could result in the failure to download.  Please try the full installer posted at the bottom of the Installation problems | Flash Player | Windows page, in the 'Still having problems' section.
    Maria

  • LiveCycle ES Database Initialization Failing with Bootstrapping error

    I did non-turnkey installation of LCES on windows XP and deployed the adobe-livecycle-jboss.ear on Jboss-4.0.2 app server. Also created databases called adobe and adobe_meta in MySql and grant all permissions to adobe user.
    Then configured datasource as per deployment guide with jndi-name as IDP_DS and put the adobe-ds.xml file in server/all/deploy folder.
    When I try to initialize the database using Configuration Manager, the following error occurs:
    com.adobe.livecycle.bootstrap.BootstrapException: ALC-TTN-103-000: Bootstrapping request failed on server
    ALC-TTN-002-001: JDBC datasource lookup failed for resource reference [java:comp/env/jdbc/
    IdpDs]. The most likely cause is that a datasource having a JNDI
    name of [IDP_DS] does not exist or is misconfigured. Check the application
    server's configuration.
    In server console it shows javax.naming.NameNotFoundException: XAConnectionFactory exception.
    I am getting LiveCycle Administration Login page but could not loging since database entries have not done yet.
    If anybody could help me out of this issue that would be really appreciable.

    The issue with LiveCycle ES Database Initialization has been resolve and I am able to login to the administration console.
    It was an issue with Jboss which was giving some parsing exception. When removed the option ( -Djava.endorsed.dirs=%JBOSS_HOME%/server/all/lib/endorsed ) from the run.bat script, the server started smothly enough to complete the deploy process
    Thanks to all and I appreciate the support I got from the forum.
    Cheers.

  • Scheduled Web Intelligence report fails with ORA-01013 and WIS 10901

    Hi,
            the environment I'm working in is BOXI R2 SP4 on a Solaris 10 server using WebLogic running against Oracle 9i database.
    I have a report written by one of the users. In SQL Viewer the SQL detailed is two joined Select statements. Each time this report is either scheduled or refreshed is fails with an ORA-01012 and WIS 10901 error.
    I am of the understanding that this failure relates to the fact that the 'Limit Execution Time To;'  value is being exceeded.
    I also understand that this value is infact divided by the number of Select statements present, and that each Select statment is them allocated an equal portion of this value.
    If any of this is incorrect please correct me.
    I therefore have two questions
    1. As such would I be correct in assuming that in my scenario where 2 Select statments are present and where the execution limit is set to 30 minutes, that each Select has 15 minutes to complete, and that if either fails the ORA-01012 and WIS 10901 error is generated.
    2. Also would this error message get generated as soon as the first failure occurred, or would BO initiate a cancellation of the SQL by Oracle, ORA-01012, only when the final request has either succeeded or failed.

    The queries are not executed in parallel but in serial. So the total execution time configured will be for all the Select statements in the report combined.
    As for your second question, since the execution is not parallel hence BO will not initiate any error message until the total execution time exceeds the defined limit. This could be during the execution of first select statement or the second.
    Try executing the queries directly in database one by one and see how much time they are taking.
    - Noman Jaffery

  • New Databases are failing in East Asia And Japan

    Creating new SQL database & server at present fail in East Asia & Japan locations -> After creating can't connect - VS 2013 also prompts for firewall despite Azure Management panel showing FW rules in place.
    SQL Returns Error 64. (For the above locations)
    Creating new SQL DB's & servers in US locations appears fine.
    I often feel the guys that are supposed to manage azure are asleep at the wheel when it comes to non-US locations. It shouldn't have to be me that tells you when your services aren't provisioning correctly. IF anyone could be bothered please reply when the
    services are functioning again in East Asia... *It's also silly I need to pay Azure to submit a ticket to tell them they're stuff is broken, Azure has once again wasted my time. If someone there wants to post links to obscure webpages that (of course) don't
    fix the problem don't bother.
    Minor Rant over ... just get things fixed.

    Hi XinTW,
    Thanks for posting here.
    There was an outage reported on Last Friday with VS online and has been resolved on the same day.
    I suggest you to follow these steps and let us know if the issue still persists.
    Troubleshooting Connection-loss Errors
    Check the status of the SQL Database service: To check the status of the SQL Database service, use the
    Azure Health Status .
    The status page contains current service status information and historical service data.
    Trace connections: When the client application
    connects to SQL Database, CONTEXT_INFO (Transact-SQL) is set with a unique session specific GUID value automatically. You may retrieve this GUID value and use it in your application to trace the connectivity problems when necessary. For example code, see
    Development Considerations in SQL Database   
    Check DMV: SQL Database enables a subset of DMVs
    to diagnose the performance problems, which might be caused by blocked or long-running queries, resource bottlenecks, poor query plans, and so on. For a list of supported and unsupported DMVs in SQL Database.
    The
    Monitoring Windows Azure SQL Database Using Dynamic Management Views 
    topic also provides examples on how to detect common performance problems by using the DMV in SQL Database.
    Stress test: To reduce connection-losses from excessive
    resource usage, you can stress test your database application by slowly increasing the test workload until the desired level of concurrency is reached. When stress testing triggers a connection-loss, identify the resource limits by analyzing the returned reason
    codes and tune your application appropriately. For more information on reason codes, see
    Reason Codes 
    in the SQL Database Database documentation.
    Hope this helps you.
    Girish
    Prajwal

  • RMI tunneling: JNDI lookup fails with : Disconnected: Type code out of range, is -29

    9iAS Release 2
    When trying to tunnel through Apache to the OC4J_home instance using ...
    http:ormi://<host>:<HTTPport>/<application> <admin><password>
    and then looking up a JNDI name ...
    TopicConnectionFactory connectionFactory =
    (TopicConnectionFactory)new InitialContext(p).lookup("jms/myTopicConnectionFactory");
    I get a NamingException thrown, with the message: Disconnected: Type code out of range, is -29.
    The jms.xml file is correct. It works against a standalone OC4J instance (therefore no tunneling) ...
    ormi://<host>:23791/<application> <admin><password>
    I'm connecting from a standalone client and using the RMIInitialContextFactory, the tunneling is working (changing oc4j username/password gets a SecurityException). What's missing? Do you have to change the jndi name when tunneling? What does -29 mean in english?

    Tunneling through the Apache HTTP server to an OC4J instance from remote standalone clients works on Linux installations of 9iAS but not on NT installations, failing with a 'Type Code out of range, is -29' error, JVM versions on client and server are the same. Also works against a standalone version of oc4j on NT, what's happening?

  • Junk Characters while persisting data with CMP beans

    Hi
    when i am entering some data and saving the data to the data base using CMP beans ,its converting the data to junk characters like ��@y some times .Do you have any idea why its happening ?pls respond asap

    whats the data type you are using ? whats the App. server, the database ?

  • CR XI R2 "Database Login Failed" Recycled application pool and now it works

    Hello,
    I have a web application using CR XI R2 that has several reports which are pushed a dataset.  These reports have been runing fine until today when I received an error stating "Database login failed."  "Object reference not set to an instance of an object" in the report viewer control. 
    I recycled the application pool and the reports started working again. 
    My questions are:
    What could be the cause of this and how can it be avoided?
    Why does recycling the application pool correct the problem?
    Regards.

    Hi Tom,
    Recycling keeps problematic applications running smoothly, especially when it is not feasible to modify the application code. Recycling helps ensure that problematic applications do not cause other applications to fail, and that system resources can be recovered from unhealthy applications.
    Recycling an application pool causes the WWW service to shut down all running worker processes that are serving the application pool, and then start new worker processes. Whether the WWW service starts the new worker processes before it stops the existing one depends on the DisallowOverlappingRotation property in the metabase. Recycling an application pool does not alter any state in HTTP.sys or change any configuration in the metabase.
    Note:
    When an application pool is serviced by more than one worker process, the recycle operation is staggered in some scenarios. Only when a worker process is recycled on demand or when all of the worker processes hit their memory limits at the same time would they be restarted simultaneously.
    For more info regarding this have a look to this [article|http://blogs.msdn.com/david.wang/archive/2006/01/26/Thoughts-on-Application-Pool-Recycling-and-Application-Availability.aspx]
    Regards,
    Shweta

Maybe you are looking for

  • [SOLVED]Cannot run iptables probably after doing pacman -Syu

    Hi guyz, help me solving this issue. [shadyabhi@ArchLinux ~/redsocks]$ sudo iptables -L FATAL: Could not load /lib/modules/2.6.33-ARCH/modules.dep: No such file or directory iptables v1.4.8: can't initialize iptables table `filter': iptables who? (do

  • Report execution statistics

    How I can generate statistics about execution of report custom on the system? I know transaction ST03 but is not possible to analyze data in a long time range. I want to generate statistics to undestand if all reports custom present on the R/3 are us

  • Can i uninstall upgrade

    hi there can somebody help me please - ive just install lastest software upgarde for X10 and i hate it - its messed up my homescreen layout and menu screens - is there any way i can uninstall update please x

  • Idoc message type

    Experts, I want to know the detail of each message type DELFOR               Is there any transcation available where we can see DELINS                what these message type are used for. DESADV EDLNOT INVOIC ORDERS ORDRSP

  • How to fix runtime error info.plist not found?

    i have an ipod touch 5G on ios 7.0.6 and I decided to respring the springboard but when it came back on it displayed a box saying "runtime error: info.plist not found with options of continue or exit." I have tried both but none work. please help