[Beginners Corner] - Jboss Oracle DS : Error wrong drivers
by minixman
All i have copied my classes12.zip and ojdbc.jar into the default/server/lib directory restart my jboss and tried to setup an oracle connection in my MDB bean as follows
| DataSource ds = (javax.sql.DataSource) ic.lookup("java:OracleDS");
| oraCon = ds.getConnection();
| logger.info("Initializing Oracle Datasource Connection.");
|
But when i send in a message and try and connect to the DS i get this error.
| 12:11:32,280 WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
| org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: oracle.jdbc.driver.OracleDriver, url: jdbc:gfmisapp:GrandSlam05:@10.142.204.76:1521:GFMIS)
| at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:250)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:491)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:301)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
|
The libs were copied from my Oracle installation jdbc/lib directory
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991613#3991613
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991613
18 years, 1 month
[EJB 3.0] - EJB QL/ JPQL and search for inheritance
by jrosskopf
Hello,
I have a problem with creating a QL expression for some of my entities. First of all I have an entity "Item" which has a ManyToMany reference to 0..* "Tags" But Tag is just a base class for more complex Entities such as "PlaceMark"
| @Entity
| public class Item implements Serializable{
| private static final long serialVersionUID = -6240744395949853067L;
| .
| .
| .
| /**
| * Get a list of tags associated with the item
| * @return list of tags associated with the item
| */
| @ManyToMany(cascade={CascadeType.PERSIST, CascadeType.MERGE})
| public List<Tag> getTags() {
| return tags;
| }
| public void setTags(List<Tag> tags) {
| this.tags = tags;
| }
| }
|
| @Entity
| @Inheritance(strategy=InheritanceType.SINGLE_TABLE)
| @DiscriminatorColumn(name="dtype", discriminatorType=DiscriminatorType.STRING)
| @DiscriminatorValue("Tag")
| public class Tag implements Serializable{
| private static final long serialVersionUID = 2432906233376577675L;
|
| long gid;
| String name;
| List<Item> items;
|
| @Id
| @GeneratedValue
| public long getGid() {
| return gid;
| }
| public void setGid(long gid) {
| this.gid = gid;
| }
|
| public String getName() {
| return name;
| }
| public void setName(String value) {
| this.name = value;
| }
|
| @ManyToMany(mappedBy="tags", cascade={CascadeType.PERSIST, CascadeType.MERGE})
| public List<Item> getItems() {
| return items;
| }
| public void setItems(List<Item> items) {
| this.items = items;
| }
| }
|
| @Entity
| @DiscriminatorValue("PlaceMark")
| public class PlaceMark extends Tag implements Serializable {
| private static final long serialVersionUID = -6646702308712255267L;
|
| boolean visibibilty;
| LookAt lookAt;
| Point point;
|
| public PlaceMark() {
| super.setName("PlaceMark");
| }
|
| @Embedded
| public LookAt getLookAt() {
| return lookAt;
| }
| public void setLookAt(LookAt lookAt) {
| this.lookAt = lookAt;
| }
|
| @Embedded()
| public Point getPoint() {
| return point;
| }
| public void setPoint(Point point) {
| this.point = point;
| }
|
| public boolean isVisibibilty() {
| return visibibilty;
| }
| public void setVisibibilty(boolean visibibilty) {
| this.visibibilty = visibibilty;
| }
|
| public void setName(String value) {
| }
|
| }
|
So now my question, how can I search for items annotaded with different types of tags in the "Tag" class hierachy?
Thank you in advance.
Regards
---
Joachim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991610#3991610
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991610
18 years, 1 month
[The Lizzard's corner] - Re: On the quality of user posts.
by adrian@jboss.org
Arrogant, No
Frustrated, Yes
Incidently, I no longer read these forums (well maybe once a month looking for
potential bug reports). I would be bald from pulling my hair out otherwise. :-)
Maybe when we move to the JBoss Portal version of the forums with
a reasonable system of moderation (that removes these useless posts from the
search index so it becomes usable again), I'll go back to contributing regularly.
On a related story, I had a problem with installing MySQL back in January,
but I couldn't find the answer to the problem, just "a million" posts mostly unanswered,
with a few saying this is an FAQ or use search.
I'd like to thank all those time wasters that obscured the post where it was
really answered (I couldn't find it),
because it made me go through the MySQL source to figure
out what the problem was for myself, so I learnt something.
In fact, it was a none problem, at least for me, just an irrelevant warning. :-)
This just shows the problem is a generic one, not just these forums.
In general, people that have real problems suffer because of the laziness of a
minority.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991608#3991608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991608
18 years, 1 month