[JBoss Tools] New message: "How to reverse engineer tables from multiple schemas?"
by Wouter Hartog
User development,
A new message was posted in the thread "How to reverse engineer tables from multiple schemas?":
http://community.jboss.org/message/518862#518862
Author : Wouter Hartog
Profile : http://community.jboss.org/people/wouterhartog
Message:
--------------------------------------------------------------
My setup:
- MySQL 5.1
- Seam 2.2
- Jboss Tools 3.0
- Eclipse 3.4.2
I can’t get multiple schemas to reverse engineer. It seems like I can only do one schema at a time, but then my classes are not annotated with a specific schema, so when I would have the same table name in multiple databases, I may have a problem.
What I tried:
- Removing hibernate.default-catalog property in persistence.xml (I already removed the hibernate.default-schema, since that seemed to confuse MySQL)
- Leaving out the schema name in the connection-url in the myproject-ds.xml (datasources)
- Leaving out the schema name in the hibernate.connection.url property in the hibernate.cfg.xml file
In the Hibernate Code Generation Configuration tool (which is a really cool config tool), I added a reveng.xml file that included two schemas, but it still only reverse engineered the one schema.
How can I get tables from multiple schemas to reverse engineer?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518862#518862
14 years, 3 months
[EJB 3.0] New message: "Re: Persistence unit issues when migrating to JBOSS 5.1.0"
by Dragos Bobes
User development,
A new message was posted in the thread "Persistence unit issues when migrating to JBOSS 5.1.0":
http://community.jboss.org/message/518857#518857
Author : Dragos Bobes
Profile : http://community.jboss.org/people/dbobes
Message:
--------------------------------------------------------------
I found a way to specify which jars should be scanned for hibernate annotations. In persistence.xml:
<persistence-unit name="myapp">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/jdbc/myapp</jta-data-source>
<jar-file>myseammodule.jar</jar-file>
<properties>
...
</persistence-unit>
Now the container scans the myseammodule.jar for hibernate classes and everything works fine.
I still wonder if this structure is the best way to have the persistence unit scope set to ear level. I find it strange that I have to create an empty jar just to place persistence.xml at the root level of the ear.
Is there a better way to accomplish this?
Thanks,
Dragos
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518857#518857
14 years, 3 months
[EJB 3.0] New message: "Persistence unit issues when migrating to JBOSS 5.1.0"
by Dragos Bobes
User development,
A new message was posted in the thread "Persistence unit issues when migrating to JBOSS 5.1.0":
http://community.jboss.org/message/518847#518847
Author : Dragos Bobes
Profile : http://community.jboss.org/people/dbobes
Message:
--------------------------------------------------------------
Hello everyone,
I have a seam application that used to run fine in JBOSS 4.2.3 and the ear had the following structure:
myapp.ear
+- lib/
| +- extejbmodule.jar
| +- ...
+- mywebmodule.war
+- myseammodule.jar
| +-META-INF/
| | +- persistence.xml
| +- ... hibernate entities ...
| +- ... ejbs ... | +- ...
+- ...
extejbmodule.jar has several classes that are injected (using @PersistenceContext) with the default persistence unit defined in the myseammodule.jar. When the ear is deployed to 5.0, due to the new persistence unit scope approach, the persistence unit is not visible to the extejbmodule.jar and I get :
Can't find a persistence unit named 'null' in AbstractVFSDeploymentContext@2127445{....
I created a new jar that only contains the persistence.xml file in its META-INF folder and I placed it in the root of the ear file. The ear structure looks like this now:
myapp.ear
+- lib/
| +- extejbmodule.jar
| +- ...
+- myseammodule.jar
| +- ... hibernate entities ...
| +- ... ejbs ...
+- persistence.jar
| +-META-INF/
| | +- persistence.xml
| | +- ...
+- mywebmodule.war
+- ...
And I defined the new module in META-INF/application.xml:
<module>
<java>persistence.jar</java>
</module>
With this approach both the extejbmodule.jar and the myseammodule.jar can see the persistence unit but the hibernate classes are not scanned for annotations and no entities are mapped. The log entry looks like this:
14:59:51,868 DEBUG [AbstractJarVisitor] Searching mapped entities in jar/par: vfszip:/C:/work/tools/jboss-5.1.0.GA/server/default/deploy/myapp.ear/persistence.jar/
It looks like the ejb container only scans the jar that contains the persistence unit definition.How can I instruct the container to scan the correct jars? Or, if my approach is not correct, what is the best way to have the persistence unit be available in the entire ear scope (available to all modules)?
Thanks,
Dragos
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518847#518847
14 years, 3 months
[Beginner's Corner] New message: "Re: Strange desktop problem: Gnome locks up when I start JBoss5.1GA"
by Peter Johnson
User development,
A new message was posted in the thread "Strange desktop problem: Gnome locks up when I start JBoss5.1GA":
http://community.jboss.org/message/518842#518842
Author : Peter Johnson
Profile : http://community.jboss.org/people/peterj
Message:
--------------------------------------------------------------
So are you saying that the "hang" happens after the "started in xxx seconds" message? (I ask because you earlier said "10 seconds" and I have yet to find any hardware in which JBoss AS 5.1, at least the 'default' config, will start in under around 30 seconds.)
Socket hangs can cause issues, though I usually see long pauses of not activity by the app (usually JBoss AS) waiting on the socket. Have you noticed any other networking issues after your upgrade to Fedore 12? It could be that the NIC driver is not quite right (I had to downgrade my laptop from Ubuntu 9.10 to 9.04 because, among several other issues, the wireless network driver did not work).
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518842#518842
14 years, 3 months
[JBoss AOP] New message: "Deploying AOP in 5.1 with pojo cache"
by Sudeep Mahorker
User development,
A new message was posted in the thread "Deploying AOP in 5.1 with pojo cache":
http://community.jboss.org/message/518841#518841
Author : Sudeep Mahorker
Profile : http://community.jboss.org/people/sudeep575
Message:
--------------------------------------------------------------
Hi , i am new to jboss. I am trying to deploy jboss pojo cache 3.0 on jboss 5.1.
When i am trying to attach the object to pojo cache, it is throwing error as object need to be serialized or instrumented.
i am using @Replicable annotation over my persisitence object. In my build.xml i am trying to instrument object using pojocache-aop.xml and javassist. here is the build.xml i am using. My object is not instrumenting correctly. @ Replicable annotation is not working properly.
Here i am attaching pojocache-aop.xml.
<target name="war" depends="compile">
<java classname="com.test.pojo.Vehicle" fork="true" >
<jvmarg value="-Xmx128M"/>
<jvmarg value="-javaagent:WebContent/WEB-INF/lib/jboss-aop.jar"/>
<jvmarg value="-Djboss.aop.path=WebContent/META-INF/pojocache-aop.xml"/>
<classpath refid="compile.classpath"/>
<classpath path="build/classes" />
</java>
<war destfile="dist/Cache.war" webxml="WebContent/WEB-INF/web.xml">
<fileset dir="WebContent"/>
<lib dir="WebContent/WEB-INF/lib"/>
<classes dir="build/classes"/>
</war>
</target>
Can anyone pls help me out ?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518841#518841
14 years, 3 months