I am creating java classes from xsd using jaxb, but when i try to send xml over http i get a run time error
java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract javax.xml.bind.annotation.AccessType javax.xml.bind.annotation.XmlAccessorType.value() (Found data of type Ljavax/xml/bind/annotation/XmlAccessType;.FIELD)
sun.reflect.annotation.AnnotationTypeMismatchExceptionProxy.generateException(AnnotationTypeMismatchExceptionProxy.java:38)
sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:56)
$Proxy6.value(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.xml.bind.v2.model.annotation.LocatableAnnotation.invoke(LocatableAnnotation.java:60)
$Proxy8.value(Unknown Source)
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getAccessType(ClassInfoImpl.java:339)
com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:228)
com.sun.xml.bind.v2.model.impl.RuntimeClassInfoImpl.getProperties(RuntimeClassInfoImpl.java:87)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:127)
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:51)
com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:327)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:198)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:132)
javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:358)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:323)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:244)
com.arcot.jaxb.KECHPSWI.KECHPSWI.marshal(KECHPSWI.java:117)
com.arcot.jaxb.servlet.ClientMachine.doPost(ClientMachine.java:39)
com.arcot.jaxb.servlet.ClientMachine.doGet(ClientMachine.java:84)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
my development environment is Tomcat 6.0, jdk 1.6 on windows 7, can someone please help me resolve this problem?
Looks like you have two different version of class javax.xml.bind.annotation.AccessType.
May be you have duplicate jax-api.jar in your classpath.
Related
I'm working with Oracle BPM 11G(11.1.1.7) and Jdeveloper.
I am getting below error while creating BPM MDS, my database and my SOA-MDS are working perfectly for a connection.
Only when I try to create the BPM-MDS error happens
Test Failed: ORABPEL-30503
Invalid Token Error in Verification Service.
Invalid Token Error in Verification Service. Received invalid token in null.
Verify that correct token is passed.
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContextToken(VerificationService.java:1769)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1662)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1969)
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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy243.validateContext(Unknown Source)
at oracle.bpm.services.pml.impl.SecurityService.validateContext(SecurityService.java:237)
at oracle.bpm.services.pml.impl.SecurityService.getSecurityService(SecurityService.java:247)
at oracle.bpm.services.pml.impl.SecurityService.getPrincipal(SecurityService.java:109)
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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy270.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean.getPrincipal(SecurityServiceBean.java:71)
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.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
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 $Proxy269.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: java.lang.Exception: Null token
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContextToken(VerificationService.java:1769)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1662)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1969)
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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy243.validateContext(Unknown Source)
at oracle.bpm.services.pml.impl.SecurityService.validateContext(SecurityService.java:237)
at oracle.bpm.services.pml.impl.SecurityService.getSecurityService(SecurityService.java:247)
at oracle.bpm.services.pml.impl.SecurityService.getPrincipal(SecurityService.java:109)
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.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at oracle.bpel.services.workflow.common.WorkflowServiceCacheEventAdvice.invoke(WorkflowServiceCacheEventAdvice.java:91)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy270.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean.getPrincipal(SecurityServiceBean.java:71)
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.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
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 $Proxy269.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl.getPrincipal(Unknown Source)
at oracle.bpm.services.pml.ejb.SecurityServiceBean_z7zjfk_ISecurityServiceRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Could someone help me, I'm very difficult to find a solution for this problem!!
This has been resolved. I ended up generating my own web service proxy services for the TaskService, instead of using the one that was bundled with jDeveloper. So honestly speaking, because of time constraints, I did not get a chance to fix the exact root cause of this error. After generating this webservice proxy/stub, i bundled it as a shared webapp library and my Custom Worklist portlet refers to this library. This worked for me.
I used this WSDL to generate the proxy classes and then used the generated classes/methods to query tasks data.
http://soa_host:soa_port/integration/services/TaskQueryService/TaskQueryService?wsdl
Also, later taking the original case forward, I was also able to get around the token problem by using RMI/EBJ provider ( t3://: ) instead of SOAP binding (http://:).
Here's what my code looks like :
String serverUrl ="t3://soa_server:soa_port"; // host:Port of the soa server
Map<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String> connProperties = new HashMap<IWorkflowServiceClientConstants.CONNECTION_PROPERTY, String>();
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.CLIENT_TYPE,WorkflowServiceClientFactory.REMOTE_CLIENT);
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_PROVIDER_URL,serverUrl);
connProperties.put(IWorkflowServiceClientConstants.CONNECTION_PROPERTY.EJB_INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(connProperties, null, null);
ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
IWorkflowContext adminCtx = wfSvcClient.getTaskQueryService().authenticate(adminID, adminPass.toCharArray(), "jazn.com" );
IWorkflowContext userCtx = querySvc.authenticateOnBehalfOf(adminCtx, userID);
List displayColumns = new ArrayList();
displayColumns.add("TASKNUMBER");
displayColumns.add("TITLE");
displayColumns.add("STATE");
displayColumns.add("CREATOR");
List optionalInfo = new ArrayList();
optionalInfo.add("Comments");
optionalInfo.add("Payload");
tasks=querySvc.queryTasks(userCtx, null, null, ITaskQueryService.AssignmentFilter.MY,null, null, null, 0, 0);
This returns list of tasks assigned to the user whose ID you send to authenticateOnBehalfOf() method call above.
I hope this helps.
Below solution from Oracle Support Documentation fixed the issue for me. In summary, it's a jar mismatch between server and jdev that caused the issue.
=========================================================================
You are unable to get the BPM context successfully. There will not be an exception while retrieving the context but when trying to use it you see the exception:
BPM-70684
Exception
exception.70684.type: error
exception.70684.severity: 2
exception.70684.name: Invalid authentication context.
exception.70684.description: Invalid authentication context has been passed.
exception.70684.fix: Ensure valid authentication context is passed.
The following exceptions have known to be associated with the same issue:
Caused by: java.lang.NullPointerException
at oracle.bpel.services.workflow.verification.impl.WorkflowContext.hashCode(WorkflowContext.java:583)
at java.util.HashMap.get(HashMap.java:300)
at oracle.bpel.services.workflow.common.ThreadLocalCache.isContextValidated(ThreadLocalCache.java:146)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateNotNullWorkflowContext(VerificationService.java:1824)
at oracle.bpel.services.workflow.verification.impl.VerificationService.validateContext(VerificationService.java:1806)
Error while authenticating on behalf of user weblogic using adminContext [user=null][sessionKey=null][token=null][requester=null][objectId=null]
<<.> Verification Service cannot resolve user identity.
User null cannot be found in the identity repository.
Workflow Context token cannot be null in request.
ORABPEL-30511
Verification Service cannot resolve user identity.
User null cannot be found in the identity repository.
Workflow Context token cannot be null in request.
at oracle.bpel.services.workflow.verification.impl.LocalCacheManager.lookupUser(LocalCacheManager.java:600)
Caused By: ORABPEL-10501
Illegal argument.
Illegal argument.
This is because an unexpected value, possibly null, was passed as an argument. Check the error stack and fix the cause of the error. Contact Oracle Support Services if error is not fixable.
at oracle.tip.pc.services.identity.jps.AuthorizationServiceImpl.lookupUser(AuthorizationServiceImpl.java:236)
at oracle.tip.pc.services.identity.jps.IdentityServiceImpl.lookupUser(IdentityServiceImpl.java:183)
at oracle.bpel.services.workflow.verification.impl.LocalCacheManager.lookupUser(LocalCacheManager.java:596)
We are embedding a BPM task Flow list in an ADF App. It gives the following error
infra] <.> Invalid Token Error in Verification Service.[[
Invalid Token Error in Verification Service. Received invalid token in null.
Verify that correct token is passed.
ORABPEL-30503
Also, If you log the username from the context you'll notice it is null.
Cause
The bpm-services.jar on the client application and the server may not match. The SOA/BPM related jars being used on the client and server must be the same or unexpected issues can occur.
Solution
Copy the bpm-services.jar from the server
Replace the bpm-services.jar on the client application with the one from the server
Ensure that after any patches are applied that the jars on the server are replaced in the client application.
This also applies to using jars within JDeveloper which can become out of sync due to patches not being applied on both dev and server machines. You may need to replace the bpm-services.jar located here JDeveloper/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar with the one located here [soa_install_dir]/soa/modules/oracle.soa.workflow_11.1.1/bpm-services.jar.
I don't understand, why am I getting this error in Scala Play REPL, but everything seems to be fine on Play project. This is after I run play console:
scala> import play.api.libs.Crypto
import play.api.libs.Crypto
scala> Crypto.encryptAES("password")
#6gd0e7jca: Configuration error
at play.api.libs.Crypto$$anonfun$encryptAES$2.apply(Crypto.scala:156)
at play.api.libs.Crypto$$anonfun$encryptAES$2.apply(Crypto.scala:156)
at scala.Option.getOrElse(Option.scala:120)
at play.api.libs.Crypto$.encryptAES(Crypto.scala:155)
at .<init>(<console>:19)
at .<clinit>(<console>)
at .<init>(<console>:7)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:734)
at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:983)
at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:604)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:568)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:790)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:702)
at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:566)
at scala.tools.nsc.interpreter.ILoop.innerLoop$1(ILoop.scala:573)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:576)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:867)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:822)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:822)
at scala.tools.nsc.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:135)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:822)
at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:889)
at xsbt.ConsoleInterface.run(ConsoleInterface.scala:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:102)
at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:77)
at sbt.Console.sbt$Console$$console0$1(Console.scala:23)
at sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24)
at sbt.TrapExit$.sbt$TrapExit$$executeMain$1(TrapExit.scala:33)
at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
I want to use this for encrypting strings in the console. What exactly does this error mean?
Play Framework 2.2.1 / Scala 2.10.3 / Java 8 64bit
You need a running Play application to encrypt anything with that method, because it needs to get the application secret to use to encrypt the data.
Two solutions:
Use the other version of encryptKey, and pass in your application secret, eg:
Crypto.encryptAES("password", "yourapplicationsecret".substring(0, 16))
Instead of running play console, run play test:console, and then execute the following code in order to ensure that there is a running application:
import play.api.test._
Helpers.running(FakeApplication()) { Crypto.encryptAES("password") }
Every time I try to start the CPU profiler I get the following exception. I have found reference to this exception in conjunction with Asian languages, but that is not the case here.
java.lang.reflect.InvocationTargetException
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 sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:323)
at sun.instrument.InstrumentationImpl.loadClassAndCallAgentmain(InstrumentationImpl.java:348)
Caused by: java.lang.NullPointerException
at org.netbeans.lib.profiler.server.ProfilerActivate15.getArchiveFile(ProfilerActivate15.java:78)
at org.netbeans.lib.profiler.server.ProfilerActivate15.activate(ProfilerActivate15.java:99)
at org.netbeans.lib.profiler.server.ProfilerActivate15.agentmain(ProfilerActivate15.java:64)
... 6 more
I gave up and used the following instead
http://www.jvmmonitor.org/index.html
i am getting following error in weblogic managed log files and not able to trace source of client IP or URL. It is look like some SQL injection are happening on servers so please provide detail to prevent it and get more detail about it.
<[ACTIVE] ExecuteThread: '14' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1355487016719> <BEA-000000> <[Security:090759]A SQLException occurred while retrieving password information
java.sql.SQLException: [Security:090798]Invalid characters found in input #^Y#.#o*.2,./2|pq{jvk#-1('#lvo)&1,.1(.1.+(#./*
at weblogic.security.providers.authentication.shared.DBMSUtils.verifyInputCharactersName(DBMSUtils.java:338)
at weblogic.security.providers.authentication.shared.DBMSSQLRuntimeQueryImpl.executeUserPassword(DBMSSQLRuntimeQueryImpl.java:71)
at weblogic.security.providers.authentication.shared.DBMSAtnLoginModuleImpl.authenticateDBMS(DBMSAtnLoginModuleImpl.java:672)
at weblogic.security.providers.authentication.shared.DBMSAtnLoginModuleImpl.login(DBMSAtnLoginModuleImpl.java:271)
at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110)
at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:106)
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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.bea.common.security.internal.service.JAASLoginServiceImpl.login(JAASLoginServiceImpl.java:113)
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.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
at $Proxy17.login(Unknown Source)
at weblogic.security.service.internal.WLSJAASLoginServiceImpl$ServiceImpl.login(Unknown Source)
at com.bea.common.security.internal.service.JAASAuthenticationServiceImpl.authenticate(JAASAuthenticationServiceImpl.java:82)
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.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
at $Proxy37.authenticate(Unknown Source)
at weblogic.security.service.WLSJAASAuthenticationServiceWrapper.authenticate(Unknown Source)
at weblogic.security.service.PrincipalAuthenticator.authenticate(Unknown Source)
at weblogic.servlet.security.internal.SecurityModule.checkAuthenticate(SecurityModule.java:236)
at weblogic.servlet.security.internal.SecurityModule.checkAuthenticate(SecurityModule.java:185)
at weblogic.servlet.security.internal.BasicSecurityModule.checkUserPerm(BasicSecurityModule.java:75)
at weblogic.servlet.security.internal.SecurityModule.checkAccess(SecurityModule.java:106)
at weblogic.servlet.security.internal.ServletSecurityManager.checkAccess(ServletSecurityManager.java:82)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2122)
at weblogic.servlet.security.internal.AuthFilterChain$LastFilter.doFilter(AuthFilterChain.java:45)
at weblogic.servlet.security.internal.AuthFilterChain.doFilter(AuthFilterChain.java:37)
at com.bea.common.security.internal.service.SAMLSingleSignOnServiceImpl.callChain(SAMLSingleSignOnServiceImpl.java:416)
at com.bea.common.security.internal.service.SAMLSingleSignOnServiceImpl.doRedirectFilter(SAMLSingleSignOnServiceImpl.java:407)
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.common.security.internal.utils.Delegator$ProxyInvocationHandler.invoke(Delegator.java:57)
at $Proxy22.doRedirectFilter(Unknown Source)
at weblogic.security.providers.saml.SAMLServletAuthenticationFilter.doFilter(SAMLServletAuthenticationFilter.java:101)
at weblogic.servlet.security.internal.AuthFilterChain.doFilter(AuthFilterChain.java:37)
at weblogic.servlet.security.internal.SecurityModule$ServletAuthenticationFilterAction.run(SecurityModule.java:612)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.security.internal.SecurityModule.invokeAuthFilterChain(SecurityModule.java:501)
at weblogic.servlet.security.internal.BasicSecurityModule.handleFailure(BasicSecurityModule.java:114)
at weblogic.servlet.security.internal.BasicSecurityModule.checkUserPerm(BasicSecurityModule.java:80)
at weblogic.servlet.security.internal.SecurityModule.checkAccess(SecurityModule.java:106)
at weblogic.servlet.security.internal.ServletSecurityManager.checkAccess(ServletSecurityManager.java:82)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2122)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
This is weblogic validating the userid input as part of their login implementation. I believe Oracle's OID does not allow an apostrophe in userids. Perhaps someone was simply testing your site with classic keyboard smashing and just happened to smash the keys in such a way that an apostrophe was entered for the userID.
It appears Weblogic is checking if the user input entered contains 'invalid' characters that would imply a sql injection attack with the userID. But is my understanding that they are using PreparedStatements which makes validating the input for characters a bit odd. It is likely just a constraint on what makes a valid userID in their backend LDAP.
In your case the user entered the following:
#^Y#.#o*.2,./2|pq{jvk#-1('#lvo)&1,.1(.1.+(#./*
Most of this answer is based on this forum discussion.
I did check metalink.oracle.com but did not find the SR listed in the forum.
When I run a method on my application, I get the following exception, but the class that is miss 'JarSignerResources' is in my classpath (part of tools.jar). I have never seen an exception like this before, and it only occurs on Linux (not OSX). Can anyone give me a bit of insight into why this would be happening? Thanks.
Exception in thread "main" java.lang.reflect.InvocationTargetException
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.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.ExceptionInInitializerError
at com.wuntee.aat.smali.SmaliWorkshop.signJar(SmaliWorkshop.java:214)
at com.wuntee.aat.smali.SmaliController.rebuildAndSignApk(SmaliController.java:223)
at com.wuntee.aat.view.Gui$13.widgetSelected(Gui.java:354)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.wuntee.aat.view.Gui.open(Gui.java:135)
at com.wuntee.aat.view.Gui$1.run(Gui.java:112)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at com.wuntee.aat.view.Gui.main(Gui.java:108)
... 5 more
Caused by: java.util.MissingResourceException: Can't find bundle for base name sun.security.tools.JarSignerResources, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1427)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1250)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
at com.wuntee.aat.security.tools.JarSigner.<clinit>(JarSigner.java:96)
... 17 more
This happens at this point in the code:
public static void signJar(String keystore, String keystorePassword, String jarFile, String alias) throws Exception{
JarSigner js = new JarSigner();
js.signJar(keystore, keystorePassword, jarFile, alias);
}
The sun.* packages are not part of the supported, public interface. It is likely you are not using a sun jdk on linux.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform.
see here for details