| View previous topic :: View next topic |
| Author |
Message |
ymajoros
Joined: 25 May 2009 Posts: 14
|
Posted: Thu Nov 05, 2009 2:26 pm Post subject: bug: cannot deploy ear to glassfish anymore - org.netbeans.modules.glassfish.javaee.db.SunDatasource cannot be cast to org.netbeans.modules.j2ee.sun.api.restricted.SunDatasource |
|
|
Suddenly (!), I cannot deploy from nb 6.7 to GF 2.1 P05. I first saw this while trying out Mojarra 2.0.1 on Glassfish, but I reverted since. Everything deploys fines from glassfish console.
Nothing in server log (I mean, nothing; after it has started anyway). Only this exception in output window (no red blinking icon or anything):
Deployment error:
org.netbeans.modules.glassfish.javaee.db.SunDatasource cannot be cast to org.netbeans.modules.j2ee.sun.api.restricted.SunDatasource
See the server log for details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:224)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:132)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:103)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:497)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.lang.ClassCastException: org.netbeans.modules.glassfish.javaee.db.SunDatasource cannot be cast to org.netbeans.modules.j2ee.sun.api.restricted.SunDatasource
at org.netbeans.modules.j2ee.sun.ide.dm.SunDatasourceManager.deployDatasources(SunDatasourceManager.java:81)
at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.deployDatasources(ServerInstance.java:706)
at org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleProvider.deployDatasources(J2eeModuleProvider.java:269)
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:186)
... 17 more
BUILD FAILED (total time: 22 seconds) |
|
| Back to top |
|
 |
nicephotog
Joined: 07 Nov 2009 Posts: 7 Location: Australia
|
Posted: Sat Nov 07, 2009 3:52 pm Post subject: |
|
|
choose when compiling and naming in your source if theyare actually the same.
| Quote: | | import org.netbeans.modules.glassfish.javaee.db.SunDatasource; |
| Code: | | import org.netbeans.modules.j2ee.sun.api.restricted.SunDatasource; |
In JDBC you get an error message saying "class ambiguous" for
| Code: | | javax.activation.DataSource; |
and
| Code: | | javax.sql.DataSource; |
by declaring something like
| Code: | | DataSource ds = (DataSource)theObj.getSource(); |
the secret is in the sauce of the import. _________________ Did you have the fish?..........................No. |
|
| Back to top |
|
 |
ymajoros
Joined: 25 May 2009 Posts: 14
|
Posted: Tue Nov 17, 2009 8:19 am Post subject: |
|
|
| Don't know what you're talking about. This is not a bug in my code, everything compiles fine and deploys to glassfish using admin console. The problem is while hitting the 'run' button from netbeans. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|