Applying ACL (setAcl) to Versioned Document in java - Exception thrown
Hello.,
I am creating a new versioned document object and trying to apply an acl using doc.setAcl();
However I receive an exception on the step where I am trying to set the ACL (below are the exceptions with IfsException.setVerboseMessage(true) )
oracle.ifs.common.IfsException: IFS-30043: Insufficient access to change PublicObjects Owner
oracle.ifs.common.IfsException: IFS-10204: Cannot update security settings for a PublicObject that has a SecuringPublicObject reference
Exact same code works when it is not a versioned document.
What do I need to do extra, to take care of versioned documents.
Thanks,
Hi,
I too try to upload a documet throug web service proxies in java.
Step followed are
1. login using login service
2. upload document using documentContentService
3. createDocument using DocumentService
The last step to createDocument in DocumentServicealwyas returns No valid session exists, though i try to do service calls in stateful session.
Kindly help, if you have any solution for this.
Regards,
Bala
Similar Messages
-
Hi,
Currently we have a custom devoloped Java application deployed in oracle iplanet webserver 7 with JDK 1.6. I am receiving the below errors. The application is not stable. It gives a 500 internal error sometimes when browsing. When i checked the error log. Below is the message.
CORE4007: Internal error: Unexpected Java exception thrown (java.lang.NullPointerException, no description), stack: java.lang.NullPointerException
Could you please throw some light on this.You need to fix your custom developed app since it is causing the errors and instability. Tell the developers to properly verify the input data and improve their exception handling so you get better error messages that tells you what went wrong.
-
Apply Manager Value to Existing OIM Identity Java Exception
Hi, when i search, find, update the manager value for an existing OIM identity and click Apply, the following error is returned, thoughts?
<Oct 17, 2012 4:34:26 PM CDT> <Warning> <oracle.iam.callbacks.common> <IAM-2030146> <[CALLBACKMSG] Are applicable policies present for this async eventhandler ? : false>
<Oct 17, 2012 4:34:53 PM CDT> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.el.EvaluationException: oracle.iam.platform.kernel.OrchestrationException:
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
Caused By: oracle.iam.platform.kernel.OrchestrationException:
Caused By: java.lang.StackOverflowError
and this line about 100 times:
at oracle.iam.identity.usermgmt.impl.handlers.modify.ModifyUserValidationHandler.validateManager(ModifyUserValidationHandler.java:1022)Possibly, the following is the cause why the update is not displayed in the admin console...
When I open an account without a manager value, I click search and add a manager value, when I click apply, the following error is returned...thoughts?
The update/commit worked as the DEV_OIM schema user, could this me a rights issue, as I logon to the console as weblogic? Or is it something else entirely?
Thanks for looking...
<Nov 29, 2012 5:58:34 PM CST> <Warning> <oracle.adfinternal.view.faces.lifecycle.LifecycleImpl> <BEA-000000> <ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase INVOKE_APPLICATION 5
javax.faces.el.EvaluationException: oracle.iam.platform.kernel.OrchestrationException:
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
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:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.am.agent.wls.filters.OAMServletAuthenticationFilter.doFilter(OAMServletAuthenticationFilter.java:265)
at oracle.security.am.agent.wls.filters.OAMValidationSystemFilter.doFilter(OAMValidationSystemFilter.java:133)
at oracle.security.wls.oamagent.OAMAgentWrapperFilter.doFilter(OAMAgentWrapperFilter.java:120)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:121)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:108)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
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:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: oracle.iam.platform.kernel.OrchestrationException:
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.process(OrchestrationEngineImpl.java:511)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:444)
at oracle.iam.platform.kernel.impl.OrchestrationEngineImpl.orchestrate(OrchestrationEngineImpl.java:378)
at oracle.iam.identity.usermgmt.impl.UserManagerImpl.modify(UserManagerImpl.java:899)
at oracle.iam.identity.usermgmt.api.UserManagerEJB.modifyx(Unknown Source)
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 com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy456.modifyx(Unknown Source)
at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at oracle.iam.identity.usermgmt.api.UserManager_nimav7_UserManagerRemoteImpl.modifyx(Unknown Source)
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 weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
at $Proxy187.modifyx(Unknown Source)
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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)
at $Proxy334.modifyx(Unknown Source)
at oracle.iam.identity.usermgmt.api.UserManagerDelegate.modify(Unknown Source)
at oracle.iam.identitytaskflow.backing.taskflows.modifyuser.ModifyUserView.modifyUserAction(ModifyUserView.java:2963)
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 com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
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:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.am.agent.wls.filters.OAMServletAuthenticationFilter.doFilter(OAMServletAuthenticationFilter.java:265)
at oracle.security.am.agent.wls.filters.OAMValidationSystemFilter.doFilter(OAMValidationSystemFilter.java:133)
at oracle.security.wls.oamagent.OAMAgentWrapperFilter.doFilter(OAMAgentWrapperFilter.java:120)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:121)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:108)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
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:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.StackOverflowError
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:386)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3937)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at weblogic.jdbc.common.internal.ConnectionEnv.testInternal(ConnectionEnv.java:873)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:813)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:541)
at weblogic.common.resourcepool.ResourcePoolImpl.testResource(ResourcePoolImpl.java:2198)
at weblogic.common.resourcepool.ResourcePoolImpl.checkResource(ResourcePoolImpl.java:1678)
at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1588)
at weblogic.common.resourcepool.ResourcePoolImpl.checkAndReturnResource(ResourcePoolImpl.java:1577)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:395)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:342)
at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:329)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:417)
at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:324)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:94)
at weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:63)
at weblogic.jdbc.jta.DataSource.getXAConnectionFromPool(DataSource.java:1677)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1475)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:446)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:403)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:364)
at oracle.iam.platform.utils.vo.OIMDataSource.getConnection(OIMDataSource.java:57)
at oracle.iam.platform.entitymgr.provider.rdbms.RDBMSRepository.getConnection(RDBMSRepository.java:98)
at oracle.iam.oimdataproviders.impl.OIMDataProvider.getConnection(OIMDataProvider.java:896)
at oracle.iam.oimdataproviders.impl.OIMDataProvider.getMLSResultUpdated(OIMDataProvider.java:1506)
at oracle.iam.oimdataproviders.impl.OIMDataProvider.search(OIMDataProvider.java:1092)
at oracle.iam.oimdataproviders.impl.OIMUserDataProvider.lookup(OIMUserDataProvider.java:913)
at oracle.iam.platform.entitymgr.impl.EntityManagerImpl.findEntity(EntityManagerImpl.java:604)
at oracle.iam.identity.usermgmt.impl.UserMgrUtil.findEntity(UserMgrUtil.java:1024)
at oracle.iam.identity.usermgmt.impl.UserMgrUtil.findEntity(UserMgrUtil.java:1007)
at oracle.iam.identity.usermgmt.impl.handlers.modify.ModifyUserValidationHandler.validateManager(ModifyUserValidationHandler.java:1017)
at oracle.iam.identity.usermgmt.impl.handlers.modify.ModifyUserValidationHandler.validateManager(ModifyUserValidationHandler.java:1022) -
Applying BP05 on OIM version 11.1.1.5.0
Eperts,
I am applying BP05 on OIM version 11.1.1.5.0 (https://updates.oracle.com/Orion/PatchDetails/process_form?patch_num=14609562
Following error in step “4.1 Stage 1: Patching the Oracle Binaries (OPatch Stage)” while applying patch.
complete output
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
K:\>cd E:\softwares_during_upgrade\patches_unzip
K:\>e:
E:\softwares_during_upgrade\patches_unzip>cd 14609562
E:\softwares_during_upgrade\patches_unzip\14609562>opatch apply
Invoking OPatch 11.1.0.8.3
Oracle Interim Patch Installer version 11.1.0.8.3
Copyright (c) 2010, Oracle Corporation. All rights reserved.
Oracle Home : E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1
Central Inventory : C:\Program Files\Oracle\Inventory
from : n/a
OPatch version : 11.1.0.8.3
OUI version : 11.1.0.9.0
OUI location : E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\oui
Log file location : E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\cfgtoollog
s\opatch\opatch2013-01-01_10-22-51AM.log
Patch history file: E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\cfgtoollog
s\opatch\opatch_history.txt
OPatch detects the Middleware Home as "E:\Oracle_OIM_11g_IDM\middleware_home"
Failed to load the patch object. Possible causes are:
The specified path is not an interim Patch shiphome
Meta-data files are missing from the patch area
Patch location = E:\softwares_during_upgrade\patches_unzip\14609562
Details = PatchObject constructor: Input file "E:\softwares_during_upgrade\pat
ches_unzip\14609562\etc\config\actions" or "E:\softwares_during_upgrade\patches_
unzip\14609562\etc\config\inventory" does not exist.
ApplySession failed: PatchObject constructor: Input file "E:\softwares_during_up
grade\patches_unzip\14609562\etc\config\actions" or "E:\softwares_during_upgrade
\patches_unzip\14609562\etc\config\inventory" does not exist.
System intact, OPatch will not attempt to restore the system
OPatch failed with error code = 73
E:\softwares_during_upgrade\patches_unzip\14609562>
Please suggest.
Thanks,
MSExperts,
I retried after copying tool.jar file into JRE folder but nothing has happened after running the command.
E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\server\bin>patch_oim_wls.bat
Unable to locate tools.jar. Expected to find it in E:\Java\jre6\lib\tools.jar
E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\server\bin>patch_oim_wls.bat
E:\Oracle_OIM_11g_IDM\middleware_home\Oracle_IDM1\server\bin>
I checked the file at location “patch_oim_wls.log” at location. File size is 0 Kb and file is blank.
Thanks,
Manohar -
Reading UTF-7 XML document in Java
I have an XML document and I want to add PrcessingInstruction to it.
<?xml version="1.0" encoding="UTF-7" ?>
<root_element>
<sections>
<section_introduction>
<order-no>108800674</order-no>
<order-type>219</order-type>
<created-date>5. november 2008</created-date>
when trying to parse it like
File tmpFile = new File("C:\\ProvisioningEventError58412.xml");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
Document doc = factory.newDocumentBuilder().parse(tmpFile);
System.out.println("end");
I get an exception on Document doc = factory.newDocumentBuilder().parse(tmpFile);
org.xml.sax.SAXParseException: Invalid encoding name "UTF-7".
[Fatal Error] ProvisioningEventError58412.xml:1:40: Invalid encoding name "UTF-7".
Is it possible to set encoding on DocumentBuilder, so it can work with UTF-7 or is there any other was to parse it for adding ProcessingInstruction. Actually I want to add a CSS/XSL file for formatting the XML File.
Edited by: aamaam on Jul 15, 2009 5:18 AMAs you will see from [this Supported Encodings document|http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html], it's Java which doesn't support UTF-7, not just DocumentBuilder.
So you have a couple of options. You could send the document back to whoever produced it and tell them that you can't process it the way it is. That's a legitimate thing to do because [the XML Recommendation|http://www.w3.org/TR/REC-xml/] only requires parsers to support UTF-8 and UTF-16. Support for other encodings is optional.
Or you could write your own subclass of InputStreamReader which converts a stream of UTF-7 bytes into a stream of chars, and use that as a Reader which you pass to the parser. Somebody may even have done that already and posted it on the web somewhere. -
Setting create date for versioned documents
Hi,
I'm trying to explicitly set the create date for a versioned document (as in, the versions for the document), using the Content DB java API.
What I'm trying to do is basically this (pseudo-code):
- Create an unversioned document (the folders do not have auto-version turned on) with the create date explicitly set. This works fine.
- Make it versioned
- Check it out, upload a new version with the create date set, check it back in
It is at the last step where I seem to have problems -- the act of checking a file back in seems to reset the create date to be the date of checkin rather than the date I set.
Is there any way of accomplishing what I'm trying to do?
Thanks,
PhillHello,
why so complicated? You can do all in one ;)
Check this out:
How to upload file to Conetent database and remain the creating date
In the end its like this:
Item verTest = fileM.createDocument(
new NamedValue[] {
ClientUtils.newNamedValue(Attributes.CREATE_DATE, olddate)
gl
Matthias -
i have mac os x 10.6.8 version and my java is version 6 and it deosnt work since yesterday and it gives error?
i really hope someone can help me with it because i really need javaI followed that and Java .jnlp files still do not work after downloading them manualy and double-click. What's next?
Java -version show the right version.
I need to get this fixed as it is thrid day when after applying OsX updates things got broken. I would prefer to have Java functional and be exposed to security risk than not having working at all.
How do I fix my Java .jnlp when I have all updates for 10.6.8 and running Safari 5.1.10 ?
I do not want to upgrade as I am scared that other things will break.
Please help. -
Attatching ACL's to the Document Programatically (Agent or Override)
Hi all,
I want to attatch an ACL dynamically to a Document when it is
getting uploaded in the Repository. The ACL will be selected
depending upon in which folder the Document is getting uploaded.
I can see 3 solutions for this.
1) develop an agent
2) develop an override.
3) change the web UI so that i'll get only the required ACL from
the ACL list.
Pls provide some expert comments and if possible briefly how to
develop the following.
Expecting early replies.
With warm Regards,
Shantanu..Urgent problem
I managed to make my agent (based on the code submitted by Shantanu above) and add it to IFS. But I fear it isn't working quite right.
I seem to experience situations where something unexpected happens - the file doesn't always get the ACL applied and in the log a error is noted (I've put some log statements in in order to debug the agent).
When it works I get something like this:
16:27 Auto_ACL_Agent: Event received for Create
16:27 Auto_ACL_Agent: Processing Create event for a DOCUMENT object.
16:27 Auto_ACL_Agent: Setting ACL and Owner for /home/aboegh/niels.txt
16:27 Auto_ACL_Agent: 2865612AC25644F6BBF465CEE3BACB69 created a new object
16:27 Auto_ACL_Agent: Updating Owner
16:27 Auto_ACL_Agent: Updating ACL
16:27 Auto_ACL_Agent: ACL and Owner updated OK
16:28 Auto_ACL_Agent: Event received for Create
When the event arrives the document object is located and is parent as well. If the parent exist and has a different ACL the new document is assigned the ACL of its parent.
But this is what I get When it fails:
16:38 Auto_ACL_Agent: Event received for Create
16:38 Auto_ACL_Agent: Processing Create event for a DOCUMENT object.
16:38 Auto_ACL_Agent: getAnyFolderPath() returned null?
16:38 Auto_ACL_Agent: Setting ACL and Owner for null
16:38 Auto_ACL_Agent: Exception at processEvent
16:38 Auto_ACL_Agent: null
16:38 Auto_ACL_Agent: DocPath = null
Here I get the event (a new file has been created) but when I handle the event I'm unable to retrieve a path to the object for initiated the event!
This shouldn't happen. But maybe this is impossible to avoid? Is it because agents run asynchronously?
Or I have missed something else? -
Applying a border to a document
I am a very new Apple user. I have the Pages version just before the more recent Pages '08. How do I apply a border to a document?
The Mrs.,
Welcome to Apple discussions.
There's no simple border command, so it's going to take a few steps. You could do it this way:
Add a rectangular object to the page; make sure you turn off wrap (Wrap inspector > uncheck Object Causes Wrap. Stretch the object to fill the page.
Click on the Graphics inspector; select the kind of border you want -- either a line or picture frame. From the Fill menu, select Color Fill. Click on the color swatch. Select the little box of crayons on the top right. Then click on a white crayon. You should now be seeing just your border.
With your border still selected, click on Format > Advanced > Send Object to Section Master to make your border repeat on every page. If you don't want it to repeat, skip this step.
You might want to save your document as a template, so you don't have to go through this every time.
-Dennis -
ColdFusion Search Dialog:
Search on Open Documents produces java.lang.NullPointerException
Works well with Search on Current Documents
Paid license.
Please Advice.Thank you, TechFuser. I have experimented by searching on 'Open Documents', but am unable to reproduce the error. However, there indeed seems to be a problem. It failed to work for me either.
Like you, I got a NullPointerException. But that seemed to happen whenever I restarted ColdFusion Builder 3. The details are as follows:
CFBuilder Version: 3.0.0
Build: 292483
Message:
Unhandled event loop exception
Exception Stack Trace:
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4145)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3762)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.ja va:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java :997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.adobe.ide.coldfusion.rcp.intro.Application.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Caused by: java.lang.NullPointerException
at com.adobe.ide.coldfusion.appcodegeneration.runtime.views.ViewContributionService$1.run(Vi ewContributionService.java:113)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
... 23 more
Session Data:
eclipse.buildId=unknown
java.version=1.7.0_55
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86 -
Validating xml document in java
Trying to do subject.
I'm trying to use xsd from file(schemasource = 1) and from clob (schemasource = 0). I have two xsd schemas common_types.xsd and migom.xsd. second includes first. The problem is that when I'm using common_types schema from file I get error
ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.parser.v2.XMLParseException: An internal error condition occurred.
and when I validate xml against only first schema has being read from clob I get success, but when I add second xsd, i get the same error, which says nothing at all.
create or replace and compile java source named XmlTools AS
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import oracle.sql.CLOB;
import java.io.IOException;
import org.xml.sax.SAXException;
import java.sql.SQLException;
import java.lang.IllegalArgumentException;
import oracle.xml.parser.v2.XMLParseException;
import javax.xml.parsers.ParserConfigurationException;
import java.io.*;
public class XmlValidator
static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
static final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
public static void ValidateDocument(int schemasource, oracle.sql.CLOB schemadoc, oracle.sql.CLOB schemadoc1, oracle.sql.CLOB xmldoc) throws SAXException, IOException, SQLException, ParserConfigurationException, XMLParseException, IllegalArgumentException {
try
File myfile = new File(".//XML//common_types.xsd");
if (myfile.exists())
Serv.log("ValidateDocument", "file size" + Long.toString(myfile.length()));
/*else
Serv.log("ValidateDocument", "file doesn't exists" );
Serv.log("ValidateDocument", "1" );
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
factory.setNamespaceAware(true);
Serv.log("ValidateDocument", "2" );
SAXParser saxParser = factory.newSAXParser();
saxParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
if (schemasource == 0)
InputSource schemaIs = new InputSource(schemadoc.getCharacterStream());
InputSource schemaIs1 = new InputSource(schemadoc1.getCharacterStream());
InputSource[] schemas = {schemaIs, schemaIs1};
//saxParser.setProperty(JAXP_SCHEMA_SOURCE, schemaIs);
saxParser.setProperty(JAXP_SCHEMA_SOURCE, schemas);
else
saxParser.setProperty(JAXP_SCHEMA_SOURCE, ".//XML//common_types.xsd");
XMLReader reader = saxParser.getXMLReader();
//Получаем входной XML документ
InputSource documentIs = new InputSource(xmldoc.getCharacterStream());
Serv.log("ValidateDocument", "3" );
//Запуск разбора
reader.parse(documentIs);
Serv.log("ValidateDocument", "4" );
documentIs = null;
/*catch (SAXException e)
Serv.log("ValidateDocument", "SAXException" );
Serv.log("ValidateDocument", "document is not valid because ");
Serv.log("ValidateDocument", e.getMessage());
throw(e);
catch (ParserConfigurationException e)
Serv.log("ValidateDocument", "ParserConfigurationException" );
throw(e);
catch (IOException e)
Serv.log("ValidateDocument", "IOException" );
throw(e);
catch (XMLParseException e)
Serv.log("ValidateDocument", "XMLParseException" );
Serv.log("ValidateDocument", e.getMessage());
StackTraceElement[] stack = e.getStackTrace();
for (int i = 0; i < stack.length; i++)
Serv.log("stacktrace element no " + Integer.toString(i), "toString: " + stack.toString());
Serv.log("stacktrace element no " + Integer.toString(i), "file name: " + stack[i].getFileName() + ", class name: " + stack[i].getClassName() + ", method name: " + stack[i].getMethodName() + ", line : " + stack[i].getLineNumber());
throw(e);
catch (IllegalArgumentException e)
Serv.log("ValidateDocument", "IllegalArgumentException" );
Serv.log("ValidateDocument", e.getMessage());
throw(e);
additional information got from java stacktrace:
file name: XMLError.java, class name: oracle.xml.parser.v2.XMLError, method name: flushErrors1, line : 320 file name: NonValidatingParser.java, class name: oracle.xml.parser.v2.NonValidatingParser, method name: parseDocument, line : 300 file name: XMLParser.java, class name: oracle.xml.parser.v2.XMLParser, method name: parse, line : 200 file name: XMLTOOLS, class name: XmlValidator, method name: ValidateDocument, line : 86
my oracle version is Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod But my aim is to make it work on all versions starting from 9I found another examples of xml document validation in Java, but it seems to me that ORACLE's JVM doesn't include such class as SchemaFactory and class SAXParserFactory doesn't have method setSchema. Is it possible to update JVM installed in Oracle?
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
SchemaFactory schemaFactory =
SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
factory.setSchema(schemaFactory.newSchema(
new Source[] {new StreamSource("contacts.xsd")}));
SAXParser parser = factory.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new SimpleErrorHandler());
reader.parse(new InputSource("document.xml")); -
I have some previous version documents of CS1 and CS3 on Mac which have been saved without any extension e.g 300, CS3doc etc.
When I open such documents in InDesign CS5 they appear to be unreadable . Only on selecting 'All documents' filter I am able to open those documents.
I want to make all such documents (which are without extension) readable with 'All Readable Documents ' also .
How I can do that, please help me !!!!!The first thing I'd do is make sure the issue is really what I suspect it is - i.e. I suspect your extension-less documents don't have the proper type and creator.
If you fire up a Terminal window, you should be able to use the GetFileInfo command to check one of the files:
Assume 'sampleFile' is sitting on your desktop, you'd do
GetFileInfo ~/Desktop/sampleFile
(not sure when/whether GetFileInfo is installed on a Mac - I think it used to be part of Apple's developer tools, but on my Snow Leopard it resides in /usr/bin)
Check what it says for 'type' and 'creator'.
If these are not correct, we've confirmed that that's the reason why they don't show up in your file dialog.
If the issue is type/creator related, I can think of the following options:
a) Change your code to accept ANY file type/extension - I suspect this would work (not tested!):
openFileDialog->AddType( '????' );
If memory serves right, '????' should be accepted as a wildcard.
b) correct the file types BEFORE they are viewed in the File Dialog - for example, if these files are in a very specific folder somewhere, you might be able to scan the folder, and correct their type and creator (e.g. iterate through all extensionless files in folder 'xyz' and change their type and creator). A lot depends on how those files get there, and whether they are tied to a specific folder or not - are they 'old' files, or are they being generated in some workflow? If they're all over a user's system or all over a file server, such pre-scanning and cleaning up file types approach will be a no-go.
Cheers,
Kris -
Problem in printing pdf document with java code
Hi All
I want to print a pdf document with java code i have used PDFRenderer.jar to compile my code.
Code:
File f = new File("C:/Documents and Settings/123/Desktop/1241422767.pdf");
FileInputStream fis = new FileInputStream(f);
FileChannel fc = fis.getChannel();
ByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
PDFFile pdfFile = new PDFFile(bb); // Create PDF Print Page
PDFPrintPage pages = new PDFPrintPage(pdfFile);
// Create Print Job
PrinterJob pjob = PrinterJob.getPrinterJob();
PageFormat pf = PrinterJob.getPrinterJob().defaultPage();
pjob.setJobName(f.getName());
Book book = new Book();
book.append(pages, pf, pdfFile.getNumPages());
pjob.setPageable(book);
// System.out.println(pjob.getPrintService());
// Send print job to default printer
pjob.print();
but when i am running my program i am getting error
Exception in thread "main" java.awt.print.PrinterException: Invalid name of PrintService.
Please anybody, knows the solution for this error?
Thanks In Advance
IndiraIt seems that either there is no default printer setup or you have too many printers or no printer setup at all. Try running the following code. It should print the list of available print services.
import java.awt.print.*;
import javax.print.*;
public class PrintServiceNames{
public static void main(String args[]) throws Exception {
PrintService[] printServices = PrinterJob.lookupPrintServices();
int i;
for (i = 0; i < printServices.length; i++) {
System.out.println("P: " + printServices);
}From the list pick one of the print service names and set it explicitly like "printerJob.setPrintService(printServices);" and then try running the program. -
Parsing documents in Java called via JNI
My native application is in C running on WinXP, and I am attempting to call an API in Java using JNI. I am quite a JNI newbie so hopefully someone can shed some light on my issue. Everytime I attempt to parse a document in Java using:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(true); // also tried false
DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(this);
Document document = builder.parse(new File(filename));I get an IncompatibleClassChangeError exception thrown. This happens when I parse XML, text, you name it. The Java code works fine outside of JNI. The C source snippet (minus the exception checking) looks like the following:
testClass = (*env)->FindClass(env, "TestClass");
testMethod = (*env)->GetMethodID(env, testClass, "test", "(Ljava/lang/String;)I");
filename = (*env)->NewStringUTF(env, "test.xml");
value = (*env)->CallIntMethod(env, testClass, testMethod, filename); Any suggestions would be very much appreciated.I believe I have found the problem, and it's (of course) an exercise in double-checking everything. It also makes me want to slay my predecessors for their confusing design choices.
The class JNIMessage isn't in the class hierarchy of Message, though it appears to be if you're not inspecting the code closely enough. This is almost certainly the problem. I was looking in the wrong place; the JNI code is probably not suspect here. -
How do I save a xls document in Java
Hi!
How do I save a xls Document from java?
I mean, I want to specify which xls document to save and then save it.
Any useful code would be of great help!This is the code!
import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Locale;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.write.Label;
import jxl.write.WritableCell;
import jxl.write.WritableCellFormat;
import jxl.write.WritableImage;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.Number;
import jxl.write.*;
import java.io.IOException;
import java.io.OutputStream;
public class writeXls
public String templateName;
public String outputName;
public writeXls (String t, String o)
templateName = "c://"+t;
outputName = "c://"+o;
public void writeYearVolume(String []yearvolymeArray)
WritableWorkbook workbook = null;
try
// Setup workbook
WorkbookSettings ws = new WorkbookSettings();
ws.setLocale(Locale.UK);
ws.setEncoding("Windows-31J");
// Load workbook
Workbook template = Workbook.getWorkbook(new FileInputStream(templateName));
// Create new workbook
workbook = Workbook.createWorkbook(new FileOutputStream(outputName), template, ws);
// Create new sheet
WritableSheet sheet = workbook.getSheet(1);
// Create new label
Number amc1000= new Number(4, 1, Integer.parseInt(yearvolymeArray[0]));
Number amc800 = new Number(4, 2, Integer.parseInt(yearvolymeArray[1]));
sheet.addCell(amc1000);
sheet.addCell(amc800);
// Write wookbook
workbook.write();
workbook.close();
catch (IOException e)
e.printStackTrace();
catch (WriteException e)
e.printStackTrace();
catch(Exception e)
e.printStackTrace();
}The xls file is modified but not saved, how do I save the file?
Some of the cells in the xls file contains formulas, because of that, the cells containing formulas dosen't update its value.
if I however save the file manually then the cells are updated. I want to save the xls file automatically from Java.
Any ideas on how to do that?
Maybe you are looking for
-
I've tried eveything to fix my iMessage and nothing is working. I can't even log onto my Apple ID. This only happened after the update and started occuring about an hour ago. Any idea on what's wrong and how to fix it?
-
Need Help With Shell Programming
Hi, I need some guidance as to how to approach my project. I need to develop a shell to host an e-learning environment that can be accessed through the internet. The user, preferably, needs not to download anything to run/start the e-learning environ
-
Trigger Inventory Audit Report With A Fixed Set Of Selection Parameters
Hi All, Can we trigger Inventory audit Report with fixed warehouse selection ? Thanking you Malhaar
-
Justify include text in Smartform
Hi All, My requirement is to justify(not left, right or centre but to align the texts in the complete line of the page). I have done the following things: 1) Created a style in which paragraph format is justified. 2) Used the stylr in the include tex
-
Audition edit causes Premiere to re-conform every file
I've recently used Audition 3.0 to edit audio clips via 'render-and-replace' in a few Premiere CS4 projects. The export to Audition works fine; I can edit/process my clips, save and go back to Premiere CS4 with no problem. But when I get back to Prem