Re: Build failure in calculator-implementation-policies sample
On Dec 17, 2007 12:14 PM, Simon Nash <[EMAIL PROTECTED]> wrote: > I am getting the following error when building the latest trunk. Any > ideas? > > Simon > > [INFO] > - > --- > [INFO] Building Apache Tuscany SCA Calculator Sample using Implementation > Polici > es > [INFO]task-segment: [install] > [INFO] > - > --- > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:compile] > [INFO] Compiling 12 source files to > H:\tuscany58\sca\samples\calculator-implemen > tation-policies\target\classes > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 1 source file to > H:\tuscany58\sca\samples\calculator-implementa > tion-policies\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > H:\tuscany58\sca\samples\calculator-implementa > tion-policies\target\surefire-reports > > --- > T E S T S > --- > Running calculator.CalculatorTestCase > 17-Dec-2007 11:28:27 > org.apache.tuscany.sca.contribution.processor.ValidatingXML > StreamReader$1 error > WARNING: XMLSchema validation problem in: > file:/H:/tuscany58/sca/samples/calcula > tor-implementation-policies/target/classes/Calculator.composite, line: 28, > colum > n: 4 > cvc-complex-type.2.4.a: Invalid content was found starting with element > 'operati > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > expected. > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - subtract > 17-Dec-2007 11:28:28 > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - subtract > 17-Dec-2007 11:28:28 > FINER: Returning from operation subtract with return value 1 > 17-Dec-2007 11:28:28 > org.apache.tuscany.sca.contribution.processor.ValidatingXML > StreamReader$1 error > WARNING: XMLSchema validation problem in: > file:/H:/tuscany58/sca/samples/calcula > tor-implementation-policies/target/classes/Calculator.composite, line: 28, > colum > n: 4 > cvc-complex-type.2.4.a: Invalid content was found starting with element > 'operati > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > expected. > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - subtract > 17-Dec-2007 11:28:28 > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - subtract > 17-Dec-2007 11:28:28 > FINER: Returning from operation subtract with return value 1 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - multiply > 17-Dec-2007 11:28:28 > FINER: Inovoking operation multiply with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - multiply > 17-Dec-2007 11:28:28 > FINER: Returning from operation multiply with return value > java.lang.RuntimeExce > ption: java.lang.SecurityException: Unable to locate a login configuration > Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.462 sec > <<< FA > ILURE! > testCalculator(calculator.CalculatorTestCase) Time elapsed: 1.202 sec > <<< ERRO > R! > java.lang.RuntimeException: java.lang.SecurityException: Unable to locate > a logi > n configuration > at > org.apache.tuscany.sca.policy.security.jaas.JaasAuthenticationPolicyH > andler.beforeInvoke(JaasAuthenticationPolicyHandler.java:58) > at > org.apache.tuscany.sca.implementation.java.invocation.PolicyHandlingI > nterceptor.applyPreInvocationPolicies(PolicyHandlingInterceptor.java:63) > at > org.apache.tuscany.sca.implementation.java.invocation.PolicyHandlingI > nterceptor.invoke(PolicyHandlingInterceptor.java:45) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD > KInvocationHandler.java:249) > at > org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD > KInvocationHandler.java:146) > a
Re: Build failure in calculator-implementation-policies sample
Hi, Just gave a try on this issue.. It is likely caused by missing jaas configuration file. After did following steps manually. the sample can work. 1. Create a jaas config file : /** Login Configuration for the SCA-Calculator-Policies sample ** for convenience, I am using NTLoginModule temporarily **/ Calculator { com.sun.security.auth.module.NTLoginModule required; }; 2. add jvm parameter: -Djava.security.auth.login.config=jaas.conf 3. Go to CalculatorCallbackHandler.java, modify the hardcode user/pw to correct one. I am new to sca policy.. if I missed anything here, pls correct me. On Dec 17, 2007 8:14 PM, Simon Nash <[EMAIL PROTECTED]> wrote: > I am getting the following error when building the latest trunk. Any > ideas? > > Simon > > [INFO] > - > --- > [INFO] Building Apache Tuscany SCA Calculator Sample using Implementation > Polici > es > [INFO]task-segment: [install] > [INFO] > - > --- > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:compile] > [INFO] Compiling 12 source files to > H:\tuscany58\sca\samples\calculator-implemen > tation-policies\target\classes > [INFO] [resources:testResources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:testCompile] > [INFO] Compiling 1 source file to > H:\tuscany58\sca\samples\calculator-implementa > tion-policies\target\test-classes > [INFO] [surefire:test] > [INFO] Surefire report directory: > H:\tuscany58\sca\samples\calculator-implementa > tion-policies\target\surefire-reports > > --- > T E S T S > --- > Running calculator.CalculatorTestCase > 17-Dec-2007 11:28:27 > org.apache.tuscany.sca.contribution.processor.ValidatingXML > StreamReader$1 error > WARNING: XMLSchema validation problem in: > file:/H:/tuscany58/sca/samples/calcula > tor-implementation-policies/target/classes/Calculator.composite, line: 28, > colum > n: 4 > cvc-complex-type.2.4.a: Invalid content was found starting with element > 'operati > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > expected. > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - subtract > 17-Dec-2007 11:28:28 > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - subtract > 17-Dec-2007 11:28:28 > FINER: Returning from operation subtract with return value 1 > 17-Dec-2007 11:28:28 > org.apache.tuscany.sca.contribution.processor.ValidatingXML > StreamReader$1 error > WARNING: XMLSchema validation problem in: > file:/H:/tuscany58/sca/samples/calcula > tor-implementation-policies/target/classes/Calculator.composite, line: 28, > colum > n: 4 > cvc-complex-type.2.4.a: Invalid content was found starting with element > 'operati > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > expected. > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Invoking operation - add > 17-Dec-2007 11:28:28 > FINER: Inovoking operation add with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Returned from operation - add > 17-Dec-2007 11:28:28 > FINER: Returning from operation add with return value 5 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - subtract > 17-Dec-2007 11:28:28 > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - subtract > 17-Dec-2007 11:28:28 > FINER: Returning from operation subtract with return value 1 > 17-Dec-2007 11:28:28 > INFO: Invoking operation - multiply > 17-Dec-2007 11:28:28 > FINER: Inovoking operation multiply with arguments 3.0, 2.0, > 17-Dec-2007 11:28:28 > INFO: Returned from operation - multiply > 17-Dec-2007 11:28:28 > FINER: Returning from operation multiply with return value > java.lang.RuntimeExce > ption: java.lang.SecurityException: Unable to locate a login configuration > Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.462 sec > <<< FA > ILURE! > testCalculator(calculator.CalculatorTestCase) Time elapsed: 1.202 sec > <<< ERRO > R! > java.lang.RuntimeException: java.lang.SecurityException: Unable to locate > a logi > n configuration > at > org.ap
Re: Build failure in calculator-implementation-policies sample
HI, Thanks Lee. My apologies. I missed this out as I had located it elsewhere outside of my local codebase. I'll fix this right away. - Venkat On Dec 17, 2007 8:56 PM, lee zhenghui <[EMAIL PROTECTED]> wrote: > Hi, > Just gave a try on this issue.. It is likely caused by missing jaas > configuration file. After did following steps manually. the sample can > work. > 1. Create a jaas config file : >/** Login Configuration for the SCA-Calculator-Policies > sample > ** for convenience, I am using NTLoginModule temporarily > **/ > > Calculator { > com.sun.security.auth.module.NTLoginModule required; > }; > 2. add jvm parameter: -Djava.security.auth.login.config=jaas.conf > 3. Go to CalculatorCallbackHandler.java, modify the hardcode user/pw > to > correct one. > I am new to sca policy.. if I missed anything here, pls correct me. > > On Dec 17, 2007 8:14 PM, Simon Nash <[EMAIL PROTECTED]> wrote: > > > I am getting the following error when building the latest trunk. Any > > ideas? > > > > Simon > > > > [INFO] > > > - > > --- > > [INFO] Building Apache Tuscany SCA Calculator Sample using > Implementation > > Polici > > es > > [INFO]task-segment: [install] > > [INFO] > > > - > > --- > > [INFO] [resources:resources] > > [INFO] Using default encoding to copy filtered resources. > > [INFO] [compiler:compile] > > [INFO] Compiling 12 source files to > > H:\tuscany58\sca\samples\calculator-implemen > > tation-policies\target\classes > > [INFO] [resources:testResources] > > [INFO] Using default encoding to copy filtered resources. > > [INFO] [compiler:testCompile] > > [INFO] Compiling 1 source file to > > H:\tuscany58\sca\samples\calculator-implementa > > tion-policies\target\test-classes > > [INFO] [surefire:test] > > [INFO] Surefire report directory: > > H:\tuscany58\sca\samples\calculator-implementa > > tion-policies\target\surefire-reports > > > > --- > > T E S T S > > --- > > Running calculator.CalculatorTestCase > > 17-Dec-2007 11:28:27 > > org.apache.tuscany.sca.contribution.processor.ValidatingXML > > StreamReader$1 error > > WARNING: XMLSchema validation problem in: > > file:/H:/tuscany58/sca/samples/calcula > > tor-implementation-policies/target/classes/Calculator.composite, line: > 28, > > colum > > n: 4 > > cvc-complex-type.2.4.a: Invalid content was found starting with element > > 'operati > > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > > expected. > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - add > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - add > > 17-Dec-2007 11:28:28 > > FINER: Returning from operation add with return value 5 > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - subtract > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - subtract > > 17-Dec-2007 11:28:28 > > FINER: Returning from operation subtract with return value 1 > > 17-Dec-2007 11:28:28 > > org.apache.tuscany.sca.contribution.processor.ValidatingXML > > StreamReader$1 error > > WARNING: XMLSchema validation problem in: > > file:/H:/tuscany58/sca/samples/calcula > > tor-implementation-policies/target/classes/Calculator.composite, line: > 28, > > colum > > n: 4 > > cvc-complex-type.2.4.a: Invalid content was found starting with element > > 'operati > > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > > expected. > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - add > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - add > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - add > > 17-Dec-2007 11:28:28 > > FINER: Returning from operation add with return value 5 > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - add > > 17-Dec-2007 11:28:28 > > FINER: Returning from operation add with return value 5 > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - subtract > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - subtract > > 17-Dec-2007 11:28:28 > > FINER: Returning from operation subtract with return value 1 > > 17-Dec-2007 11:28:28 > > INFO: Invoking operation - multiply > > 17-Dec-2007 11:28:28 > > FINER: Inovoking operation multiply with arguments 3.0, 2.0, > > 17-Dec-2007 11:28:28 > > INFO: Returned from operation - multiply > > 17-Dec-2007 11:28:28 >
Re: Build failure in calculator-implementation-policies sample
Hi, I've fixed this in r605107. I have added a section in the README as well that should instruct on what is to be done to the java.security settings. I have kept this to a minimum of having to make a line of change to the java.security file. Thanks - Venkat On Dec 18, 2007 10:41 AM, Venkata Krishnan <[EMAIL PROTECTED]> wrote: > HI, > > Thanks Lee. > > My apologies. I missed this out as I had located it elsewhere outside of > my local codebase. I'll fix this right away. > > - Venkat > > > On Dec 17, 2007 8:56 PM, lee zhenghui < [EMAIL PROTECTED]> wrote: > > > Hi, > > Just gave a try on this issue.. It is likely caused by missing jaas > > configuration file. After did following steps manually. the sample can > > work. > > 1. Create a jaas config file : > >/** Login Configuration for the SCA-Calculator-Policies > > sample > > ** for convenience, I am using NTLoginModule temporarily > > > > **/ > > > > Calculator { > > com.sun.security.auth.module.NTLoginModule required; > > }; > > 2. add jvm parameter: -Djava.security.auth.login.config=jaas.conf > > 3. Go to CalculatorCallbackHandler.java , modify the hardcode > > user/pw to > > correct one. > > I am new to sca policy.. if I missed anything here, pls correct me. > > > > On Dec 17, 2007 8:14 PM, Simon Nash < [EMAIL PROTECTED]> wrote: > > > > > I am getting the following error when building the latest trunk. Any > > > ideas? > > > > > > Simon > > > > > > [INFO] > > > > > - > > > --- > > > [INFO] Building Apache Tuscany SCA Calculator Sample using > > Implementation > > > Polici > > > es > > > [INFO]task-segment: [install] > > > [INFO] > > > > > - > > > --- > > > [INFO] [resources:resources] > > > [INFO] Using default encoding to copy filtered resources. > > > [INFO] [compiler:compile] > > > [INFO] Compiling 12 source files to > > > H:\tuscany58\sca\samples\calculator-implemen > > > tation-policies\target\classes > > > [INFO] [resources:testResources] > > > [INFO] Using default encoding to copy filtered resources. > > > [INFO] [compiler:testCompile] > > > [INFO] Compiling 1 source file to > > > H:\tuscany58\sca\samples\calculator-implementa > > > tion-policies\target\test-classes > > > [INFO] [surefire:test] > > > [INFO] Surefire report directory: > > > H:\tuscany58\sca\samples\calculator-implementa > > > tion-policies\target\surefire-reports > > > > > > --- > > > T E S T S > > > --- > > > Running calculator.CalculatorTestCase > > > 17-Dec-2007 11:28:27 > > > org.apache.tuscany.sca.contribution.processor.ValidatingXML > > > StreamReader$1 error > > > WARNING: XMLSchema validation problem in: > > > file:/H:/tuscany58/sca/samples/calcula > > > tor-implementation-policies/target/classes/Calculator.composite, line: > > 28, > > > colum > > > n: 4 > > > cvc-complex-type.2.4.a: Invalid content was found starting with > > element > > > 'operati > > > on'. One of '{WC[##other:" http://www.osoa.org/xmlns/sca/1.0"]}' is > > > expected. > > > 17-Dec-2007 11:28:28 > > > INFO: Invoking operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > > 17-Dec-2007 11:28:28 > > > INFO: Returned from operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Returning from operation add with return value 5 > > > 17-Dec-2007 11:28:28 > > > INFO: Invoking operation - subtract > > > 17-Dec-2007 11:28:28 > > > FINER: Inovoking operation subtract with arguments 3.0, 2.0, > > > 17-Dec-2007 11:28:28 > > > INFO: Returned from operation - subtract > > > 17-Dec-2007 11:28:28 > > > FINER: Returning from operation subtract with return value 1 > > > 17-Dec-2007 11:28:28 > > > org.apache.tuscany.sca.contribution.processor.ValidatingXML > > > StreamReader$1 error > > > WARNING: XMLSchema validation problem in: > > > file:/H:/tuscany58/sca/samples/calcula > > > tor-implementation-policies/target/classes/Calculator.composite, line: > > 28, > > > colum > > > n: 4 > > > cvc-complex-type.2.4.a : Invalid content was found starting with > > element > > > 'operati > > > on'. One of '{WC[##other:"http://www.osoa.org/xmlns/sca/1.0"]}' is > > > expected. > > > 17-Dec-2007 11:28:28 > > > INFO: Invoking operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > > 17-Dec-2007 11:28:28 > > > INFO: Invoking operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Inovoking operation add with arguments 3.0, 2.0, > > > 17-Dec-2007 11:28:28 > > > INFO: Returned from operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Returning from operation add with return value 5 > > > 17-Dec-2007 11:28:28 > > > INFO: Returned from operation - add > > > 17-Dec-2007 11:28:28 > > > FINER: Returning f