Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » Codiing to create JDBC Data Source (weblogic 10)
icon4.gif  Codiing to create JDBC Data Source [message #394463] Fri, 27 March 2009 04:45
joaobamartins
Messages: 1
Registered: March 2009
Junior Member
Helo,

I'm trying to create and configure a JDBC Data source in WebLogic 10 trough the following code:

MBeanServerConnection connection;
....
ObjectName test = new ObjectName("com.bea:Name=vgndomain,Type=Domain");

JDBCSystemResourceMBean jdbcSR =(JDBCSystemResourceMBean)
connection.invoke(test,"createJDBCSystemResource", new Object[] {"myDataSource"}, new String[] {"java.lang.String"} );
...


The following error is retrieved:
Exception in thread "main" java.lang.ClassCastException: javax.management.ObjectName
at wlst.Weblogic10WebAppLogic.createDataSource(Weblogic10WebAppLogic.java:171)
at wlst.Weblogic10WebAppLogic.main(Weblogic10WebAppLogic.java:226)

In the WebLogic console is created a "Pending change" that must be activated to take effect.
In the "Pending Changes" Menu I have the following information:

Change: myDataSource
Type: <it's empty>
Description: "Created in vgndomain"
Restart Required: <it's empty>

When I do "activate" it's created a JDBC Data source, in the "JDBC Data Source table" there's a new Data Source with the following information:

Name: <it's empty>
JNDI Name: <it's empty>
Target: <it's empty>

I cannot even "click" on anything of this Data Source....

Can anybody help me with this please?

Thank you in advance

Best regards,

João Martins
Previous Topic: OC4J- Connections issues?.
Next Topic: Application & DB servers on Different Hosting Locations
Goto Forum:
  


Current Time: Wed Dec 11 16:06:29 CST 2024