views:

124

answers:

2

I'm having this strange error with JBoss. It's strange because it's looking for some old projects that aren't even related to my current project and are also deleted from my workspace in eclipse.

When I try to get the current project to run, I get this error:

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.j2ee:ear=BibliotheekEAR.ear,jar=BibliotheekEJB.jar,name=Bibliotheek,service=EJB3" is missing the following dependencies:
    Dependency "" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=BibliotheekEAR.ear/BibliotheekJPA.jar#BibliotheekJPA' **")
  Deployment "jboss.j2ee:ear=BibliotheekEAR.ear,jar=BibliotheekEJB.jar,name=Bibliotheek,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:ear=BibliotheekEAR.ear,jar=BibliotheekEJB.jar,name=Bibliotheek,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")

DEPLOYMENTS IN ERROR:
  Deployment "" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=BibliotheekEAR.ear/BibliotheekJPA.jar#BibliotheekJPA' **
  Deployment "persistence.unit:unitName=BibliotheekEAR.ear/BibliotheekJPA.jar#BibliotheekJPA" is in error due to the following reason(s): org.hibernate.HibernateException: Hibernate Dialect must be explicitly set

Any ideas?

I have deleted all these projects, so I don't know why it's looking for them...

+1  A: 

It seems that you haven't set the Hibernate database dialect property correctly for the database your using in your application. Try setting your database dialect in your persistence.xml file like this:

<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>

In case you're using MySQL. Here is a list of the most common hibernate dialects used.

StudiousJoseph
I noticed I'm also getting the (same) error when I'm not running any projects and don't use a database. For some reason JBoss is looking for those BibliotheekJPA.jar and other Bibliotheek***** files when starting, up. Any idea why this would be?Thank you!
Sled
Make sure you've deleted all those files from your deploy directory, review every .ear, .war and .jar file, also look under your tmp directory.
StudiousJoseph
+1  A: 

I have deleted all these projects, so I don't know why it's looking for them

Deleted from where? Maybe double check that they aren't any remaining traces under the deploy or tmp directories of the server configuration you're using.

See also

Pascal Thivent
Hey, do you mean I should delete everything inside C:\JBoss\server\web\deploy and C:\JBoss\server\web\conf ? I'm not recognizing any names from my old projects (and I have indeed only deleted those from eclipse, I thought that would do the trick, didn't know they got copied into JBoss)
Sled
@Sled No, not everything under `deploy`, just the potential culprits. However, you can safely delete everything under `tmp` (do it). And I didn't mention `conf`.
Pascal Thivent
I'm sorry, I mean to type tmp, anyway: I restored my server folder from the original JBoss rar, and emptied tmp, that did it. Thank you for your help!
Sled