I already integrated zf 1 with doctrine 2
I created entities by this:
php doctrine.php orm:convert-mapping --force --from-database annotation C:/wamp/www/ip/application/models
now I'm going to create getter and setter for them and generating entities I get the errors no metadata classes to process
php doctrine.php orm:generate-entities --generate-annotations="true" C:/wamp/www/ip/application/models
1- In the entity files generated, you need to delete this line:
"use Doctrine\ORM\Mapping as ORM;"
2- and also delete all appearances of ORM\
Related
Core: Exception handler (WEB): Uncaught TYPO3 Exception: Cannot use object of type __PHP_Incomplete_Class as array | Error thrown in file typo3/sysext/backend/Classes/Controller/Page/TreeController.php in line 189
This happened after a core update to TYPO3 - 9.5.17
https://forge.typo3.org/issues/91407
The following thanks to Michael Hitzler.
As far as I can see there is already a solution within the install tool in class BackendUserConfigurationUpdate.
This seems to address exactly the issue.
Not quite sure in which version the additional migration task has been added, but it helps you solving the issue system wide.
Just got to module Admin Tools -> Update and select Update Wizard.
There you should see a new, not yet executed migragtion task:
Update backend user configuration array
The backend user "uc" array, which is persisted in the db, now only allows for arrays inside its structure instead of stdClass objects. Update the uc structure for all backend users.
Execute this migration task and your BE users will be updated and have a sane uc configuration in the end.
Problem solved and page tree can be loaeded again.
./typo3cms upgrade:wizard backendUsersConfiguration
Should solve the issue.
I succeedeed in creating my own OAuth2 server using JCache as token store but I'm facing an issue when moving to JPA.
My configuration is :
"--users","test=test",
"--roles","test=test",
"--oauth2-provider","jpa",
"--oauth2-jpa-database-driver","org.h2.Driver",
"--oauth2-jpa-database-url","jdbc:h2:mem:oauth",
"--oauth2-jpa-database-username","sa",
"--oauth2-jpa-database-password",""
But I got exception below during OpenJPA bootstrap :
here was an error while setting up the configuration plugin option "MetaDataFactory".
The plugin was of type "org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory".
Setter methods for the following plugin properties were not available in that type: [
org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken,
org.apache.cxf.rs.security.oauth2.common.OAuthPermission,
org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken,
org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant,
org.apache.cxf.rs.security.oauth2.common.UserSubject].
Possible plugin properties are:
[AnnotationParser, ClasspathScan, FieldOverride, Files, JAR_FILE_URLS, MAPPING_FILE_NAMES, MODE_ALL, MODE_ANN_MAPPING, MODE_MAPPING, MODE_MAPPING_INIT, MODE_META, MODE_NONE, MODE_QUERY, PERSISTENCE_UNIT_ROOT_URL, Repository, Resources, STORE_DEFAULT, STORE_PER_CLASS, STORE_VERBOSE, StoreDirectory, StoreMode, Strict, Types, URLs, XMLAnnotationParser, XMLParser].
Ensure that your plugin configuration string uses key values that correspond to setter methods in the plugin class.
I suppose I missed something in configuration...
Any help would be appreciated.
Tx
Using --oauth2-jpa-properties you can set any persistence unit properties you want, I guess you will have to override openjpa.MetaDataFactory default value which is set to jpa(Types=org.apache.cxf.rs.security.oauth2.common.Client,org.apache.cxf.rs.security.oauth2.common.OAuthPermission,org.apache.cxf.rs.security.oauth2.common.UserSubject,org.apache.cxf.rs.security.oauth2.grants.code.ServerAuthorizationCodeGrant,org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken,org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken).
You can also check if your configuration is properly propagated and if there is no classpath conflict (another persistence.xml with an oauth2 unit?) because I just retested and your configuration seems to work.
Romain
I have to continue on an already existing CodeIgniter 3 application (not written by me) which contains multiple applications for different customers, the project structure looks a little like this:
root/
applications/
customer1/
config/, controllers/, models/, views/, ...
third_party/
SimpleSAMLphp/
config/, metadata/, www/, ...
lib/
_autoload.php
customer2/
...
assets/, bundle/, ...
customers/
customer1/
assets/, index.php, ...
customer2/
...
system/
vendor/
composer/
autoload.php
Now for one of the applications I have to replace the ion_auth system with an SSO (setup as a Service Provider from their IdP metadata). I googled a lot and tought SimpleSAMLphp would be my best option.
But I am really struggling just even putting the SimpleSAMLphp SP API into my application and the documentation isn't great.
-I "include_once" the third_party/SimpleSAMLphp/lib/_autoload.php file in the customers/customer1/index.php file (before require_once BASEPATH...)
-I modified third_party/SimpleSAMLphp/lib/_autoload.php so it finds the vendor/autoload.php file
I expect to be able to use the methods of the SimpleSAMLphp library but instead I get the following errors:
-If I follow the code in this guide:
Fatal error: Call to undefined function SimpleSAML\Auth\Simple()
-If use include APPPATH . 'third_party\SimpleSAMLphp\www\index.php in my controller just above the code from above tutorial:
Fatal error: Class 'SimpleSAML\Error\Assertion' not found in
What am I doing wrong in my setup?
I am working with the Rule Designer for the Business Rules service on Bluemix to create a BOM entry from an XML schema. When I select the XOM entry in the wizard, I see the error:
"Invalid XOM entry, please check your log file"
The Eclipse log file contains the following stacktrace:
!MESSAGE An error occurred while loading the XML schema
C:\mySchema.xsd.
!STACK 0
ERROR ERR011: in source file:C:/mySchema.xsd, after line 18, before
lines ?, The type reference on MyType cannot be resolved.
ERROR ERR011: in source file:C:/mySchema.xsd, after line 21, before
lines ?,
The type reference on MyType cannot be resolved.
at ilog.rules.xml.model.IlrXsdXomConvertorBase.convertSchema(IlrXsdXomConvertorBase.java:111)
at com.ibm.rules.dynamic.xom.SchemaDriver.loadModel(SchemaDriver.java:159)
at com.ibm.rules.dynamic.xom.XsdBuilder.buildXom(XsdBuilder.java:63)
at ilog.rules.studio.model.xom.impl.IlrDynamicXOMPathEntryImpl.getXsdReflect(IlrDynamicXOMPathEntryImpl.java:676)
...
How do I resolve this?
I had multiple xsd:import statements for the same namespace.
I put all the declarations for the namespace in a single file, and then used a single xsd:import for that namespace.
Another way is to add a new schema file that uses several xsd:include statements to include all the schema declarations for the namespace into this new file.
I had the same error message when I used www. at my xsd namespace.
Try changing your namespace "schema targetNamespace= and xmlns:tns= schema" until you can create the BOM succesfully. Verify you have the same value for both.
I'm trying to create Configuration:
$config = new \Doctrine\ORM\Configuration;
Although I can see this class using Open declaration in Zend Studio running it in browser results in:
Fatal error: Class 'Doctrine\ORM\Configuration' not found in C:\Program Files\Zend\Apache2\htdocs\MyProject\library\Custom\Entitymanager.php on line 20
Make sure doctrine is in the include path and you have autoloadernamespaces[] = "Doctrine" in application.ini file
Doctrine has a nice autoloader:
require '/path/to/libraries/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', '/path/to/libraries');
$classLoader->register(); // register on SPL autoload stack
Also see the similar questions:
Integrating ZF/Doctrine2: Where do i put my Models/Entities & Proxy classes
ZF + Doctrine 2 on SO