[
https://issues.apache.org/jira/browse/TUSCANY-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Angela Cymbalak updated TUSCANY-2533:
-------------------------------------
Description:
Code compiles and starts to run without error. When hitting the gallery uri
javascript box saying undefined pops up. Print statements in the init and
getPictures methods never print to console. Also tested on Linux CentOS with
same problem.
Update: Jackrabbit requires the derby-2.10.1.6.jar file which is a newer
version than Tuscany uses. Tuscany will throw exceptions sometimes regarding
the persistent storage when the version of Derby is switched but does not
exhibit the same behaviour that originally caused the issue to be opened. I
haven't run significant tests regarding the derby jar file to pinpoint the
cause of the sporadic exceptions.
Update 2: The problem is in the Jackrabbit constructor TransientRepository().
That constructor calls the constructor below. I believe the error is
occurring during the file creation because the files are never created. Here
is that code:
public TransientRepository(final String config, final String home)
throws IOException {
this(new RepositoryFactory() {
public RepositoryImpl getRepository() throws RepositoryException {
try {
// Make sure that the repository configuration file exists
File configFile = new File(config);
if (!configFile.exists()) {
logger.info("Copying default configuration to " +
config);
OutputStream output = new FileOutputStream(configFile);
try {
InputStream input =
TransientRepository.class.getResourceAsStream(
DEFAULT_REPOSITORY_XML);
byte[] buffer = new byte[BUFFER_SIZE];
try {
int n = input.read(buffer);
while (n != -1) {
output.write(buffer, 0, n);
n = input.read(buffer);
}
} finally {
input.close();
}
} finally {
output.close();
}
}
// Make sure that the repository home directory exists
File homeDir = new File(home);
if (!homeDir.exists()) {
logger.info("Creating repository home directory " +
home);
homeDir.mkdirs();
}
// Load the configuration and create the repository
RepositoryConfig rc = RepositoryConfig.create(config, home);
return RepositoryImpl.create(rc);
} catch (IOException e) {
throw new RepositoryException(
"Automatic repository configuration failed", e);
} catch (ConfigurationException e) {
throw new RepositoryException(
"Invalid repository configuration: " + config, e);
}
}
});
}
I need to set up Jackrabbit for debugging to keep working on the issue.
was:
Code compiles and starts to run without error. When hitting the gallery uri
javascript box saying undefined pops up. Print statements in the init and
getPictures methods never print to console. Also tested on Linux CentOS with
same problem.
Update: Jackrabbit requires the derby-2.10.1.6.jar file which is a newer
version than Tuscany uses. Tuscany will throw exceptions sometimes regarding
the persistent storage when the version of Derby is switched but does not
exhibit the same behaviour that originally caused the issue to be opened. I
haven't run significant tests regarding the derby jar file to pinpoint the
cause of the sporadic exceptions.
> FirstHop (Jackrabbit) type application integration with photo-gallery sample
> appears to not call init
> ------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-2533
> URL: https://issues.apache.org/jira/browse/TUSCANY-2533
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Demos
> Affects Versions: Java-SCA-1.3
> Environment: Windows Vista
> Eclipse 3.3.0
> Jackrabbit 1.4.5
> Java 1.6.0_03
> also tested on:
> CentOS
> Java 1.5
> Reporter: Angela Cymbalak
> Priority: Minor
> Fix For: Java-SCA-1.3.1
>
> Attachments: AlbumImpl.java, build.xml
>
>
> Code compiles and starts to run without error. When hitting the gallery uri
> javascript box saying undefined pops up. Print statements in the init and
> getPictures methods never print to console. Also tested on Linux CentOS with
> same problem.
> Update: Jackrabbit requires the derby-2.10.1.6.jar file which is a newer
> version than Tuscany uses. Tuscany will throw exceptions sometimes regarding
> the persistent storage when the version of Derby is switched but does not
> exhibit the same behaviour that originally caused the issue to be opened. I
> haven't run significant tests regarding the derby jar file to pinpoint the
> cause of the sporadic exceptions.
> Update 2: The problem is in the Jackrabbit constructor TransientRepository().
> That constructor calls the constructor below. I believe the error is
> occurring during the file creation because the files are never created. Here
> is that code:
> public TransientRepository(final String config, final String home)
> throws IOException {
> this(new RepositoryFactory() {
> public RepositoryImpl getRepository() throws RepositoryException {
> try {
> // Make sure that the repository configuration file exists
> File configFile = new File(config);
> if (!configFile.exists()) {
> logger.info("Copying default configuration to " +
> config);
> OutputStream output = new
> FileOutputStream(configFile);
> try {
> InputStream input =
> TransientRepository.class.getResourceAsStream(
> DEFAULT_REPOSITORY_XML);
> byte[] buffer = new byte[BUFFER_SIZE];
> try {
> int n = input.read(buffer);
> while (n != -1) {
> output.write(buffer, 0, n);
> n = input.read(buffer);
> }
> } finally {
> input.close();
> }
> } finally {
> output.close();
> }
> }
> // Make sure that the repository home directory exists
> File homeDir = new File(home);
> if (!homeDir.exists()) {
> logger.info("Creating repository home directory " +
> home);
> homeDir.mkdirs();
> }
> // Load the configuration and create the repository
> RepositoryConfig rc = RepositoryConfig.create(config,
> home);
> return RepositoryImpl.create(rc);
> } catch (IOException e) {
> throw new RepositoryException(
> "Automatic repository configuration failed", e);
> } catch (ConfigurationException e) {
> throw new RepositoryException(
> "Invalid repository configuration: " + config, e);
> }
> }
> });
> }
> I need to set up Jackrabbit for debugging to keep working on the issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.