Unsupported binding namespace “”

后端 未结 1 973
情深已故
情深已故 2021-01-20 23:09

I have a schema for which JAXB is able to generate java classes perfectly every time. I am trying to get hyperjaxb to process the same schema. Towards

1条回答
  •  粉色の甜心
    2021-01-20 23:50

    The error that you see is due to missing the prefix on tag . The correct tag is below

    
        
    
    

    Anyway your XSDs have some problem because by maven-jaxb2-plugin is possible to generates all classes and maven-hyperjaxb3-plugin is not possible.


    I suggest a work around for your entire problem. If you don't needed to mark as @Entity or @Table all class that you generated, you could use below configuration.

    XJB

    
    
    
        
            
            
                
            
            
                
                    
                    
                    
                    
                
            
            
                
            
            
                
            
            
                
            
    
    
        
    
    
    

    Maven Plugin

    
        org.jvnet.jaxb2.maven2
        maven-jaxb2-plugin
        0.8.1
        
            
                generate-sources
                
                    generate
                
            
        
        
            
                org.hibernate.javax.persistence
                hibernate-jpa-2.0-api
                1.0.1.Final
            
        
        
            
                -Xannotate
                -nv
            
            true
            src/main/resources/
            
                schema.xsd
            
            src/main/resources/
            
                *.xjb
            
            true
            true
            true
            true
            
                
                    org.jvnet.jaxb2_commons
                    jaxb2-basics
                    0.6.3
                
                
                    org.jvnet.jaxb2_commons
                    jaxb2-basics-annotate
                    0.6.3
                
            
        
    
    

    Ain't a best practices but works fine.

    0 讨论(0)
提交回复
热议问题