[EJB 3.0] - Re: Basic EJB - cant be invoked from client
by r12345_2003
Following is the complete stacktrace:
|
| Exception in thread "main" javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
| at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1465)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1594)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at uk.co.autotrader.ejb3.client.CalculatorClient.main(CalculatorClient.java:13)
| Caused by: java.net.SocketTimeoutException: Receive timed out
| at java.net.PlainDatagramSocketImpl.receive0(Native Method)
| at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
| at java.net.DatagramSocket.receive(DatagramSocket.java:712)
| at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1435)
| ... 5 more
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141396#4141396
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141396
18 years
[EJB 3.0] - Re: Single persistence.xml file with multiple EJB jars
by DeanoUK
Persistence.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence">
| <persistence-unit name="msp-par">
| <jta-data-source>java:/maindatabase</jta-data-source>
| <jar-file>../ejbcommon.jar</jar-file>
| <jar-file>../ejbmsp.jar</jar-file>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="false"/>
| <property name="com.intellij.javaee.persistence.datasource" value="Datasource"/>
| </properties>
| </persistence-unit>
| </persistence>
|
|
I can't post the server.log file, this would be huge.
Suffice to say, it simply ends up with the below error, but without any previous error within the stack trace:
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: persistence.units:unitName=msp-par
| State: NOTYETINSTALLED
| Depends On Me:
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=AuditSe
| ssion,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=Company
| Session,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=Countri
| esSession,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=Dealers
| Session,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=UserLoc
| alesSession,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=Utility
| Session,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=EmailMa
| nagerSession,service=EJB3
| jboss.j2ee:ear=earmsp.ear,jar=ejbcommon.jar,name=Vehicle
| Session,service=EJB3
|
The package is laid out as I stated before:
earmsp.ear
----ejbcommon.jar
----ejbmsp.jar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141392#4141392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141392
18 years
[JBoss Tools (users)] - Re: How to configure Hibernate Console in a Maven project ?
by chawax
Thanks Max. I finally could make the configuration node work and now I can see all my EJB3 entity classes when expanding the configuration node, so no more problem with mapping file. The problem is that I don't exactly now how I solved this problem ! I Just made a maven clean then a maven install and it was OK. I will report it if I reproduce the problem, but I think it was my fault, not a problem with JBoss Tools ;)
Anyway I have another problem when opening Session Factory and Database nodes in Hibernate Configurations view. I think it deals with the way I configured the datasource since it can't find it.
The stack trace is following :
org.hibernate.HibernateException: Could not find datasource
| at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
| at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
| at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
| at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:99)
| at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
| at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:96)
| at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:58)
| at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
| at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
| at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
| Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
| ... 11 more
My persistence.xml files refers to a JNDI datasource, so there might be something special to do in hibernate.properties to make it work. Is there an example for this ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4141391#4141391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4141391
18 years