facebook

Glassfish & TopLink

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #278695 Reply

    akbille
    Member

    Hello all,

    I have two problems with regards to the newest Sun Application Server 9.1, containing the TopLink JPA implementation.

    Well – to say first, I have build a test web service accessing an Oracle 10g database via JPA ( inserting some data ) and delivers some output.
    The service not only runs without problems, if I use the tomcat as container, but also it is possible to redeploy the webarchive giving that nice edit-compile-test-cycle.

    But – here is my problem:
    1. If I use SAS 9.1 ( glassfish ), the redeployment does not work, nor does removing of an already deployed archive works, if I use the “exploded mode” for archive delivery. The SAS 9.1 seems to lock the files of deployed archives ( exploded mode ) – anybody a suggestion how to remove that constraint ?

    2. I do not deliver the toplink libraries of MyEclipse, because SAS already contains these libs. But I currently deliver the ojdbc14_g.jar, so the class loader should be able to find the JDBC-thin-driver.

    But, while with Tomcat it works, with glassfish I get the exception:

    Internal Exception: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@SWING:1521:orcl
    Error Code: 0
    at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
    at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:102)
    at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
    at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
    at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
    at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
    at com.abille.myfirstwebservice.entity.EntityManagerHelper.getEntityManager(EntityManagerHelper.java:30)
    at com.abille.myfirstwebservice.entity.EntityManagerHelper.commit(EntityManagerHelper.java:47)
    at com.abille.myfirstwebservice.ws.HelloWorldServiceImpl.example(HelloWorldServiceImpl.java:21)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:59)
    at org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker.java:45)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(ServiceInvocationHandler.java:320)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(ServiceInvocationHandler.java:86)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(ServiceInvocationHandler.java:134)
    at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:109)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64)
    at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
    at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304)
    at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129)
    at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@SWING:1521:orcl
    at java.sql.DriverManager.getConnection(DriverManager.java:602)
    at java.sql.DriverManager.getConnection(DriverManager.java:154)
    at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:100)

    But otherwise I am able to connect ?

    Would really appreciate any idea.

    Best regards,
    Andreas

    #278713

    Loyal Water
    Member

    1. If I use SAS 9.1 ( glassfish ), the redeployment does not work, nor does removing of an already deployed archive works, if I use the “exploded mode” for archive delivery. The SAS 9.1 seems to lock the files of deployed archives ( exploded mode ) – anybody a suggestion how to remove that constraint ?

    I’ll get this checked.

    2. I do not deliver the toplink libraries of MyEclipse, because SAS already contains these libs. But I currently deliver the ojdbc14_g.jar, so the class loader should be able to find the JDBC-thin-driver.

    Have you added this to the classpath ?

    #278749

    akbille
    Member

    @support-nipun wrote:

    1. If I use SAS 9.1 ( glassfish ), the redeployment does not work, nor does removing of an already deployed archive works, if I use the “exploded mode” for archive delivery. The SAS 9.1 seems to lock the files of deployed archives ( exploded mode ) – anybody a suggestion how to remove that constraint ?

    I’ll get this checked.

    2. I do not deliver the toplink libraries of MyEclipse, because SAS already contains these libs. But I currently deliver the ojdbc14_g.jar, so the class loader should be able to find the JDBC-thin-driver.

    Have you added this to the classpath ?

    Hello, thanks for your investigation.

    But I would also like to tell you, that after some more experimentation I found that I simply have to run the server in debug mode, if I use redeployment of archives in “exploded mode” and delivery as a *.war, if I use the production mode of the server.

    Well, after all, this is not bad … it’s all I need then.

    And, well, yes, the odbc*.jar was in the classpath – if I remove it from the path I get the different exception, telliing me that NO com.driver.oracle.OracleDriver ( or what was it ? ) was found, and not, that the found is not suitable. It was both in production and debugging mode of the server the same with both the ojdbc.jar and the ojdbc_g.jar.

    But – after all, I also found that there IS in some of the jar-files delivered by oracle some driver which is suitable – I simply have added them all to the classpath, brute force like.

    So – after that, everythings works just fine.

    Best regards,
    Andreas

    #278767

    Loyal Water
    Member

    Andreas,
    Thank you for posting your findings. Glad you got it to work.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Glassfish & TopLink

You must be logged in to post in the forum log in