Toplink JAXB - ClassCastException after redeploy in OC4J

Hi,
I'm experiencing an issue casting an unmarshalled object after the application is being redeployed in the container.
I'm trying to unmarshall an xml that I retrieve as a resource from the classloader (the xml is also in the jar)
The ClassCastException is being thrown at the point where I try to cast the unmarshalled object. A sysout on the unmarshalled object prints a classtype that I expect, so my first impression is that the cast fails due the ClassLoader used by the JAXBContext (?) So I've tried to create the JAXBContext with the ClassLoader parameter using the class' classloader directly and the contextClassLoader, both unsuccessfull.
The problem solves after I restart the OC4J container, but for convenience, I would like to solve this without having to restart, if possible.
Has anyone experienced this problem, or know a solution?
Thx!
Bert
Below, some example code and the console output on the server.
Code:
/* create the jaxb context */
JAXBContext context = JAXBContext.newInstance(
          "be.cm.apps.tpb.common.helper",
     Thread.currentThread().getContextClassLoader());
if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("JAXBContext=" + context);
/* create unmarshaller */
Unmarshaller unmarshaller = context.createUnmarshaller();
if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("Unmarshaller=" + unmarshaller);
/* open refac-config.xml as inputstream */
URL url = Thread.currentThread().getContextClassLoader().getResource(CONFIGURATION);
if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("url: " + url);
/* unmarshall the configuration */
Object unmarshalledObject = unmarshaller.unmarshal(url);
if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("unmarshalled object: " + unmarshalledObject);
* THROWS CLASSCASTEXCEPTION AFTER REDEPLOY
configurationDefinition = (ConfigurationDefinition) unmarshalledObject;
if (LOGGER.isDebugEnabled()) {
     LOGGER.debug("<- initialize()");
Output:
|DEBUG|JAXBContext=oracle.toplink.ox.jaxb.JAXBContext@675f26|º@#
|DEBUG|Unmarshaller=oracle.toplink.ox.jaxb.JAXBUnmarshaller@97dadf|º@#
|DEBUG|url: code-source:/C:/java/101310/j2ee/home/applications/tpb/tpb-online-1.0.0.jar!/refac-config.xml|º@#
|DEBUG|unmarshalled object: be.cm.apps.tpb.common.helper.ConfigurationDefinition@8f310f|º@#
|ERROR|Unable to create BusinessFacade instance named be.cm.apps.tpb.business.facade.SendingManager|
Caused by: java.lang.ClassCastException: be.cm.apps.tpb.common.helper.ConfigurationDefinition
at be.cm.apps.tpb.common.helper.ConfigHelper.initialize(ConfigHelper.java:93)
... 83 more

Hello Bert,
This is a known issue and there is a patch that is available from Oracle Support. When you contact support please indicate whether you are using TopLink 10.1.3 or 10.1.3.1. Also you can refer Oracle Support to me and I can help them find the correct patch.
-Blaise

Similar Messages

  • ClassCastException after deploy - bug

    Greetings,
    After much discussion in the Jdev forum, some here, alot of past discussion
    on the hierarchial nature of J2EE container's classloaders,
    which all makes sense and is consistant with observed behavior for me
    and other posters:
    It still seems to me that there's a bug in OC4J 903 that allows for ClassCastExceptions after re-deployment in Apps
    that happen to have the same classes.
    All the experts weighed in with discussion of how the container class loaders disallow cross loading of classes
    from adjacent applications. Great, then
    the ClassCastExceptions shouldn't happen. No?
    Regardless, the simple issue is; there should be under no circumstances a need
    to bounce an appserver after every deployment, to flush out stale classes that otherwise would cause ClassCastExceptions.
    Can OC4J experts explain why I should have to bounce 903 OC4J after every
    deploy?
    Is this issue being worked on (fixed) in 904?
    Thanks, curt

    Are there any opinions or even similar experiences with
    ClassCastException's following hot deploys?
    Thanks, curt

  • Problem staring KJS after redeploying application in IAS6SP2

    After redeploying an application to IAS6SP2 several times, I suddenly get
    the following errors when trying to start KJS:
    Starting Java Engine
    Engine running on Solaris VM 1.2.2 JVM supplied by Sun Microsystems Inc.
    Connected to LDAP server
    Initializing LDAP cache from server
    Could not initialize LDAP cache from server
    [04/Sep/2001 21:36:42:2] error: BINDER-004: GXBindWorker: invalid key defs
    {91F29620-16E1-11CF-96C8-0020AFED9A65}
    [04/Sep/2001 21:36:42:3] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {91F29740-16E1-11CF-96C8-0020AFED9A65}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {ED049D80-B936-1548-E481-080020721767}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {C6783B32-8996-11CF-AA51-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {02E58780-6BC3-11CF-AA3F-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {65F889A0-6BC3-11CF-AA3F-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {01C89538-123C-1850-BAA0-0800208C8EAD}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    The list goes on with more invalid key defs errors, and the server does not
    start. Has anyone seen this before and know how to correct the problem?
    Thanks.
    - Chun Cheng

    This is a problem which was previously discussed on this mailing list.
    Dunno if you tried to restart (iascontrol start) iAS several times but after
    a while all processes bind successfully.
    In a nutshell (assuming you are using < SP2), your problem is that you don't
    clean up your old references when you redeploy. What I mean by that, is you
    should always run "iasdeploy removeapp/removemodule .... " prior to
    redeploying. What you have now is a cache full of stale entries which are
    taking space in the ldap resulting in a slow startup. When you redeploy new
    entries are created (this has been changed in SP3) for all you components
    instead of overwriting.
    hope this helps,
    -robert
    "Chun Cheng" <[email protected]> wrote in message
    news:[email protected]...
    After redeploying an application to IAS6SP2 several times, I suddenly get
    the following errors when trying to start KJS:
    Starting Java Engine
    Engine running on Solaris VM 1.2.2 JVM supplied by Sun Microsystems Inc.
    Connected to LDAP server
    Initializing LDAP cache from server
    Could not initialize LDAP cache from server
    [04/Sep/2001 21:36:42:2] error: BINDER-004: GXBindWorker: invalid key defs
    {91F29620-16E1-11CF-96C8-0020AFED9A65}
    [04/Sep/2001 21:36:42:3] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {91F29740-16E1-11CF-96C8-0020AFED9A65}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {ED049D80-B936-1548-E481-080020721767}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {C6783B32-8996-11CF-AA51-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {02E58780-6BC3-11CF-AA3F-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {65F889A0-6BC3-11CF-AA3F-524153480000}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    [04/Sep/2001 21:36:42:4] error: BINDER-004: GXBindWorker: invalid key defs
    {01C89538-123C-1850-BAA0-0800208C8EAD}
    [04/Sep/2001 21:36:42:4] error: UTIL-loadcomponent_binding: loadComponent:
    binding
    The list goes on with more invalid key defs errors, and the server doesnot
    start. Has anyone seen this before and know how to correct the problem?
    Thanks.
    - Chun Cheng

  • Information is lost after redeployment of SAPMEINT - which workaround?

    Hello!
    After redeployment of SAPMEINT I noticed that some information concerning the SAMEINT MII webservices gets lost.
    I corrected this information manually afterwards - the information can be found in the old SAP ME 5.2 documentation
    (pre SP05).
    What I did was first undeploy of SAPMEINT and immediately afterwards a new deploy.
    Was the undeploy step unnecessary and therefore this step caused this annoyance?
    Or is it always necessary to re-run the SAPMEINT configuration wizard?
    I know that it is this configuration wizard, which updates the information as part of its function.
    This is the manual workaround:
    1. Log on the SAP NW admkinistratior console
    2. Goto Configuration Management / Infrastructure / Java System Properties / choose Applications tab
    3. Search for application xappsmeintegration~ear
    4. Change the following properties:
    webservice.authenticationMechanismType = 1
    webservice.Username = MESYS
    webService.Password = <password of MESYS>
    webservice.EndPointUrlPrefix = <URL to (MII hostname:port)/XMII/SOAPRunner>
    Kr,
               Erich Lind

    Hello,
    thank your for the answer and clarification.
    The have the benefit of the newest SAPMEINT version, this was deployed on the MII system.
    In future the SAPMEINTCTC wizard will be executed after redeployment of SAPMEINT.
    Kr,
              Erich Lind

  • ClassCastException with pubsub after redeployment

    Hello,
    I'm using pubsub with CometD/JQuery on client side on my application, which is deployed on WebLogic 10.3.6.
    However, after a redeployment, when I log in I get the following exception:
    java.lang.ClassCastException: weblogic.servlet.internal.session.SharedSessionData cannot be cast to weblogic.servlet.internal.session.SessionData
          at weblogic.servlet.httppubsub.WlsPubSubHelper.getAuthSubject(WlsPubSubHelper.java:20)
          at com.bea.httppubsub.security.wls.AbstractAuthorizationManager.hasPermission(AbstractAuthorizationManager.java:177)
          at com.bea.httppubsub.security.DelegateChannelAuthManager.hasPermission(DelegateChannelAuthManager.java:32)
          at com.bea.httppubsub.internal.ChannelImpl.hasPermission(ChannelImpl.java:129)
          at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doSecurityChecking(PublishRequestHandler.java:79)
          at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doHandle(PublishRequestHandler.java:44)    
    at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doHandle(PublishRequestHandler.java:29)     
    at com.bea.httppubsub.bayeux.handlers.AbstractBayeuxHandler.handle(AbstractBayeuxHandler.java:184)
          at com.bea.httppubsub.bayeux.handlers.AbstractBayeuxHandler.handle(AbstractBayeuxHandler.java:36)
          at com.bea.httppubsub.internal.PubSubServerImpl.handleMessage(PubSubServerImpl.java:500)
          at com.bea.httppubsub.internal.PubSubServerImpl.routeMessages(PubSubServerImpl.java:352)
          at com.bea.httppubsub.servlet.ControllerServlet.doRequest(ControllerServlet.java:280)
          at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at com.mycompany.framework.common.server.logging.UserServletFilter.doFilter(UserServletFilter.java:50)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at ch.qos.logback.classic.selector.servlet.LoggerContextFilter.doFilter(LoggerContextFilter.java:70)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at com.mycompany.framework.core.server.MyCacheFilter.doFilter(MyCacheFilter.java:46)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    It only happens for the first login, the second one works...
    Do you have any idea? Thanks in advance!
    Julien

    Hello,
    I'm using pubsub with CometD/JQuery on client side on my application, which is deployed on WebLogic 10.3.6.
    However, after a redeployment, when I log in I get the following exception:
    java.lang.ClassCastException: weblogic.servlet.internal.session.SharedSessionData cannot be cast to weblogic.servlet.internal.session.SessionData
          at weblogic.servlet.httppubsub.WlsPubSubHelper.getAuthSubject(WlsPubSubHelper.java:20)
          at com.bea.httppubsub.security.wls.AbstractAuthorizationManager.hasPermission(AbstractAuthorizationManager.java:177)
          at com.bea.httppubsub.security.DelegateChannelAuthManager.hasPermission(DelegateChannelAuthManager.java:32)
          at com.bea.httppubsub.internal.ChannelImpl.hasPermission(ChannelImpl.java:129)
          at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doSecurityChecking(PublishRequestHandler.java:79)
          at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doHandle(PublishRequestHandler.java:44)    
    at com.bea.httppubsub.bayeux.handlers.PublishRequestHandler.doHandle(PublishRequestHandler.java:29)     
    at com.bea.httppubsub.bayeux.handlers.AbstractBayeuxHandler.handle(AbstractBayeuxHandler.java:184)
          at com.bea.httppubsub.bayeux.handlers.AbstractBayeuxHandler.handle(AbstractBayeuxHandler.java:36)
          at com.bea.httppubsub.internal.PubSubServerImpl.handleMessage(PubSubServerImpl.java:500)
          at com.bea.httppubsub.internal.PubSubServerImpl.routeMessages(PubSubServerImpl.java:352)
          at com.bea.httppubsub.servlet.ControllerServlet.doRequest(ControllerServlet.java:280)
          at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at com.mycompany.framework.common.server.logging.UserServletFilter.doFilter(UserServletFilter.java:50)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at ch.qos.logback.classic.selector.servlet.LoggerContextFilter.doFilter(LoggerContextFilter.java:70)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at com.mycompany.framework.core.server.MyCacheFilter.doFilter(MyCacheFilter.java:46)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    It only happens for the first login, the second one works...
    Do you have any idea? Thanks in advance!
    Julien

  • How do I use toplink with Spring 2.5 and oc4j 10.1.2?

    Our existing java server environment is limited to Oc4j 10.1.2 due to being tied to Oracle Forms.
    We've added a java 6 jdk to the machine and linked it to a specific container to examine some newer java features since this version of the application server only comes with java 1.4.2.
    Does anyone have some configuration steps for getting toplink essentials and spring to work with oc4j 10.1.2? Even with oc4j 10.1.3 in jdev 10.1.3.4 I'm having problems trying to figure out what needs placed in the persistence.xml file verses what needs placed in the spring-beans.xml file.
    I'm trying to either use the J2SE option of keeping the connection information in the persistence.xml file (which doesn't work) - it tries to connect to //localhost:1521/orcl. If I try to define a datasource within Spring's xml file, I'm not sure how to tie that into the persistence.xml file. Could I use the oc4j 10.1.2 container provided datasource?
    It seems like I'm at a loss as to how to get this working. If you'd like me to post some files, I can do that later on today when I get back to work.
    The configuration that I'm trying to do is based on a modified workspace from an ibm developerworks article with websphere, mixing in the ideas from a JPA with Spring 2.0 article from Mike Keith and Rod Johnson. (That article goes pretty far in the configuration information but never provided an example to download...)
    Any help appreciated.
    Eric (hbg, pa)

    I'm still at a loss with this. Rather than worry about the older version, for now, I just want to see JPA in action. So, I've decided on just running the Spring 2.5.6 petclinic example out of the samples folder. When I try to do this, after only tweaking the web.xml to use the applicationContext-jpa.xml file, the application does not initialize properly. Here's the stack trace I get:
    Target URL -- http://192.168.0.2:8988/petclinic/index.jsp
    09/05/11 23:26:05 Oracle Containers for J2EE 10g (10.1.3.4.0)  initialized
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\connector.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/connector.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\jta.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/jta.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\persistence.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/persistence.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\toplink-essentials.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/toplink/jlib/toplink-essentials.jar (from <code-source> in /C:/jdev10134/jdev/system/oracle.j2ee.10.1.3.42.70/embedded-oc4j/config/server.xml). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    09/05/11 23:26:24 log4j: Reading configuration from URL file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/log4j.properties
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    2009-05-11 23:26:24,593 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization started>
    2009-05-11 23:26:24,687 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@eeb406: display name [Root WebApplicationContext]; startup date [Mon May 11 23:26:24 EDT 2009]; root of context hierarchy>
    2009-05-11 23:26:24,828 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/applicationContext-jpa.xml]>
    2009-05-11 23:26:25,281 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@eeb406]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:25,734 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [jdbc.properties]>
    2009-05-11 23:26:25,796 INFO [org.springframework.context.weaving.DefaultContextLoadTimeWeaver] - <Determined server-specific load-time weaver: org.springframework.instrument.classloading.oc4j.OC4JLoadTimeWeaver>
    2009-05-11 23:26:28,296 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#c25ae3' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,359 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,437 INFO [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] - <Building JPA container EntityManagerFactory for persistence unit 'PetClinic'>
    2009-05-11 23:26:28,468 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'entityManagerFactory' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,562 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,org.springframework.context.config.internalBeanConfigurerAspect,loadTimeWeaver,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.transaction.config.internalTransactionAspect,org.springframework.samples.petclinic.aspects.UsageLogAspect#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,clinic]; root of factory hierarchy>
    2009-05-11 23:26:29,671 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization completed in 5078 ms>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization started>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c00e55: display name [WebApplicationContext for namespace 'petclinic-servlet']; startup date [Mon May 11 23:26:29 EDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@eeb406>
    2009-05-11 23:26:29,734 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/petclinic-servlet.xml]>
    2009-05-11 23:26:30,171 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c00e55]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b>
    2009-05-11 23:26:30,375 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b: defining beans [addOwnerForm,addPetForm,addVisitForm,clinicController,editOwnerForm,editPetForm,findOwnersForm,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,messageSource]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:31,828 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization completed in 2094 ms>
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.transaction
    WARNING: PersistenceUnitInfo PetClinic has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: Server: unknown
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.connection
    CONFIG: connecting(DatabaseLogin(
            platform=>EssentialsHSQLPlatformWithNativeSequence
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    May 11, 2009 11:27:03 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    SEVERE:
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Error Code: 17002
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:150)
            at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:233)
            at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:242)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:309)
            at oracle.toplink.essentials.threetier.ConnectionPool.buildConnection(ConnectionPool.java:117)
            at oracle.toplink.essentials.threetier.ExternalConnectionPool.startUp(ExternalConnectionPool.java:135)
            at oracle.toplink.essentials.threetier.ServerSession.connect(ServerSession.java:451)
            at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:616)
            at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:282)
            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 org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
            at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
            at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:220)
            at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
            at org.springframework.samples.petclinic.jpa.EntityManagerClinic.getVets(EntityManagerClinic.java:39)
            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:585)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            at $Proxy19.getVets(Unknown Source)
            at org.springframework.samples.petclinic.web.ClinicController.vetsHandler(ClinicController.java:53)
            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:585)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
            at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
            at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
            at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
            at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
            at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
            at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
            at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
            at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
            at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1398)
            at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
            at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
            at oracle.j2ee.connector.ConnectionPoolImpl$NonePoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1211)
            at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
            at oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
            at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1596)
            at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1541)
            at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1486)
            at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
            at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:145)
            ... 60 moreAny ideas? I'd really like to see JPA, Spring and oc4j working together?
    Thanks,
    Eric

  • JAXB ClassCastException

    Hi
    Hope someone can help here
    [EDIT] Xjc compiles cpu.xsd perfectly fine[EDIT]
    I'm trying to unmarshal an xml document and i get the following error (When running in Netbeans:
    init:
    deps-jar:
    compile:
    run:
    java.lang.ClassCastException: javax.xml.bind.JAXBElement cannot be cast to generated.CPU
            at jaxbtest.Main.main(Main.java:24)
    BUILD SUCCESSFUL (total time: 0 seconds)The following are my source documents:
    cpu.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <cpu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="cpu.xsd">
         <numcores>4</numcores>
         <registers>32</registers>
    </cpu>cpu.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <xsd:element name="cpu" type="CPU"/>
         <xsd:complexType name="CPU">
              <xsd:sequence>
                   <xsd:element name="numcores" type="xsd:int"/>
                   <xsd:element name="registers" type="xsd:int"/>
              </xsd:sequence>
         </xsd:complexType>
    </xsd:schema>Main.java
    package jaxbtest;
    import generated.*;
    import javax.xml.bind.*;
    import java.io.*;
    public class Main
         public static void main(String[] args)
              try
                   JAXBContext jc = JAXBContext.newInstance("generated");
                   Unmarshaller u = jc.createUnmarshaller();
                   CPU cpu = (CPU) u.unmarshal(new File("cpu.xml"));
                   System.out.println(cpu.getRegisters());
              catch (Exception e)
                   e.printStackTrace();
    }ObjectFactory.java (Created by xjc)
    package generated;
    import javax.xml.bind.JAXBElement;
    import javax.xml.bind.annotation.XmlElementDecl;
    import javax.xml.bind.annotation.XmlRegistry;
    import javax.xml.namespace.QName;
    @XmlRegistry
    public class ObjectFactory {
        private final static QName _Cpu_QNAME = new QName("", "cpu");
         * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
        public ObjectFactory() {
         * Create an instance of {@link CPU }
        public CPU createCPU() {
            return new CPU();
         * Create an instance of {@link JAXBElement }{@code <}{@link CPU }{@code >}}
        @XmlElementDecl(namespace = "", name = "cpu")
        public JAXBElement<CPU> createCpu(CPU value) {
            return new JAXBElement<CPU>(_Cpu_QNAME, CPU.class, null, value);
    }CPU.java (Also created by xjc)
    package generated;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlType;
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "CPU", propOrder = {
        "numcores",
        "registers"
    public class CPU {
        protected int numcores;
        protected int registers;
         * Gets the value of the numcores property.
        public int getNumcores() {
            return numcores;
         * Sets the value of the numcores property.
        public void setNumcores(int value) {
            this.numcores = value;
         * Gets the value of the registers property.
        public int getRegisters() {
            return registers;
         * Sets the value of the registers property.
        public void setRegisters(int value) {
            this.registers = value;
    }Am I doing anything wrong? Can anyone please help?
    Thanks very much.
    bish

    HI,
    I was looking for good solution to this problem, better than this one.
    Your solution is just temporary, I do not want to cast twice. So after own research I found out that this error
    is caused when JAXB cannot find main type. It will happen if main tag has type declared outside this tag:
    <xs:element name="egzam">
            <xs:unique name="egzamId">
                <xs:selector xpath="." />
                <xs:field xpath="@id" />
            </xs:unique>
        </xs:element>
        <xs:complexType name="egzam">
            <xs:sequence minOccurs="1" maxOccurs="unbounded">
                <xs:element name="question" type="egzamQuestion">
                    <xs:unique name="questionId">
                        <xs:selector xpath="." />
                        <xs:field xpath="@id" />
                    </xs:unique>
                </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:string" use="required" />
        </xs:complexType>If we do not define external type in main tag, classCastException dissapear:
    <xs:element name="egzam">
            <xs:complexType>
                <xs:sequence minOccurs="1" maxOccurs="unbounded">
                    <xs:element name="question" type="egzamQuestion">
                        <xs:unique name="questionId">
                            <xs:selector xpath="." />
                            <xs:field xpath="@id" />
                        </xs:unique>
                    </xs:element>
                </xs:sequence>
                <xs:attribute name="id" type="xs:string" use="required" />
            </xs:complexType>
            <xs:unique name="egzamId">
                <xs:selector xpath="." />
                <xs:field xpath="@id" />
            </xs:unique>
        </xs:element>Edited by: maciekcom on Nov 1, 2008 2:24 PM

  • Oracle Toplink Jaxb mapping

    Hi,
    i try to use the developer Preview 3(10.1.3.0)workbench
    and it work fine with simple java class (two xml files generation).
    But with java servlet who use the same classes nothing
    work i got some exception :
    05/03/01 08:24:33 exceptionProvider oracle.toplink.ox.jaxb.JAXBContextFactory could not be instantiated: java.lang.NoSuchMethodError: oracle.toplink.publicinterface.Session oracle.toplink.tools.sessionmanagement.SessionManager.getSession(oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader, java.lang.String, java.lang.ClassLoader, boolean, boolean)
    I have also a strange message in the log window in jdev 9052 :
    Cutting log (size: 101767, max: 100000)Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIFileOutputStream.write]Cutting log (size: 101866, max: 100000)Error cleaning up log: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISeekableStream.seek]
    Thank you for your help.

    The version of TopLink on your application server class path may be an older version of TopLink that does not contain the method mentioned in the stack trace.
    If you are using OC4J the toplink.jar can be found in the following location:
    &lt;OC4J_HOME&gt;\toplink\jlib\toplink.jar
    The 10.1.3 DP3 version of OC4J can be found on OTN in the following location:
    http://www.oracle.com/technology/software/products/ias/preview.html

  • NoClassDefFoundErrors after Redeployment of an Application

    Hi all,
    in our current project we encounter the following problem:
    We deploy our application via the wldeploy ant task and the deployment finishes successfully. But at runtime when an MDB is instantiated by the container we get a NoClassDefFoundError. What is weird about that is that a) this does not happen after every redeployment, b) it does not occur every time an MDB gets invoked, sometimes a few messages can be retrieved and then it suddenly fails, c) after the error occurs it sometimes vanishes again, that means that sometimes a redelivered message gets delivered after several attempts without that error and d) after a restart of the application server (WLS 9.2 MP1) the error does not occur until the next (or a following) redeployment.
    This behavior puzzles me immensely, the class in question is located in the jaxb-api.jar that we bundle with our application. Other classes from this jar, like the JAXBContext get loaded without problems which i can see from the stacktrace, so the jar seems to be available to the classloader. None of the other libs in the classpath/application contain any jaxb classes so it does not look like a class conflict.
    Any pointers on this will be greatly appreciated.
    Thanks, Chris

    Hi,
    thanks for your answer.
    I already did a search in my local WLS directory to find any jaxb related classes but could not find any. So it seems there are no jaxb classes bundled with WLS.
    We do a complete undeploy first and the deploy the application fresh, so everything should be cleaned up (at least i would assume that) and there should not be any difference to a deployment at startup.
    What i forgot to mention in my first post: We use Spring to create the MDBs, so maybe there is a problem with Spring vs WLS in class loading.
    We are not running in a clustered environment but on a single instance.
    Cheers, Chris

  • TOPLINK-38 ClassCastException if specifying toplink.cache.type. ENTITY

    Some background info:
    I am running a 10.1.3.3 OC4J standalone. On the same instance there is a resource adapter also using toplink JPA and get the entity manager from the factory instead of the container managed one. In my application, I also use an application managed EM. When deploying by myself, there is not issue. When it is deployed with the resource adapter, I would get the ClassCastException.
    If I removed the properties in the persistence.xml file that contains the "toplink.cache.type.<ENTITY>", the exception goes away and everything works fine. Following is my persistence.xml file.
    <persistence-unit name="oc4j" transaction-type="JTA">
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <jta-data-source>java:jdbc/OcmsXdmsDs</jta-data-source>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPAppUsage</class>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPUser</class>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPDocument</class>
    <class>oracle.sdp.xcapdatamodel.jpa.AppUsageSchema</class>
    <properties>
    <property name="toplink.session-name" value="xdms-multinode-session"/>
    <property name="toplink.logging.level" value="INFO"/>
    <!-- Optimize toplink caching -->
    <property name="toplink.cache.type.XCAPUser" value="None"/>
    <property name="toplink.cache.type.XCAPDocument" value="None"/>
    <property name="toplink.cache.type.XCAPAppUsage" value="Full"/>
    <property name="toplink.cache.type.AppUsageSchema" value="Full"/>
    </properties>
    </persistence-unit>

    Exception [TOPLINK-38] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.except
    ions.DescriptorException
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.ClassCastException: oracle.toplink.essentials.internal.identitymaps.FullIdentityMap
    Descriptor: RelationalDescriptor(oracle.sdp.xcapdatamodel.jpa.AppUsageSchema --> [DatabaseTable(APPUSAGESCHEMA)])
    at oracle.toplink.essentials.exceptions.DescriptorException.invalidIdentityMap(DescriptorException.java:778)
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.jav
    a:293)
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.getIdentityMap(IdentityMapManager.java:716
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.acquireDeferredLock(IdentityMapManager.jav
    a:119)
    at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.acquireDeferredLock(IdentityMapAccessor.java:
    85)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:479)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java
    :451)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:421)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:387)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.processItem(ReportQueryResult.java:220)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.buildResult(ReportQueryResult.java:182)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.<init>(ReportQueryResult.java:98)
    at oracle.toplink.essentials.queryframework.ReportQuery.buildObject(ReportQuery.java:594)
    at oracle.toplink.essentials.queryframework.ReportQuery.buildObjects(ReportQuery.java:643)
    at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:804)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:7
    46)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
    at oracle.sdp.xcapconfigmanager.JPAApplicationUsageImpl.loadXmlXsd(JPAApplicationUsageImpl.java:203)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.loadJPAAppUsage(XCAPConfigManager.java:447)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.loadApplicationUsages(XCAPConfigManager.java:402)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.start(XCAPConfigManager.java:366)
    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:585)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.invokeLifeCycleOperation(ModelerBeanDeployer.java:315)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.startService(ModelerBeanDeployer.java:266)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.initializeServices(ModelerBeanDeployer.java:359)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.preRegister(ModelerBeanDeployer.java:384)
    at com.sun.jmx.mbeanserver.BaseMetaDataImpl.preRegisterInvoker(BaseMetaDataImpl.java:83)
    at com.sun.jmx.mbeanserver.MetaDataImpl.preRegisterInvoker(MetaDataImpl.java:237)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:923)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497)
    at oracle.oc4j.admin.jmx.server.state.ApplicationStateFilterMBeanServer.registerMBean(ApplicationStateFilterMBea
    nServer.java:349)
    at com.evermind.server.Application.registerApplicationMBeans(Application.java:2978)
    at com.evermind.server.Application.addJ2EEApplicationMBean(Application.java:1682)
    at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:201)
    at com.evermind.server.Application.setConfig(Application.java:438)
    at com.evermind.server.Application.setConfig(Application.java:339)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
    at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.toplink.essentials.internal.identitymaps.FullIdentityMap
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.jav
    a:289)

  • TopLink JAXB and Web services

    Does anyone know if it's possible to remove the ns info written on the top of the XML produced by the JAXB derived classes?
    <Activ8XML xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    I'm asking that, because the following exception
    oracle.xml.parser.v2.XMLParseException: PI with the name 'xml' can occur only in the beginning of the document
    is thrown when the webservice attempts to return the generated xml element.
    Any ideas?

    Hi Blaise,
    I'm marshalling the object to a org.w3c.dom.Document and then I return it cast to org.w3c.dom.Element, which is the class the web service client is expecting to receive back.
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    doc = db.newDocument();
    marshaller.marshal( activ8XML, doc );
    return (Element)doc;
    When I look at the JDev9i (9.0.3.10.35) TCP packet monitor... it's doing the job, but the <?xml is still there in the response causing the client to throw
    oracle.xml.parser.v2.XMLParseException: PI with the name 'xml' can occur only in the beginning of the document
    If I marshall it to a java.io.PrintStream, the <?xml disappears
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    PrintStream ps = new PrintStream(baos);
    marshaller.marshal( activ8XML, ps );
    return baos.toString();
    The version of OC4J I'm using is the 9.0.3.0.0, which has the original xmlparserv2.jar replaced with the version that comes with toplink dp4.
    I think that the developer of the client can live with the String object, but it would be nice to return the org.w3c.dom.Element object instead.
    Any suggestion?

  • Toplink-JAXB Unmarshal problem :SAXPlatform  createPlatformDefaultSequence

    Hi All,
    I'm trying to import some classes (generated by JAXB out of an XSD) into Toplink-Relational project and unmarshal the XML contents. But I get the following exception.
    07/01/22 13:13:18 javax.xml.bind.JAXBException: Provider oracle.toplink.ox.jaxb.JAXBContextFactory could not be instantiated: Exception [TOPLINK-7147] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.ValidationException
    Exception [TOPLINK-7147] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.ValidationException
    Exception Description: Platform SAXPlatform cannot create platform default sequence - it doesn't override createPlatformDefaultSequence method
         at oracle.toplink.exceptions.ValidationException.createPlatformDefaultSequenceUndefined(ValidationException.java:1515)
         at oracle.toplink.internal.databaseaccess.DatasourcePlatform.createPlatformDefaultSequence(DatasourcePlatform.java:540)
         at oracle.toplink.internal.databaseaccess.DatasourcePlatform.getDefaultSequence(DatasourcePlatform.java:479)
         at oracle.toplink.internal.sequencing.SequencingManager.getDefaultSequence(SequencingManager.java:917)
         at oracle.toplink.internal.sequencing.SequencingManager.onConnectAllSequences(SequencingManager.java:713)
         at oracle.toplink.internal.sequencing.SequencingManager.onConnect(SequencingManager.java:602)
         at oracle.toplink.publicinterface.DatabaseSession.initializeSequencing(DatabaseSession.java:115)
         at oracle.toplink.publicinterface.DatabaseSession.initializeDescriptors(DatabaseSession.java:341)
         at oracle.toplink.publicinterface.DatabaseSession.initializeDescriptors(DatabaseSession.java:330)
         at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:512)
         at oracle.toplink.ox.XMLContext.buildSession(XMLContext.java:120)
         at oracle.toplink.ox.XMLContext.<init>(XMLContext.java:73)
         at oracle.toplink.ox.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:9)
         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:585)
         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:96)
         at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:229)
         at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:238)
         at oracle.epcis.services.queryservice.executor.ScheduledQueryExecutor.parseXML(ScheduledQueryExecutor.java:111)
         at oracle.epcis.services.queryservice.EPCISServicePortTypeImpl.subscribe(EPCISServicePortTypeImpl.java:36)
         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:585)
         at oracle.j2ee.ws.server.ImplInvocationHandler.invoke(ImplInvocationHandler.java:126)
         at $Proxy1.subscribe(Unknown Source)
         at oracle.epcis.services.queryservice.runtime.EPCISServiceBinding_Tie.invoke_subscribe(EPCISServiceBinding_Tie.java:450)
         at oracle.epcis.services.queryservice.runtime.EPCISServiceBinding_Tie.processingHook(EPCISServiceBinding_Tie.java:952)
         at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:287)
         at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:356)
         at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:283)
         at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:272)
         at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:94)
         at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:128)
         at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:170)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    07/01/22 13:13:18 --------------- linked to ------------------
    Can anyone please let me know the solution for this..?
    Thanks
    Rajasekaran

    Adding some more information for the same problem.....
    I tried to add the sequence like this.. But It doesnt helps..
    DatasourceLogin login = (DatasourceLogin)session.getDatasourceLogin();
    TableSequence seq = new TableSequence();
    seq.setName("OBJECT_EVENT_SEQ");
    seq.setTableName("OBJECTEVENT");
    seq.setNameFieldName("GUID");
    seq.setCounterFieldName("GUID");
    login.setDefaultSequence(seq);
    Can any one please throw some light into this problem ASAP..?
    Thanks
    Rajasekaran

  • Getting java.lang.ClassCastException  after a few hours  :(

    Hi all,
    i've deployed an application in oracle application server 10g
    after a few hours running smooth i start to get the following error:
    2010-02-09 02:06:28: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.ClassCastException, msg=null
         at acor_criaAlteracao._jspService(_acor__criaAlteracao.java:433)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.ClassCastException
         at acor_criaAlteracao._jspService(_acor__criaAlteracao.java:396)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    If i restart the oc4j container then the application runs smooth again ... if i wait a couple of hours i get the same error again.
    any ideia ?
    My environment
    Oracle application server 10g (9.0.4) on windows 2003 enterprise server
    Best Regards
    Rui Madaleno

    Question is which part of the heap is running out of space. It is more likely that your PermGen space is too small. PermGen is used for static variable, static and literal String values and classes as well. You can increase it with -XX:MaxPermSize=<value>. With a max heap size of 1024m a good starting value is 128m.
    Unfortunately, you're running a very old Oracle AS and a very old JDK. Newer Oracle AS or Oracle Fusion Middleware can use newer JDKs, OFM 11g (WLS 11g) loves to run JDK 1.6 and with visualvm and the visualgc plugin you can see all the private parts of the JVM.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Failed to obtain/create connection from connection pool after redeploy

    I have a web application (.war) that uses a jdbc connection pool. The application works fine, however after I redeploy it using the administration console I get "Failed to obtain/create connection from connection pool [ Datavision_Pool ]. Reason : null" followed by "Error allocating connection : [Error in allocating a connection. Cause: null]" from javax.enterprise.resource.resourceadapter and I am forced to restart the instance. I am running Sun Java System Application Server 9.1 (build b58g-fcs)
    using a connection pool to a Microsoft SQL 2000 database using inet software's JDBC drivers. I need to be able to redeploy applications without having to restart the instance. Any help is appreciated.

    I have turned on some additional diagnostics and found out some answers and a work-around, but I think that there may be a bug in the way JDBC connection pool classes are loaded. The actual error was a null pointer in the JDBC driver class in the perpareStatement method. The only line in this method is "return factory.createPreparedStatement( this , sql );" and the only possible NPE would be if the factory was null, which should be impossible because it is a static variable and it is initialized when the class is loaded. The problem occurs because we deploy the JDBC driver .jar file within our .war file, for use when a client doesn't have or want to use connection pooling. Apparently, the connection pool must have picked up some of these classes and when the .war was redeployed, the reference to the factory was lost for existing connections (not sure how). If I remove the JDBC .jar file from the .war, it works, but that wasn't an ideal solution, the other way to get it to work was to change the sun-web.xml file to have <class-loader delegate="true">. We previously had it set to false in version 8.1 because of interference with a different version of the apache Tiles classes, which has now been addressed in version 9.1.
    I still think there is an issue, because the connection pool should never use the application specific classloaders. Am I wrong to believe this?

  • Partitions vanish after redeploying foundation

    We are using EPM 11.1.2.For a different problem we have, Oracle made us redeploy foundation services.
    We have noticed that all our partitions are gone after we did this.
    We are recreating them now.
    Is it normal for partitions to vanish when we redeploy?
    Thanks.

    Ok, I have installed xf86-video-intel driver and xorg finally works (I am posting this through ARCH).
    So it seems that the problem was with the xf86-nvidia-nouveau driver.
    I am just wondering why xorg didn't use the xf86-video-vesa driver as it should do.
    That's right Gusar, it is a Sony laptop.
    I am really sorry for the waste of your time but I am deeply respectful for your fast answers.
    Many regards, Liofter.
    Edit: ARCH is beautiful
    Last edited by liofter (2014-08-22 16:13:08)

Maybe you are looking for