phpjasperxml icon indicating copy to clipboard operation
phpjasperxml copied to clipboard

XML_load" not found in

Open elidorio opened this issue 1 year ago • 18 comments

After I updated the sources to the new version 2.1.8, I started receiving the error below, in my reports that it was working. Fatal error: Trait "simitsdk\phpjasperxml\PHPJasperXML_load" not found in H:\xampp\htdocs\projetox\PHPJasperXML\src\PHPJasperXML.php on line 4

elidorio avatar Apr 29 '24 20:04 elidorio

im tested 2.1.8 in mac no this issue, can you try others version like 2.1.7 (or 2.1.6,5,4...) have similar issue?

kstan79 avatar Apr 30 '24 00:04 kstan79

As I used a very old version on an old system. And now I'm facing a lot of problems, in the phpjasperxml class. I want to use this class in a new system that I am developing. I'm using Windows 11. Testing on versions 2.1.9, 2.1.7, 2.1.8., and it presents the same problems....

Warning: require(H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer/../symfony/polyfill-php80/bootstrap.php): Failed

to open stream: No such file or directory in H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer\autoload_real.php on line 71

Fatal error: Uncaught Error: Failed opening required 'H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer/../symfony/polyfill-php80/bootstrap.php' (include_path='H:\xampp\php\PEAR') in H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer\autoload_real.php:71 Stack trace: #0 H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer\autoload_real.php(61): composerRequire1ee3e3edcc9109e23c5f6c140d2c94f2('a4a119a56e50fbb...', 'H:\xampp\htdocs...') #1 H:\xampp\htdocs\projetox\PHPJasperXML\vendor\autoload.php(7): ComposerAutoloaderInit1ee3e3edcc9109e23c5f6c140d2c94f2::getLoader() #2 H:\xampp\htdocs\projetox\RelatorioFluxoCaixa.php(3): require_once('H:\xampp\htdocs...') #3 {main} thrown in H:\xampp\htdocs\projetox\PHPJasperXML\vendor\composer\autoload_real.php on line 71

Fatal error: Uncaught Error: Class "ComposerAutoloaderInit1ee3e3edcc9109e23c5f6c140d2c94f2" not found in H:\xampp\htdocs\projetox\PHPJasperXML\vendor\autoload.php:7 Stack trace: #0 H:\xampp\htdocs\projetox\RelatorioFluxoCaixa.php(3): require_once() #1 {main} thrown in H:\xampp\htdocs\projetox\PHPJasperXML\vendor\autoload.php on line 7

elidorio avatar Apr 30 '24 02:04 elidorio

what is your php version, beside, you able to try in mac/linux see same thing happen?

kstan79 avatar Apr 30 '24 03:04 kstan79

My php version is: PHP Version 8.2.12. I tested on Linux Ubuntu and Windows 11 and the problem is the same. I don't have a Mac here to test....

elidorio avatar Apr 30 '24 11:04 elidorio

Weird, you may checkout current project and then execute cli php -S 0.0.0.0:8000

Then browse to http://localhost:8000/examples

Try explore is sample pdf show or have same issue?

kstan79 avatar Apr 30 '24 14:04 kstan79

I'm getting the same errors.

Fatal error: Uncaught Error: Class "simitsdk\phpjasperxml\PHPJasperXML" not found in /opt/lampp/htdocs/projetox/RelCadCidade.php:13 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/projetox/RelCadCidade.php on line 13

elidorio avatar Apr 30 '24 15:04 elidorio

I mean checkout phpjasperxml and run php -S in phpjasperxml project directory

kstan79 avatar Apr 30 '24 15:04 kstan79

I was unable to simulate the error this way. I don't have this expertise. But the errors still persist as previously reported.

elidorio avatar Apr 30 '24 22:04 elidorio

You

  1. Git clone this project in your home directory
  2. Cd into this folder
  3. Run command php -S 0.0.0.0:8000
  4. Browser go to http://127.0.0.1:8000/examples
  5. Select some sample

kstan79 avatar May 01 '24 01:05 kstan79

I cloned the sources for my machine, see the errors it presented.

Warning: file_get_contents(/opt/lampp/htdocs/projetox/rep/cadcidade.jrxml): Failed to open stream: Arquivo ou diretório inexistente in /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php on line 36

Fatal error: Uncaught TypeError: simitsdk\phpjasperxml\PHPJasperXML::prop(): Argument #1 ($obj) must be of type SimpleXMLElement, bool given, called in /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php on line 58 and defined in /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php:376 Stack trace: #0 /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php(58): simitsdk\phpjasperxml\PHPJasperXML->prop(false) #1 /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php(37): simitsdk\phpjasperxml\PHPJasperXML->load_xml_string('') #2 /opt/lampp/htdocs/projetox/RelCadCidade.php(17): simitsdk\phpjasperxml\PHPJasperXML->load_xml_file('/opt/lampp/htdo...') #3 {main} thrown in /opt/lampp/htdocs/projetox/PHPJasperXML/src/PHPJasperXML_load.php on line 376 Captura de tela de 2024-04-30 23-03-45

elidorio avatar May 01 '24 02:05 elidorio

I can't understand your situation.

  1. Your initial error different with your latest error. Initially it seems can't find part of php class, latest seems jrxml issue

  2. why in example will load cadcidade.jrxml

You may try focus only load the examples.

Provide me the error msg in photo cause it seems different with previous post

Send me your jrxml too

kstan79 avatar May 01 '24 02:05 kstan79

Below are the printouts with errors and source files. I'm using the phpjasperxml-master.zip version simit.zip

elidorio avatar May 02 '24 10:05 elidorio

Hello kstan79! Did you analyze the files I sent you?

elidorio avatar May 08 '24 01:05 elidorio

after went through the screenshoot and php file, i'm still not sure what cause issue. base on the ubuntu screenshoot, I'm wondering why phpjasperxml folder exists outside vendor, are you sure you install this lib with composer require simitgroup/phpjasperxml?

kstan79 avatar May 08 '24 22:05 kstan79

Captura de tela de 2024-05-10 12-15-34

The structure of my project is like this.

elidorio avatar May 10 '24 15:05 elidorio

Seems you put this project somewhere in your project and manually import, this is not the way to install it. Please use official (composer) way to install, it is very hard for me to assist if you setup in different way

kstan79 avatar May 11 '24 01:05 kstan79

I've already downloaded the system's default PHPJasperXML folder, and it still has a lot of errors. I'm already discouraged from using this project, I couldn't identify the errors.

Warning: require(H:\xampp\htdocs\projetox\phpjasperxml-master\vendor\composer/../symfony/polyfill-php80/bootstrap.php): Failed to open stream: No such file or directory in H:\xampp \htdocs\projetox\phpjasperxml-master\vendor\composer\autoload_real.php on line 41

Fatal error: Uncaught Error: Failed opening required 'H:\xampp\htdocs\projetox\phpjasperxml-master\vendor\composer/../symfony/polyfill-php80/bootstrap.php' (include_path='H:\xampp\php \PEAR') in H:\xampp\htdocs\projetox\phpjasperxml-master\vendor\composer\autoload_real.php:41 Stack trace: #0 H:\xampp\htdocs\projetox\phpjasperxml-master\vendor\composer\autoload_real .php(45): {closure}('a4a119a56e50fbb...', 'H:\xampp\htdocs...') #1 H:\xampp\htdocs\projetox\phpjasperxml-master\vendor\autoload. php(25): ComposerAutoloaderInit1ee3e3edcc9109e23c5f6c140d2c94f2 RelCadCidade.zip ::getLoader() #2 H:\xampp\htdocs\projetox\phpjasperxml-master\examples\main.php(2): require('H:\xampp\htdocs...' ) #3 H:\xampp\htdocs\projetox\RelCadCidade.php(7): include_once('H:\xampp\htdocs...') #4 {main} thrown in H:\xampp\htdocs\projetox \phpjasperxml-master\vendor\composer\autoload_real.php on line 41

elidorio avatar May 16 '24 01:05 elidorio

as I mentioned before, you shouldn't use "Download", you shall use:

composer require simitgroup/phpjasperxml

kstan79 avatar May 16 '24 02:05 kstan79

Close due to no reply

kstan79 avatar Oct 06 '24 06:10 kstan79