The Source for Java Technology Collaboration
Webmaster Alert: Posting to Jive Forums is currently not working. Estimated time for fix is unknown.

Home » java.net Forums » GlassFish » GlassFish

Thread: Can't deploy EJB3 app based on Hibernate?

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 11 - Last Post: Jul 24, 2006 12:36 AM by: rickcarson
zambizzi

Posts: 231
Can't deploy EJB3 app based on Hibernate?
Posted: Jun 27, 2006 4:24 PM
  Click to reply to this thread Reply

I followed these instructions:

http://blogs.sun.com/roller/page/GlassFishPersistence#use_hibernate_as_a_persistence

...yet when I deploy a very simple app (one entity, one SLSB which just queries that entity) - I get this output:

**************************************************

ADM1006:Uploading the file to:[C:\Documents and Settings\vjenks\Local Settings\Temp\s1astempdomain1server-867837786\GFTest.ear]
deployed with moduleid = GFTest
ADM1041:Sent the event to instance:[ApplicationDeployEvent -- enable GFTest]
WEB0100: Loading web module [GFTest:GFTestWEB.war] in virtual server [server] at [/GFTestWEB]
File "C:\Program Files\glassfish\domains\domain1\docroot\GFTest\index.jsp" not found
ADM1041:Sent the event to instance:[ResourceDeployEvent -- reference-added jdbc/NorthwindDS]
CORE5004: Resource Deployed: [jdbc:NorthwindDS].
ADM1064:The upload file at [C:\Documents and Settings\vjenks\Local Settings\Temp\s1astempdomain1server-867837786\GFTest.ear] exists and will be overwritten.
ADM1006:Uploading the file to:[C:\Documents and Settings\vjenks\Local Settings\Temp\s1astempdomain1server-867837786\GFTest.ear]
deployed with moduleid = GFTest
ADM1041:Sent the event to instance:[ApplicationDeployEvent -- enable GFTest]
JTS5014: Recoverable JTS instance, serverId = [3700]
About to load the system app: MEjbApp
LDR5010: All ejb(s) of [MEjbApp] loaded successfully!
About to load the system app: __ejb_container_timer_app
EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]
LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!
error trying to scan <jar-file>: file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:550)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:306)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:119)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:195)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:91)
at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:849)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:179)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:216)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:189)
at com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:754)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:914)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:892)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:445)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
at com.sun.enterprise.admin.server.core.AdminNotificationHelper.sendNotification(AdminNotificationHelper.java:128)
at com.sun.enterprise.admin.server.core.ConfigInterceptor.postInvoke(ConfigInterceptor.java:109)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:97)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:56)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:142)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:109)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:180)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: The system cannot find the path specified
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:40)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:37)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:541)
... 50 more
Caused by: java.util.zip.ZipException: The system cannot find the path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.zip.ZipFile.<init>(ZipFile.java:234)
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:35)
... 52 more
|#]
CORE5021: Application NOT loaded: [GFTest]

****************************************************

I think Glassfish is great! I'm interested in migrating from JBoss, possibly, however it *must* work w/ Hibernate as the persistence framework as we have a lot of code that uses some Hibernate-specific annotations and we're not interested in refactoring all of that.

Any help would be much appreciated, thanks!

mm110999

Posts: 12
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 8:53 AM   in response to: zambizzi
  Click to reply to this thread Reply

There might be something wrong with your archive. Can you please verify your archive using the verifier.

verifier is present in $GLASSFISH_HOME/bin/verifier

zambizzi

Posts: 231
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 9:55 AM   in response to: mm110999
  Click to reply to this thread Reply

I've never used this but it seems intuitive enough - it wants to verify a .ear file. My test application was built w/ Netbeans 5.5 and deployed that way as well...so there was no .ear file to be found.

So, I undeployed the app and re-deployed it by dropping the .ear created by Netbeans into the autodeploy directory...seconds later a file appeared in the same directory w/ the same name w/ a "_deployed" appended to it...looks like it deployed. It still won't *run* so I tested that .ear w/ the verifier app.

I ran verifier -u to get the GUI and all tests either "Passed" or were "Not Applicable" and the readout at the bottom was "GFTest.ear: There were no failed tests."

I checked the log again and see this:

[#|2006-06-28T10:43:16.870-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=21;_ThreadName=Timer-4;|[AutoDeploy] Selecting file C:\Program Files\glassfish\domains\domain1\autodeploy\GFTest.ear for autodeployment.|#]

[#|2006-06-28T10:43:17.451-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=21;_ThreadName=Timer-4;|deployed with moduleid = GFTest|#]

[#|2006-06-28T10:43:17.611-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.system.core.classloading|_ThreadID=21;_ThreadName=Timer-4;_RequestID=1f4986b6-b129-4b8b-891b-f6d6f8a9630c;|error trying to scan <jar-file>: file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/
java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:550)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:306)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:119)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:195)
at com.sun.enterprise.server.PersistenceUnitLoaderImpl.load(PersistenceUnitLoaderImpl.java:91)
at com.sun.enterprise.server.AbstractLoader.loadPersistenceUnits(AbstractLoader.java:849)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:179)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:196)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:633)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:908)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:892)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:445)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:296)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:203)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:285)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:119)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:263)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:281)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:534)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:413)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:394)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:253)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:358)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: The system cannot find the path specified
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:40)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:37)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:541)
... 46 more
Caused by: java.util.zip.ZipException: The system cannot find the path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:203)
at java.util.zip.ZipFile.<init>(ZipFile.java:234)
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:35)
... 48 more
|#]

[#|2006-06-28T10:43:17.621-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.system.core|_ThreadID=21;_ThreadName=Timer-4;GFTest;_RequestID=1f4986b6-b129-4b8b-891b-f6d6f8a9630c;|CORE5021: Application NOT loaded: [GFTest]|#]

[#|2006-06-28T10:43:17.621-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.system.tools.admin|_ThreadID=21;_ThreadName=Timer-4;Error while loading application [GFTest]. Please refer to the server log for more details. ;_RequestID=1f4986b6-b129-4b8b-891b-f6d6f8a9630c;|ADM1075:Error on listening event:[Error while loading application [GFTest]. Please refer to the server log for more details. ]|#]

[#|2006-06-28T10:43:17.621-0600|WARNING|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=21;_ThreadName=Timer-4;_RequestID=1f4986b6-b129-4b8b-891b-f6d6f8a9630c;|Warning while deploying : com.sun.enterprise.deployment.backend.IASDeploymentException: Error while loading application [GFTest]. Please refer to the server log for more details.
.|#]

[#|2006-06-28T10:43:17.621-0600|INFO|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=21;_ThreadName=Timer-4;|[AutoDeploy] Successfully autodeployed : C:\Program Files\glassfish\domains\domain1\autodeploy\GFTest.ear.|#]

Is there anything I can do? I've already spent a lot of time on this and those instructions obviously don't work. I'm afraid I'll have to stick w/ JBoss if there's no answer to this - even though none of us here are entirely satisfied w/ our experience w/ JBoss so far - we have to have Hibernate compatibility.

I copied all of the jars in and changed my persistence.xml to be hibernate-compatible. I can't find anything else I should be doing after googling and searching forums extensively.

Thanks again!

ss141213

Posts: 500
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 9:36 AM   in response to: zambizzi
  Click to reply to this thread Reply

It looks like a bug in Hibernate. It is trying to open file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/ which is a directory as a jar file. That directory is where GFTestEJB.jar has been exploded by GlassFish deployment process.

Looking at the source code of org.jboss.util.file.ArchiveBrowser available at http://fisheye.jboss.com/viewrep/JBoss/jboss-common/src/main/org/jboss/util/file/ArchiveBrowser.java?r=1.2&k=

I see that it is using
new File(url.getFile())
.
It should be changed to
new File(url.toURI())

as URL.toURI() method does appropriate escape character decoding which is necessary since the original file name contains white space character. See http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#toURL() for more details.

Thanks,
Sahoo

zambizzi

Posts: 231
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 9:59 AM   in response to: ss141213
  Click to reply to this thread Reply

It looks like a bug in Hibernate. It is trying to open file:/C:/Program%20Files/glassfish/domains/domain1/applications/j2ee-apps/GFTest/GFTestEJB_jar/ which is a directory as a jar file. That directory is where GFTestEJB.jar has been exploded by GlassFish deployment process.

Looking at the source code of org.jboss.util.file.ArchiveBrowser available at http://fisheye.jboss.com/viewrep/JBoss/jboss-common/src/main/org/jboss/util/file/ArchiveBrowser.java?r=1.2&k=

I see that it is using

new File(url.getFile())

.
It should be changed to

new File(url.toURI())


as URL.toURI() method does appropriate escape character decoding which is necessary since the original file name contains white space character. See http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#toURL() for more details.

Thanks,
Sahoo


So, does this mean people are just *not* using Hibernate as a replacement to Toplink in Glassfish? Given this bug...unless people are altering and re-building Hibernate on their own, how could they be?

The blog posts about how simple it is to do this were a little misleading - there's obivously larger issues involved and I'm a little uneasy about proceeding, if that is the case.

Thanks for the info.


Message was edited by: zambizzi


ss141213

Posts: 500
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 10:34 AM   in response to: zambizzi
  Click to reply to this thread Reply

> So, does this mean people are just *not* using
> Hibernate as a replacement to Toplink in Glassfish?
> Given this bug...unless people are altering and
> d re-building Hibernate on their own, how could they
> be?
>
> The blog posts about how simple it is to do this were
> a little misleading - there's obivously larger issues
> involved and I'm a little uneasy about proceeding, if
> that is the case.

Hi,

It is indeed straight forward to replace TopLink Essential by Hibernate in GlassFish as that blog suggests. More over, people do use Hibernate in GlassFish. The problem you are facing is typical to Windows platform where a very common directory (i.e.) Program Files has white space in its name. This is not typically the case in Unix platform.
I think you can work around the problem: Have you installed GlassFish in C:\Program Files\glassfish? If yes, can you reinstall GlassFish in a directory which does not have "space" character in it and try running your program? Let us know how it goes.

Thanks,
Sahoo

zambizzi

Posts: 231
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 11:16 AM   in response to: ss141213
  Click to reply to this thread Reply

Wow, thank you! That did it, however I'm having other problems w/ Hibernate (JDBC driver) that I did not have in JBoss - but I'll start another thread for that.

Anyhow, I had no idea that was going to cause a problem! These forums have already proven to be more helpful than JBoss's forums, so it's appreciated!

ss141213

Posts: 500
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 28, 2006 11:21 AM   in response to: zambizzi
  Click to reply to this thread Reply

Glad to know that you have gone past that issue. I have reported it Hobernate forum and let's see if they respond to it:
http://forum.hibernate.org/viewtopic.php?p=2312088

Thanks for using our forum.

Thanks,
Sahoo

zambizzi

Posts: 231
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 30, 2006 2:13 PM   in response to: ss141213
  Click to reply to this thread Reply

In thinking about this afterward - it sure would be nice if Glassfish, being open, would include more than one persistence framework "out of the box" - for which you could then configure in the admin console. It'd be nice to log into the admin piece and just choose from a list of frameworks and let the server configure it for you.

Just a thought...

mvatkina

Posts: 764
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 30, 2006 4:14 PM   in response to: zambizzi
  Click to reply to this thread Reply

Check with NetBeans - I think they provide users with ability to choose a persistence provider for an appserver.

-marina

ss141213

Posts: 500
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jun 30, 2006 6:33 PM   in response to: zambizzi
  Click to reply to this thread Reply

GlassFish supports quite a few Java Persistence API implementations, e.g. TopLink, Hibernate, Kodo etc. Let us know which one you have in mind.

You are probably asking about distribution of those binaries with GlassFish. I am not so sure about this. With some modularization changes being planned for GlassFish it may be possible to download such binaries from a maven repository on demand and use it at runtime. Good point to think about.

-- Sahoo

rickcarson

Posts: 85
Re: Can't deploy EJB3 app based on Hibernate?
Posted: Jul 24, 2006 12:36 AM   in response to: ss141213
  Click to reply to this thread Reply

I was playing around with glassfish (installed in C:\glassfish) and trying to use some entity beans in an EJB module. None of the dependency injection scenarios worked for my 'Enterprise Client' module, so I tried doing it stand alone style, eg:

EntityManagerFactory factory;
EntityManager em;

factory = Persistence.createEntityManagerFactory("CreditTestAppClientPU");
em = factory.createEntityManager();

And that one spits the dummy because it is trying to load some weirdly named jar file into my temp directory under documents and settings:

Internal Exception: java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/<my user name>/Local Settings/Temp/acc-CreditTestClient.jar46172/CreditTest-ejb_jar

Naturally, this doesn't work, and I can't see a configuration setting to make Glassfish use a sensible temp directory.




 XML java.net RSS