facebook

Can not find datasource

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #200080 Reply

    I am using Eclipse M$, MyEclipse 3.6.4 and I get the following error when deploying my CMP 2.0 enity beans:

    org.jboss.deployment.DeploymentException: Error: can’t find data source: java:/DefaultDS; – nested throwable: (javax.naming.NameNotFoundException: DefaultDS not bound)

    The bad thing is that I added the “jboss” entry under XDoclet and set the datasource to MY datasource. Furthermore the begining of the

    <defaults>
    <datasource>java:/TIMDS</datasource>
    <datasource-mapping>MS SQLSERVER2000</datasource-mapping>
    </defaults>

    Also, for some reason jboss.xml and jbosscmp-jdbc.xml do not get placed under the META-INF folder. 🙁

    #200086

    Okay, I more clarification on my problem, I was trying to package all my stuff into an EAR and that is when I had the problems. IF I deploy the EJB’s seperately then it works fine. So it is a problem with the packaging that occurs for an EAR.

    I would be able to help more if the ant builds had more steps in it that I could “debug”.

    Thank in advance,

    Ron 🙁

    #200089

    The directory of the jboss.xml files may be set seperatly. Check your XDoclet settings. (jboss-> destDir=src/META-INF)

    Are developing/deploying CMP ord BMP entity beans? (meaning are you trying to use a DAO implementation?) Check the jboss.*-ref tags. The xdoclet jboss database mapping is only used by CMP entities (as far as i got it). You may need to reference the database directly (one ejb and one jboss tag is needed).

    Martin

    #200090

    One thing which is worth examining, try to deploy an exploded ear file. Check the files which are deployed. If some files are missing, the deployment function got an error within your web, ear or ejb project (since your ejb can be deployed seperatly, i guess its the web one). Currently the deployment function doesn’t give proper feedback on errors. It simply aborts deployment and leave an uncompleted deployment causing unpredictable errors up to deployment failures.

    If your ejb project can deployed without fail, try to create a new ear project and deploy the ejb within the new ear. If this work try to attach any other projects until the error occures.

    Hope this helps… .

    #200101

    support-michael
    Keymaster

    Does your project rely on other non-J2EE projects, libraries that you added to a project’s build classpath, …? Also if you are able to deploy an EJB project I would expect EAR deployment to succeed unless there are other factors that have not be shared so that we can better understand the issues.

    For Martin:

    It simply aborts deployment and leave an uncompleted deployment causing unpredictable errors up to deployment failures.

    I posted an issue report to have this addressed, e.g., minimally remove deployment descriptors to avoid appserver attempts to deploy partial app, and more generally remove all remnant resources.

    Michael
    MyEclipse Support

    #200110

    Support,

    I am able to deploy each project (web and ejb) seperately. It is just when I try and deploy an EAR that there is a problem. Really, the problem lives in the EJB side. The WAR works fine in either case. As I mentioned in the original post, the EJB’s can not find the proper datasource. Something is happening in the deployment that causes the

    The configuration is as follows:

    Eclipse 3.0 M4
    MyEclipse 3.6.4

    Jboss 3.2

    And I do NOT rely on any non-J2EE projects.

    Thanks in advance,

    Ron

    #200113

    Okay, I have another observation. The deployment of an EAR works just fine if you package it “EXPLODED”. So if you package it as an actual (PACKAGED) EAR then it does not work.

    Also, I did determine that the jboss.xml and jbosscmp-jdbc.xml files DO NOT end up in the META-INF directories like they should. Itgotaroundthisby copying them by hand into this directory.

    #200132

    Scott Anderson
    Participant

    Also, I did determine that the jboss.xml and jbosscmp-jdbc.xml files DO NOT end up in the META-INF directories like they should.

    This is probably because the destDir is not configured in the ejbDoclet’s jboss task. Please verify the setting and ensure that it points to your META-INF directory. Then, delete the existing descriptors and rerun XDoclet.

    If exploded deployment works and packaged doesn’t, I’d unjar the ear to a temp directory and look for any differences between it and the packaged version. It’s most likely that the packaged version also doesn’t contain jboss.xml and jboss-cmp-jdbc.xml as you reported above. Once the XDoclet settings are corrected, I’d expect packaged deployment to start working too.

    –Scott
    MyEclipse Support

    #200154

    That did the trick. So, essentially, you have to add your app server specific xdoclet tag to the project and direct the output to the src\META-INF directory to get it to work properly. Is that in the documenetation?

    I guess, I was under the impression that when I selected a deployment to an App server, that would automatically happen for me. Maybe a future feature request???

    #200157

    Scott Anderson
    Participant

    That did the trick. So, essentially, you have to add your app server specific xdoclet tag to the project and direct the output to the src\META-INF directory to get it to work properly. Is that in the documenetation?

    I believe it’s in the XDoclet reference manual, but I don’t think any attention is really drawn to it. I just checked the ‘Create an EJB’ tutorial and it definately makes no mention of it. I’ve entered an enhancement request to get this oversight corrected.

    I guess, I was under the impression that when I selected a deployment to an App server, that would automatically happen for me. Maybe a future feature request???

    It really should and that would be a good enhancement. We’ve got a general placeholder for ‘XDoclet integration improvements’ in our product plans and hope to start addressing them sometime early next year.

    –Scott
    MyEclipse Support

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Can not find datasource

You must be logged in to post in the forum log in