I haven't changed my JDK security settings.  Since this sample is
part of the full build (e.g., on Continuum), I don't think it should
require a customized JDK to build it.  If there is no way to build
it on a regular Sun JDK, then I suggest removing it from the samples
pom file for the default build.  The Continuum build is currently
failing because of this issue.

  Simon

Venkata Krishnan wrote:

Hi Simon,

We've had this trouble before after which I have simplified a couple of
things and have updated the README on some setup that is required in the jre
security settings to get this sample to work.  Could you please let me know
if you've configured the jre security settings and still face this problem
?  Thanks

- Venkat

On Jan 2, 2008 5:26 PM, Simon Nash <[EMAIL PROTECTED]> wrote:


I did a full checkout of Java SCA and tried to build it.  I got the
following failure in samples/calculator-implementation-policies.
Looking at the messages, I see validation errors followed by a
problem with login configuration.  Does anyone have ideas on why
this sample is failing?

 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 13 source files to
H:\tuscany59\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:\tuscany59\sca\samples\calculator-implementa
tion-policies\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory:
H:\tuscany59\sca\samples\calculator-implementa
tion-policies\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running calculator.CalculatorTestCase
02-Jan-2008 11:31:08
org.apache.tuscany.sca.contribution.processor.ValidatingXML
StreamReader$1 error
WARNING: XMLSchema validation problem in:
file:/H:/tuscany59/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.
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Invoking operation - subtract
02-Jan-2008 11:31:08
FINER: Inovoking operation subtract with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - subtract
02-Jan-2008 11:31:08
FINER: Inovoking operation subtract with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Returned from operation - subtract
02-Jan-2008 11:31:08
FINER: Returning from operation subtract with return value 1
02-Jan-2008 11:31:08
INFO:  Returned from operation - subtract
02-Jan-2008 11:31:08
FINER: Returning from operation subtract with return value 1
02-Jan-2008 11:31:08
org.apache.tuscany.sca.contribution.processor.ValidatingXML
StreamReader$1 error
WARNING: XMLSchema validation problem in:
file:/H:/tuscany59/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.
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - add
02-Jan-2008 11:31:08
FINER: Inovoking operation add with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Returned from operation - add
02-Jan-2008 11:31:08
FINER: Returning from operation add with return value 5
02-Jan-2008 11:31:08
INFO:  Invoking operation - subtract
02-Jan-2008 11:31:08
FINER: Inovoking operation subtract with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - subtract
02-Jan-2008 11:31:08
FINER: Inovoking operation subtract with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Returned from operation - subtract
02-Jan-2008 11:31:08
FINER: Returning from operation subtract with return value 1
02-Jan-2008 11:31:08
INFO:  Returned from operation - subtract
02-Jan-2008 11:31:08
FINER: Returning from operation subtract with return value 1
02-Jan-2008 11:31:08
INFO:  Invoking operation - multiply
02-Jan-2008 11:31:08
FINER: Inovoking operation multiply with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Invoking operation - multiply
02-Jan-2008 11:31:08
FINER: Inovoking operation multiply with arguments 3.0, 2.0,
02-Jan-2008 11:31:08
INFO:  Returned from operation - multiply
02-Jan-2008 11:31:08
FINER: Returning from operation multiply with return value
java.lang.RuntimeExce
ption: java.lang.SecurityException: Unable to locate a login configuration
02-Jan-2008 11:31:08
INFO:  Returned from operation - multiply
02-Jan-2008 11:31:08
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.432 sec
<<< FA
ILURE!
testCalculator(calculator.CalculatorTestCase)  Time elapsed: 1.151 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:56)
       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)
       at $Proxy7.multiply(Unknown Source)
       at calculator.CalculatorServiceImpl.multiply(
CalculatorServiceImpl.java:
63)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at
org.apache.tuscany.sca.implementation.java.invocation.JavaImplementat
ionInvoker.invoke(JavaImplementationInvoker.java:105)
       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)
       at $Proxy4.multiply(Unknown Source)
       at calculator.CalculatorTestCase.testCalculator(
CalculatorTestCase.java:
50)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:168)
       at junit.framework.TestCase.runBare(TestCase.java:134)
       at junit.framework.TestResult$1.protect(TestResult.java:110)
       at junit.framework.TestResult.runProtected(TestResult.java:128)
       at junit.framework.TestResult.run(TestResult.java:113)
       at junit.framework.TestCase.run(TestCase.java:124)
       at junit.framework.TestSuite.runTest(TestSuite.java:232)
       at junit.framework.TestSuite.run(TestSuite.java:227)
       at org.junit.internal.runners.OldTestClassRunner.run
(OldTestClassRunner.
java:35)
       at org.apache.maven.surefire.junit4.JUnit4TestSet.execute
(JUnit4TestSet.
java:62)
       at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
       at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:308)
       at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.j
ava:879)
Caused by: java.lang.SecurityException: Unable to locate a login
configuration
       at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java
:97)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

       at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstruct
orAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingC
onstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at java.lang.Class.newInstance0(Class.java:350)
       at java.lang.Class.newInstance(Class.java:303)
       at javax.security.auth.login.Configuration$3.run(
Configuration.java:216)

       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.Configuration.getConfiguration
(Configuratio
n.java:210)
       at javax.security.auth.login.LoginContext$1.run(LoginContext.java
:237)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.LoginContext.init(LoginContext.java
:234)
       at javax.security.auth.login.LoginContext.<init>(LoginContext.java
:403)
       at
org.apache.tuscany.sca.policy.security.jaas.JaasAuthenticationPolicyH
andler.beforeInvoke(JaasAuthenticationPolicyHandler.java:53)
       ... 38 more
Caused by: java.io.IOException: Unable to locate a login configuration
       at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java
:206)
       at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java
:95)
       ... 52 more

testAnotherCalculator(calculator.CalculatorTestCase)  Time elapsed: 0.241sec  <
<< ERROR!
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:56)
       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)
       at $Proxy7.multiply(Unknown Source)
       at calculator.CalculatorServiceImpl.multiply(
CalculatorServiceImpl.java:
63)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at
org.apache.tuscany.sca.implementation.java.invocation.JavaImplementat
ionInvoker.invoke(JavaImplementationInvoker.java:105)
       at
org.apache.tuscany.sca.implementation.java.invocation.PolicyHandlingI
nterceptor.invoke(PolicyHandlingInterceptor.java:46)
       at
org.apache.tuscany.sca.implementation.java.invocation.PolicyHandlingI
nterceptor.invoke(PolicyHandlingInterceptor.java:46)
       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)
       at $Proxy4.multiply(Unknown Source)
       at calculator.CalculatorTestCase.testAnotherCalculator
(CalculatorTestCas
e.java:58)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:168)
       at junit.framework.TestCase.runBare(TestCase.java:134)
       at junit.framework.TestResult$1.protect(TestResult.java:110)
       at junit.framework.TestResult.runProtected(TestResult.java:128)
       at junit.framework.TestResult.run(TestResult.java:113)
       at junit.framework.TestCase.run(TestCase.java:124)
       at junit.framework.TestSuite.runTest(TestSuite.java:232)
       at junit.framework.TestSuite.run(TestSuite.java:227)
       at org.junit.internal.runners.OldTestClassRunner.run
(OldTestClassRunner.
java:35)
       at org.apache.maven.surefire.junit4.JUnit4TestSet.execute
(JUnit4TestSet.
java:62)
       at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
tSet(AbstractDirectoryTestSuite.java:138)
       at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(Ab
stractDirectoryTestSuite.java:125)
       at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(Su
refireBooter.java:308)
       at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.j
ava:879)
Caused by: java.lang.SecurityException: Unable to locate a login
configuration
       at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java
:97)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

       at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstruct
orAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingC
onstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at java.lang.Class.newInstance0(Class.java:350)
       at java.lang.Class.newInstance(Class.java:303)
       at javax.security.auth.login.Configuration$3.run(
Configuration.java:216)

       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.Configuration.getConfiguration
(Configuratio
n.java:210)
       at javax.security.auth.login.LoginContext$1.run(LoginContext.java
:237)
       at java.security.AccessController.doPrivileged(Native Method)
       at javax.security.auth.login.LoginContext.init(LoginContext.java
:234)
       at javax.security.auth.login.LoginContext.<init>(LoginContext.java
:403)
       at
org.apache.tuscany.sca.policy.security.jaas.JaasAuthenticationPolicyH
andler.beforeInvoke(JaasAuthenticationPolicyHandler.java:53)
       ... 40 more
Caused by: java.io.IOException: Unable to locate a login configuration
       at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java
:206)
       at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java
:95)
       ... 54 more


Results :

Tests in error:
 testCalculator(calculator.CalculatorTestCase)
 testAnotherCalculator(calculator.CalculatorTestCase)

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to
H:\tuscany59\sca\samples\calculator-implementation-policies\targ
et\surefire-reports for the individual test results.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 6 seconds
[INFO] Finished at: Wed Jan 02 11:31:09 GMT 2008
[INFO] Final Memory: 20M/42M
[INFO]
------------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to