You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@syncope.apache.org by Edward Siewick <es...@digipro.com> on 2013/02/25 05:02:00 UTC

java.net.MalformedURLException: unknown protocol: vfs

Hi.

I'm probably missing something very basic regarding the instructions for

JBoss AS 7.1,
./core/src/main/resources/persistenceContextEMFactory.xml
and the instructions for:

<entry key="openjpa.MetaDataFactory"
  value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory
  (URLs=vfs:/content/${project.build.finalName}.war/WEBINF/classes/, 
Resources=META-INF/orm.xml)"/>


In localhost.2013-02-24.log:

Feb 24, 2013 10:24:40 PM org.apache.catalina.core.StandardContext 
listenerStart
SEVERE: Exception sending context initialized event to listener instance 
of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException:

Error creating bean with name 'wfAdapter':
Injection of autowired dependencies failed;
nested exception is 
org.springframework.beans.factory.BeanCreationException:

Could not autowire field: private org.activiti.engine.RuntimeService
org.apache.syncope.core.workflow.ActivitiUserWorkflowAdapter.runtimeService; 

nested exception is 
org.springframework.beans.factory.BeanCreationException:

Error creating bean with name 'processEngine':
FactoryBean threw exception on object creation;
nested exception is 
org.springframework.transaction.CannotCreateTransactionException:
Could not open JPA EntityManager for transaction;
nested exception is <openjpa-2.2.1-r422266:1396819 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException:
org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory@46ea96db.URLs 
= vfs:/content/syncope.war/WEBINF/classes/

...

Caused by: <openjpa-2.2.1-r422266:1396819 nonfatal user error>
org.apache.openjpa.util.UserException: unknown protocol: vfs
         at 
org.apache.openjpa.meta.AbstractCFMetaDataFactory.setURLs(AbstractCFMetaDataFactory.java:135)
         ... 86 more
Caused by: java.net.MalformedURLException: unknown protocol: vfs


The environment is
ubuntu server 12.04

java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)

jboss-as-7.1.1.Final.tar.gz
ogs-3.1.2.2-unix.sh

apache-maven-3.0.5-bin.tar.gz
apache-tomcat-7.0.37.tar.gz

Apache Syncope 1.0.5

Any and all clues are welcome.

Thanks,

Edward Siewick



Re: java.net.MalformedURLException: unknown protocol: vfs

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi again,
about the wiki page, I've just fixed a stupid typo (WEB-INF instead of 
WEBINF):

<entry key="openjpa.MetaDataFactory"
  value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory
  (URLs=vfs:/content/${project.build.finalName}.war/WEBINF/classes/, 
Resources=META-INF/orm.xml)"/>

should instead be

<entry key="openjpa.MetaDataFactory"
  value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory
  (URLs=vfs:/content/${project.build.finalName}.war/WEB-INF/classes/, 
Resources=META-INF/orm.xml)"/>

Besides this, everything was working fine.
Summarizing, here are the steps I've followed:

1. downloaded jboss-as-7.1.1.Final.zip and exploded in a directory (say 
$JBOSS_HOME)
2. launched $JBOSS_HOME/bin/standalone.sh
3. executed $JBOSS_HOME/bin/add-user.sh (an admin user is needed to 
access the web admin console)
4. generated a new Syncope project (following [1])
5. followed the updated [2] (for the sake of simplicity, I've configured 
core/src/main/resources/persistence.properties for in-memory H2 and 
removed <scope>test</scope> in core/pom.xml for the H2 dependency)
6. changed console/src/main/resources/configuration.properties from 9080 
to 8080 (the default listening port for JBoss AS)
7. mvn clean package
8. $JBOSS_HOME/bin/jboss-cli.sh -c --command="deploy 
core/target/syncope.war"
9. $JBOSS_HOME/bin/jboss-cli.sh -c --command="deploy 
console/target/syncope-console.war"

HTH

Regards.

[1] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project
[2] 
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-JBossAS7.1

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: java.net.MalformedURLException: unknown protocol: vfs

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 25/02/2013 10:19, Francesco Chicchiriccò wrote:
> Hi Edward,
> I am examining the situation.
>
> The good news so far is that the integration test suite (from the 
> stable 1_0_X branch) running against JBoss is still succeeding.
>
> The bad news is that I am not able to deploy on JBoss by following the 
> wiki page (as you reported below): I'll do some more investigation and 
> let you know.

Hi,
I have put a sample project for Apache Syncope 1.0.5 working on JBoss 
(both core and console) at

https://github.com/Tirasa/syncopeOnJBoss

It has some limitations (mainly, the internal storage is set to 
in-memory H2 without DataSource) but I've just tried and it's working.

HTH

Regards.

> On 25/02/2013 05:02, Edward Siewick wrote:
>> Hi.
>>
>> I'm probably missing something very basic regarding the instructions for
>>
>> JBoss AS 7.1,
>> ./core/src/main/resources/persistenceContextEMFactory.xml
>> and the instructions for:
>>
>> <entry key="openjpa.MetaDataFactory"
>>  value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory
>>  (URLs=vfs:/content/${project.build.finalName}.war/WEBINF/classes/, 
>> Resources=META-INF/orm.xml)"/>
>>
>>
>> In localhost.2013-02-24.log:
>>
>> Feb 24, 2013 10:24:40 PM org.apache.catalina.core.StandardContext 
>> listenerStart
>> SEVERE: Exception sending context initialized event to listener 
>> instance of class
>> org.springframework.web.context.ContextLoaderListener
>> org.springframework.beans.factory.BeanCreationException:
>>
>> Error creating bean with name 'wfAdapter':
>> Injection of autowired dependencies failed;
>> nested exception is 
>> org.springframework.beans.factory.BeanCreationException:
>>
>> Could not autowire field: private org.activiti.engine.RuntimeService
>> org.apache.syncope.core.workflow.ActivitiUserWorkflowAdapter.runtimeService; 
>>
>> nested exception is 
>> org.springframework.beans.factory.BeanCreationException:
>>
>> Error creating bean with name 'processEngine':
>> FactoryBean threw exception on object creation;
>> nested exception is 
>> org.springframework.transaction.CannotCreateTransactionException:
>> Could not open JPA EntityManager for transaction;
>> nested exception is <openjpa-2.2.1-r422266:1396819 nonfatal general 
>> error>
>> org.apache.openjpa.persistence.PersistenceException:
>> org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory@46ea96db.URLs 
>> = vfs:/content/syncope.war/WEBINF/classes/
>>
>> ...
>>
>> Caused by: <openjpa-2.2.1-r422266:1396819 nonfatal user error>
>> org.apache.openjpa.util.UserException: unknown protocol: vfs
>>         at 
>> org.apache.openjpa.meta.AbstractCFMetaDataFactory.setURLs(AbstractCFMetaDataFactory.java:135)
>>         ... 86 more
>> Caused by: java.net.MalformedURLException: unknown protocol: vfs
>>
>>
>> The environment is
>> ubuntu server 12.04
>>
>> java version "1.7.0_15"
>> Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
>> Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>>
>> jboss-as-7.1.1.Final.tar.gz
>> ogs-3.1.2.2-unix.sh
>>
>> apache-maven-3.0.5-bin.tar.gz
>> apache-tomcat-7.0.37.tar.gz
>>
>> Apache Syncope 1.0.5
>>
>> Any and all clues are welcome.
>>
>> Thanks,
>>
>> Edward Siewick

-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/


Re: java.net.MalformedURLException: unknown protocol: vfs

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Edward,
I am examining the situation.

The good news so far is that the integration test suite (from the stable 
1_0_X branch) running against JBoss is still succeeding.

The bad news is that I am not able to deploy on JBoss by following the 
wiki page (as you reported below): I'll do some more investigation and 
let you know.

Regards.

On 25/02/2013 05:02, Edward Siewick wrote:
> Hi.
>
> I'm probably missing something very basic regarding the instructions for
>
> JBoss AS 7.1,
> ./core/src/main/resources/persistenceContextEMFactory.xml
> and the instructions for:
>
> <entry key="openjpa.MetaDataFactory"
>  value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory
>  (URLs=vfs:/content/${project.build.finalName}.war/WEBINF/classes/, 
> Resources=META-INF/orm.xml)"/>
>
>
> In localhost.2013-02-24.log:
>
> Feb 24, 2013 10:24:40 PM org.apache.catalina.core.StandardContext 
> listenerStart
> SEVERE: Exception sending context initialized event to listener 
> instance of class
> org.springframework.web.context.ContextLoaderListener
> org.springframework.beans.factory.BeanCreationException:
>
> Error creating bean with name 'wfAdapter':
> Injection of autowired dependencies failed;
> nested exception is 
> org.springframework.beans.factory.BeanCreationException:
>
> Could not autowire field: private org.activiti.engine.RuntimeService
> org.apache.syncope.core.workflow.ActivitiUserWorkflowAdapter.runtimeService; 
>
> nested exception is 
> org.springframework.beans.factory.BeanCreationException:
>
> Error creating bean with name 'processEngine':
> FactoryBean threw exception on object creation;
> nested exception is 
> org.springframework.transaction.CannotCreateTransactionException:
> Could not open JPA EntityManager for transaction;
> nested exception is <openjpa-2.2.1-r422266:1396819 nonfatal general 
> error>
> org.apache.openjpa.persistence.PersistenceException:
> org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory@46ea96db.URLs 
> = vfs:/content/syncope.war/WEBINF/classes/
>
> ...
>
> Caused by: <openjpa-2.2.1-r422266:1396819 nonfatal user error>
> org.apache.openjpa.util.UserException: unknown protocol: vfs
>         at 
> org.apache.openjpa.meta.AbstractCFMetaDataFactory.setURLs(AbstractCFMetaDataFactory.java:135)
>         ... 86 more
> Caused by: java.net.MalformedURLException: unknown protocol: vfs
>
>
> The environment is
> ubuntu server 12.04
>
> java version "1.7.0_15"
> Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>
> jboss-as-7.1.1.Final.tar.gz
> ogs-3.1.2.2-unix.sh
>
> apache-maven-3.0.5-bin.tar.gz
> apache-tomcat-7.0.37.tar.gz
>
> Apache Syncope 1.0.5
>
> Any and all clues are welcome.
>
> Thanks,
>
> Edward Siewick
>
>
-- 
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/